Help! Difficulty understanding DB -> Object mapping



Hi I am hoping you cann help.

I have a simple system which allows orders to be created for customers.
I have studied various patterns and the like, and I have the following
data structure in the DB:

Order
=====
Order_ID
Customer_ID
Customer_Address_ID
....

OrderLineItem
=============
Order_ID
Product_ID
Qty
Price
Tax
TotalPrice

I have a number of questions. Is it normal to:

1. Store the full chosen billing and shipping address with the Order,
though the addresses are stored in a separate table?

2. Store the full product details with a Line Item? I currently do not
store the title of the product, just its id.

If I store all of these details in the DB structure, I must still load
them into objects. My problem currently is in loading a customers
order. I dont know where to join the product in the line items to the
actual product descriptions. Do I do a DB join to get the ProductTitle
back, and put the product title in my OrderLineItem object? Or do I get
back the order line items, and do a secondary search for the product
based on its ID, load the product, and associate teh product to the
order obejct? I'm confused, and concerned about performances problem.

Any advice?

..

.



Relevant Pages

  • Re: OT Fools
    ... ``If a retailer had big deals, they had many customers. ... So you could walk through a mall and see one store that was packed next to another that was virtually empty,'' said Beemer. ... He actually began his holiday shopping Tuesday, when he bought her an iPod nano. ...
    (rec.arts.tv.soaps.cbs)
  • Re: OT Fools
    ... >Three out of every four shoppers his group surveyed on Friday had made ... >deals, they had many customers. ... So you could walk through a mall and see one store that was ...
    (rec.arts.tv.soaps.cbs)
  • Eventful day....
    ... I always treat my customers with respect, ... stuff in the store and then return them without receipt and exchange them ... company has such policy (without just telling them "it's the policy" which ... So I let the manager take over. ...
    (rec.games.computer.ultima.dragons)
  • Build Your Store on the Web
    ... Build Your Store on the Web ... Check the list of features below for an overview of the available ... Customers can view their order history and order status ... Administration / Backend Functionality ...
    (alt.home.repair)
  • Re: Is it garbage now?
    ... For me it's ACE Hardware. ... and the customers would come ... >>> got the repeat business, ... >>> know that the store stands behind the sale. ...
    (rec.audio.car)