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 |
taghipour
Starting Member
5 Posts |
Posted - 2013-12-18 : 06:26:59
|
Dear guys im trying to make two tables for proforma invoice. please help me which one is better to create primary keys on Tables.Method 1 Tbl_Proforma(Proforma_Type_ID, Proforma_ID, Proforma_Title, ....)Tbl_Proforma_Details(Proforma_Type_ID, Proforma_ID, Goods_ID, Other_Details, ....)In this method i have to manage more than two keys as primary key Method 2 Tbl_Proforma(Proforma_ID, Proforma_Type_ID, Proforma_ID, Proforma_Title, ....)Tbl_Proforma_Details(Proforma_ID,Goods_ID, Other_Details, ....)In method 2 i have one primary key for Tbl_Proforma and i use it as primary key in Tbl_Proforma_Details. is it Good solution or whats your solutions to make this kind tables.Thanks in advance. |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-12-18 : 06:44:25
|
I think method 2 should be enough. I guess you'll have another table with Proforma_Type_ID as primary key which will have master entries for it.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
taghipour
Starting Member
5 Posts |
Posted - 2013-12-18 : 06:50:45
|
yes I have this table too. Thanks for your help |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-12-18 : 07:42:34
|
ok..fine then------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
|
|
|
|
|