Reputation: 25733
i am doing small billing application,
i need some guidance about database design for billing software,
i have product table in this am maintaining below fields,
Product table
Product code , unique ,
quantity ,
price,
vat,
discount ,
and some of few columns like userid, createddate ,
Basket table,
basketid ,
PHPSESSIONID ,
productcode,
quantity ,
and few required details like userid, created date ,
counter people entering bills are initially store into tblbasket table,
when billing is confirmed , Required details are move to tblSale table,
tblSale table:
id AI,PK,
BasketSessionID ,(no foreign key concept but just inserting that tbl basket PHPSESSIONID )
productcose , and few required details,
The above details am holding for billing application,
Now i need some guidence to proceed furtheir,
So First step is,
i want to maintain something like below,
So totally i want table design for Stockin, Stockout,Returns , Free CD,
Total idea behind is,
Reporting view for billing application,
Upvotes: 1
Views: 5539
Reputation: 2304
Before you make your final decisions on the database schema take some time to look at the Microsoft example data AdventureWorks2008 for SQL Server.
After you have reviewed the database design I believe you will have the answers to your questions mentioned above. If you have additional questions you can reference the AdventureWorks databse to help describe your question or goal.
Upvotes: 1