473,545 Members | 2,679 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Thoughts and Ideas On a Simple Purchase Database

Stang02GT
1,208 Recognized Expert Top Contributor
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
2 1664
Rabbit
12,516 Recognized Expert Moderator MVP
Customer
CustomerID; PK
Name
Address
Phone Number
E-Mail Address
Credit Card Number

Orders
Order Number; PK
Product Number; FK
CustomerID; FK
OrderDate
QuantityOrdered
PriceAtPointInT ime

Products
Product Number; PK
Name
Manufacturer
Model Number
Price
QuantityInStock
Oct 15 '07 #2
Scott Price
1,384 Recognized Expert Top Contributor
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

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

Similar topics

4
1839
by: Wade Eyre | last post by:
Folks, I have a quick question that I would very much appreciate some feedback on. We are a not for profit charity organization that has decided to develop a software in-house to manage our volunteers. We have SQL and that makes the most sense from a database solution but we have some issues surrounding the choice of the development language....
6
2055
by: freakyfreak | last post by:
Does anyone have any basic, simple scripts of sp's that I can give my computer operators to use to monitor for serious conditions on our sql servers? We are new in the ms-sql arena, a small shop and we cant really purchase any tools to monitor these servers, but we need some basic checks that we can use to make sure a server is performing in a...
4
278
by: Varun | last post by:
Hi I am interested in purchasing visual studio.Net for my company. i just have a few questions that i hope anyone could help me on I will mainly be using it to develop web applications. What i wanted to know is what version i would require? I have seen there is a enterprise architecture, professional, standard etc. I dont really know the...
13
2336
by: LRW | last post by:
Having a problem getting a onSubmit function to work, to where it popsup a confirmation depending on which radiobutton is selected. Here's what I have: function checkdel() { if (document.getElementById"].value=='1') { confirm('Are you sure you want to delete this file?'); } } ......
1
1841
by: Lloyd Stevens | last post by:
CustomerTable CustomerTarrifTable TarrifTable WarrantTable *CustomerID CustomerID ProductName *WarrantID BoatType *CustomerTarrifID TarrifRate WarrantDate CustomerName TarrifNo *TarrifNo TarrifNo QuantitySold quantityPurchas CIF CIF Relationships ...
5
7227
by: Rob Somers | last post by:
Hey all I am writing a program to keep track of expenses and so on - it is not a school project, I am learning C as a hobby - At any rate, I am new to structs and reading and writing to files, two aspects which I want to incorporate into my program eventually. That aside, my most pressing problem right now is how to get rid of the newline...
5
1094
by: Jay King | last post by:
I have a program that needs to keep records in a table format somewhat like the one below # date message server author 1 06032004 AbCDEFABAC irc.winbeta.org matt So lets pretend I don't know anything about databases, What is my first step? I want to use something free, so I'm thinking MySQL? Most importantly this program is NOT...
6
2026
by: Jim M | last post by:
I've been distributing a fairly mature, very specific MS Access application to end users in small offices of colleges for several years now. This is a part-time venture and low volume operation- this is somewhat of a hobby for me. Many of my end users are computer phobic and get little support from their IT departments. It is a split database...
1
1400
Stang02GT
by: Stang02GT | last post by:
Hello, I'm looking for your thoughts, ideas, and suggestions on this situation. I have recently been given the task to "fix" a menu within the companies intranet site. The current menu operates such that when you place your mouse over a category in the menu, a sub menu will then appear. Some sub menu's go into a third submenu. Management...
0
7496
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7428
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7685
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7452
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6014
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5354
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5071
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1039
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
738
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.