These tutorials are very linear in nature, and I urge any first time visitors who are interested in learning how to develop a database in Microsoft Access, to go back to the first post and work your way forward. I have provided a listing of all the tutorials so far in the sidebar on the right to make this easier for you. Don't forget, if you have any questions, I will be more than happy to answer them along the way. You can post a comment at the end of each tutorial, or email me at microsoftaccesstutorials@gmail.com.
So, in our last tutorial we started defining the scope of our database. We went for a virtual tour through the Bobbles 'R' Us store, and asked Bob, the manager, questions along the way. At the end of that tutorial we had three entities (Bobbles, Customers and Staff) and one interaction (Customer Notes) listed, along with attributes for each item. After working your way through this tour, you should have a fair idea of the process behind creating these lists, so I'm not going to bore you with this process any more. At the end of our interview with Bob, the new entities and interactions we have found are as follows...
Sales
Customer
Staff
Date
Total Amount Payable
Payment Method
The Sales table is actually a three way interaction between customer, staff and product (bobble). However, a sale may consist of more than one bobble, which leaves us with a similar problem that we had when creating our Customer Notes table. The solution is also the same, we split the table into two, one that stores the general information about the sale (above), and the details of each sale item, as follows...
Sale Details
Bobble
QTY
Price
Discount
Sale Price
Then we have Suppliers and purchasing information that Bob also wants to track in the database...
Suppliers
Supplier Name
Street Number
Street Name
Suburb
State
Zip Code (Postcode)
Country
Phone
Website
Purchases
Supplier
Date
Invoice #
The setup for the Purchases is similar to the Sales table, as it will probably be multiple items (bobbles) that are being delivered to the store. So once again, we split this table in two
Purchase Details
Bobble
QTY
Price
Discount
Purchase Price
Now we have a complete list of entities and interactions for our database. To recap, they are...
Bobbles
Customers
Staff
Customer Notes
Sales
Sales Details
Suppliers
Purchases
Purchase Details
The next step is to graphically represent the relationships between each of these items. You can do this "old school" by writing each item on a separate piece of paper, and then shuffling them around on your desk until they look just right, or you can use a multitude of computer software and online tools to create the same effect. The diagram shown below was created using a great free online tool called bubbl.us. The end result is called an "entity relationship daigram", and in high end databases, these can become quite a tangled web of links. In our situation, the end result is fairly simplistic...

The direction the arrows point is important in this diagram, as they specify "One to Many" relationships. For example, a customer may have more than one sale, but each sale only relates to the one customer. In some circumstances you may come across a "Many to Many" relationship. For example, the link between Suppliers and Bobbles. If we are to record a list of Bobbles that each Supplier supplies, the direct relationship between Bobbles and Suppliers would be "Many to Many". That is, a supplier supplies more than one type of bobble, and each type of bobble can be supplied by more than one supplier. To fix this issue, we create a linking table called "Supplied Bobbles". This table simply stores a link to the Supplier and a link to the Bobble, like this...

We now have a complete understanding of the structure of our database, and we are going to leave Bob and his store, go back to our computer, and start creating our table structures based around this information, in our next Microsoft Access Tutorial. Stay tuned.





