If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Should an order details table have autonumber field orderdetailsID?
I have tblOrder with the fields OrderID, OrderDate & CustomerID. I have
just made tblOrderDetails with the fields OrderDetailsID, OrderID, ItemNo, Quantity. My question is do I need the OrderDetailsID (autonumber) field? are there any advantages to it? thanks in advance |
#2
|
|||
|
|||
Will wrote:
I have tblOrder with the fields OrderID, OrderDate & CustomerID. I have just made tblOrderDetails with the fields OrderDetailsID, OrderID, ItemNo, Quantity. My question is do I need the OrderDetailsID (autonumber) field? are there any advantages to it? thanks in advance Every table in a proper database needs a Primary Key. If you have other field(s) that you can use as a PK then the AN is not necessary. Some people would not want an Order to list the same ItemNo on more than one line of an Order. For them a PK consisting of OrderID and ItemNo would work just fine. Others might want the capability to enter the same ItemNo on more than one line so they would need "some" other field added to the table to establish uniquness. In that case an AN would solve the problem. -- I don't check the Email account attached to this message. Send instead to... RBrandt at Hunter dot com |
#3
|
|||
|
|||
hi, If the Order ID and Item number are unique for each row then you don't
need any oderdetail ID and you can use the Order_ID and Item_Number as the concatenated key. However if this is not so then you should create the Order detailID as the key and it will be useful to have it auto-numbered. -- Haris http://www.manage-systems.com "Will" wrote: I have tblOrder with the fields OrderID, OrderDate & CustomerID. I have just made tblOrderDetails with the fields OrderDetailsID, OrderID, ItemNo, Quantity. My question is do I need the OrderDetailsID (autonumber) field? are there any advantages to it? thanks in advance |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Multiple Options Group | Patty Stoddard | Using Forms | 19 | August 4th, 2005 02:30 PM |
Seeking some expert advice. | HD87glide | Using Forms | 14 | March 23rd, 2005 10:11 PM |
Design help, please | SillySally | Using Forms | 27 | March 6th, 2005 04:11 AM |
Access 2000, autonumber fields | Zyberg74 | General Discussion | 3 | November 17th, 2004 04:24 PM |
Autonumber | Ally H. | General Discussion | 7 | August 27th, 2004 04:51 PM |