Click here to Skip to main content
15,893,594 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have Two Data base Design approach , I develop a system (it is an accounting system )
during my data base design i found that , i have Purchase Order Table , Purchase Bill Table and Purchase Return Table , Of course Each Order , Purchase , Or Return Must Have it is Own Item , Suppose that Each item information For the three Bills Is the Same , So for now i have A new Table Called Bill Items , the wright Way , is to make One Table For all items of the three bill and it will be as follow
BillItems table (F1 , F2 , F3 ..... ,
PurchaseOrderID(Allow Null),PurchaseBillID (Allow Null),PurchaseReturnID(Allow Null))

this is the First Solution,

the Second Solution is to make the BillItem Table Divide it into three tables
1 - PurchaseOrderItems (F1 , F2 , F3 , .... PurchaseOrderID(does not allow null))
2 - PurchaseBillItems (F1 , F2 , F3 , .... PurchaseBillID(does not allow null))
1 - PurchaseReturnItems (F1 , F2 , F3 , .... PurchaseReturnID(does not allow null))


now i want to know which of the Solutions is the best...?
thanks Every One.
Posted
Updated 27-Apr-11 2:36am
v4
Comments
Yasser El Shazly 27-Apr-11 1:13am    
I think the Second Solution , Reduce Redundancy and Keep track with data Consistency but increase the number of tables , I am really Confused between the Two Solution can any one help me and give me his opinion i am in a bad need of opinions about this situation
walterhevedeich 27-Apr-11 1:21am    
You dont need to say its urgent. People would'nt care anyway.
Yasser El Shazly 27-Apr-11 1:22am    
OK thanks

1 solution

Second approach is the best and suits in stable DB stucture.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900