Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
mahmoud saleh
Starting Member
1 Post |
Posted - 2008-10-18 : 08:11:49
|
hi allin my java application i have table for generating bill consists of 3 columns book,quantity,price,every bill have specific number and suppose that the bill number 20 consists of 4 rows,i want to store these rows in the database so i can view the bill later,how can i store the bill in the database,what is the correct design of the database tables in this case,i found that i should use the common way,order and order line item,but i need an example here please? |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-18 : 10:03:21
|
you could have a table called billitem which links bill with its items. The columns will be BillID which has fk relationship to bilid of bill table,itemid which has foreign key relationship to items. and then you may have a identity column called billitemid which acts as primary key for table. |
|
|
|
|
|