Bharanikumar
Bharanikumar

Reputation: 25733

Database Design for Billing System application

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,

  1. need to implement reports , daily sale, returns and every thing,

So First step is,

i want to maintain something like below,

  1. Product code Total stockin count,
  2. after sold need some stock out count,
  3. if returns means how to maintain,

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

Answers (1)

RC_Cleland
RC_Cleland

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.

  • This link points to the availabel samples for SQL Server
  • This link is a tutorial on creating reports.
  • This link is a sample web app for Adventure Works

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

Related Questions