thetylercox Posted June 8, 2012 Share Posted June 8, 2012 The objective: Design a database for a local store in town to keep up with customers and their purchases.Not an online store! The issue i'm having: How to handle the issue of repeat customers. So I have the fields they want to keep up with but on the return trip I don't want to delete the old info instead I want to add to it. So when the record is pulled for this person it will show all there past purchases but only on one record. I had the idea of making another database for purchases and using unique keys I would query the purchased database! Enough with the rambling. I'm just open for ideas I am a bit of a nob when it comes to the designing and would kindly like some advice links something to point me in the right direction! Thanks in advance Tyler Cox Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted June 8, 2012 Share Posted June 8, 2012 You need separate tables for customer information and their purchases. Each item purchased would be stored in the purchases table with, at a minimum, the primary key id of the user, the quantity and id of the item purchased, date, unit cost, etc. Quote Link to comment Share on other sites More sharing options...
thetylercox Posted June 9, 2012 Author Share Posted June 9, 2012 Perfect! Is that the norm fix for this situation? Another way of asking this? Is there any other way? Thanks for the reply! Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted June 9, 2012 Share Posted June 9, 2012 You'll probably have an easier time if you Google "database normalization" and apply those principles to the requirements of our application. For me to try to explain anything much beyond the basics would probably just confuse you. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.