By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,493 Members | 1,186 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,493 IT Pros & Developers. It's quick & easy.

Thoughts and Ideas On a Simple Purchase Database

Stang02GT
Expert 100+
P: 1,208
Hello,

I would just like to get your thoughts/ideas/suggestions on how I should go about createing a VERY SIMPLE purchasing system. A friend has asked me help him develop a simple purchasing database.

Just off the top of my head this is what i have come up with for the table lay out.

Tables = Bold Text

Customer
Name
Address
Phone Number
E-Mail Address
Credit Card Number

Orders
Order Number
Product Number
Customer Name
Customer Address
Customer Phone
Cumster Credit Card Number

Products
Name
Manufacture
Model Number
Price
Quantity


Is there anything else that i would need. Is there a better way to arrange the tables and feilds within them? I am open to any thoughts/ideas/and suggestions.


thank you in advance
Oct 15 '07 #1
Share this Question
Share on Google+
2 Replies


Rabbit
Expert Mod 10K+
P: 12,315
Customer
CustomerID; PK
Name
Address
Phone Number
E-Mail Address
Credit Card Number

Orders
Order Number; PK
Product Number; FK
CustomerID; FK
OrderDate
QuantityOrdered
PriceAtPointInTime

Products
Product Number; PK
Name
Manufacturer
Model Number
Price
QuantityInStock
Oct 15 '07 #2

Scott Price
Expert 100+
P: 1,384
You've done a good job of starting the process :-)

Normally, however, you would include in your Customers table a field with unique id's named something like CustomerID. Then instead of replicating the Customer Name, etc in your Orders table, you would simply include this CustomerID field. This is called a Primary Key/Foreign Key (Primary Key is in the main table, Foreign Key refers to another table's Primary Key that is used in a second table to reference the data between the tables).

Have a look through this: Database Normalisation and Table Structures as well.

Good luck, and ask whatever questions you need!

Regards,
Scott
Oct 15 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.