Skip to main content

Database Example

Here is an example of a database with two tables. This example represents a trip to the supermarket! The first table, PURCHASES, represents the items the customers are buying and the second table, PRODUCT, contains details of the items.

We can see several facts regarding this database:

  • There are three customers in the store at the moment (note the three transaction numbers)
  • Customers are buying a different number of items
  • In order to produce the customer's till receipt we need to use both of the tables
  • The tables both contain Product Code

Next: Database Queries