[2005] I need advices about Access Database
I am making a stock software which stores informations about wares.
I have a main table which has the stock information (wares, numbers, prices, company etc...)
But software will print a bill if user sells some wares. And software shall save the information form the bill to DB so that user can get informaitons about bill back if needed.
I have 3 ideas:
1) 1 table for all bills: Columns are:
SellNumber / BillNumber / WareType / Price etc...
Each ware which has been sold in the same bill will have same BillNumber but other SellNumbers. So that software can get infos about a specific bill number back.
2) 1 Table for registration of billnumbers and bill infos. And each bill has own table for sold wares list.
3) third idea is like first but different. I want to store data like this
WareType= Pen|Eraser|Notebook|Book and Price= 0.5|0.5|2|5
And if user want to get infos back I can use split function.
I want to ask which one is the best for my access db. There will be a lot of informaitons and I dont want that my db slow down?
Re: [2005] I need advices about Access Database
I like option 1. Just a side note that if you choose option 3, using the split function can cause proformace problems such as slow downs.
Re: [2005] I need advices about Access Database
The third option is a very bad option. In this day and age there's no reason to ever store composite values in text fields like that. They are a hindrance, not a help. Database tables are like classes: you should have one for each distinct physical or abstract type of object. You would have one table for transactions and another for entries in that transaction, where the second table has a foreign key from the first. The first option you listed is the only good design of the three.
Re: [2005] I need advices about Access Database
As just a suggestion, why don't you study the Northwinds database that comes with most MS stuff. It may not be the very best design, but it has stood the test of time and from your description, it sounds like you could follow that same structure quite easily.