Dear Access Expert.
I was looking at a project today and the developer had a table with a primary key composed of 3 fields.
His table schema had the following primary keys.
tblOrder:
OrderID
tblOrderLines:
OrderID, LineNum
tblOrderLineDetails:
OrderID , LineNum, LineItemNum
I would have done the following.
tblOrder:
OrderID
tblOrderLines:
AutoNumberLineID (Just regular Fields: OrderID, LineNum)
tblOrderLineDetails
AutoNumberLineItemID (AutoNumberLineID, LineItemNum )
My schema allows for Single field Joins and Search Criteria. His Schema requires Multiple field joins and Multiple Field searches to drill down to a specific record.
The benefit of his schema is you don't have to make a join when you are looking at a tblOrderLineDetails record to determine the LineNum or the Order ID.
What is your opinion?
Thank you.
I was looking at a project today and the developer had a table with a primary key composed of 3 fields.
His table schema had the following primary keys.
tblOrder:
OrderID
tblOrderLines:
OrderID, LineNum
tblOrderLineDetails:
OrderID , LineNum, LineItemNum
I would have done the following.
tblOrder:
OrderID
tblOrderLines:
AutoNumberLineID (Just regular Fields: OrderID, LineNum)
tblOrderLineDetails
AutoNumberLineItemID (AutoNumberLineID, LineItemNum )
My schema allows for Single field Joins and Search Criteria. His Schema requires Multiple field joins and Multiple Field searches to drill down to a specific record.
The benefit of his schema is you don't have to make a join when you are looking at a tblOrderLineDetails record to determine the LineNum or the Order ID.
What is your opinion?
Thank you.