When you are storing the order summary you will not bind the id, this should be an auto incrementing column that you have in your orders table. For the order reference id you will want to bind the eCart session id. The visitor id would be the id value for the logged in user. This is how you will identify an order belonging to an individual. If you are not requiring users to login this will not apply.
Please post back with any other questions that you have about any part of this and we will help with whatever we can.