Results 1 to 6 of 6
Thread: DB Design Question...
Dec 29, 2004, 08:38 #1
- Join Date
- Jun 2002
- Riding the electron wave
- 0 Post(s)
- 0 Thread(s)
DB Design Question...
I am almost done building a LAN-based Point-of-Sale system. I am somewhat new to mySQL, although I have worked with it for a few years now. I've only used mySQL for simple things like storing images and contact info for people that use my web-based contact forms. Now I want to do something a little more in-depth, and I need some suggestions.
I want to be able to not only insert each invoice into the DB, but I also want to do so in a way that would allow me to provide various reports in a logical way. As it stands now, I have 1 table that I call "invoices", where I store all the info that is found on a completed invoice: customer's information, date, sale type, and sale details, which is a semi-colon delimited list of all the items, quantities, and prices for everything they bought.
Now, after building that table and playing with it a little, it seems rather cumbersome to work with. I will have to do a lot of parsing in order to make reports like 10 Most Popular Items, Total Profit for the last week, Total Item Cost of all tickets for month of Nov, for example, since all of those details are in a list in one column.
How would you guys build your table/tables to make such data storage and it's subsequent access more logical with less overhead? A seperate customers table linked with an items table? Or would you do something different?
Any suggestions would be appreciated.Ducharme's Axiom: "If you view your problem closely
enough, you will recognize yourself as part of the problem."