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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Need help please.....Its regd. database designing.

Author  Topic 

thiruna
Starting Member

41 Posts

Posted - 2001-10-15 : 04:15:27
friends,

i have a table 'salesdetails' which stores everyday or every 6 hours sales details....the following is the table structure....

sales_id (identity)

machine_id (foreign key - machine table)
A machine contains 8 or more beverages....
bev_id (foreign key - beverage table)

Sales_date (datetime field to store date and time)

opening_balance (int - to store opening balance of machine for a particular beverage)

closing_balance(int - to store close balance of machine for a particular beverage)

By using this table, i have to develop report screens which aids users to see every month or every day sales detail for each machine for each beverage like follows

Machine Name------Beverage_name--------Total Cups
_____________________________________________

machineno1--------black coffee-------1300

machineno1--------black tea----------1546

machineno1--------Pure Milk----------3214

machineno2--------black coffee-------3451

machineno2--------black tea----------2342

machineno2--------Pure milk----------3242

etc.etc...

is the table which i have created good enough to keep datas or will i have to modify this table ?

i have an idea of creating one more table which updates itself the total cups sold for each beverage of each machine when new entry is added in the salesdetails table....

is it worth creating or suggest some good solutions

many thanks in advance....

thiruna@vsnl.com

one more thing i forgot to mention....

1. If the machine gets repaired or else the machine may be closed permanently, there wont be any data entry for that machine for that day but anyway, the total sales for the machine should come in the report even its is discontinued (i mean even if no data entries...)


Edited by - thiruna on 10/15/2001 04:56:51
   

- Advertisement -