Tutorial on Database Schema - Slide 4 - Enter Starbucks

Back   Next Slide

  1. Enter Starbucks
    • Starbucks offers Products
    • Customers can Order, for example, Coffee and Something to Eat

Our motto - Keep It Simple and Straightforward (KISS)
We are starting in a simple way with this diagram which shows two Entities without a Relationship.
The Relationship between them is established in the next diagram, when the meaning of the 'PK' and 'FK' will be explained.

Products
I want to convey to you the value of seeing the real world as a Database Schema.
It's always very interesting and adds a challenge as you walk or drive around and
think about how you would create a Database Schema for the real world that you can see around you.
  • Let's say we go into Starbucks to get a coffee and something to eat.
  • At this point, Starbucks doesn't know us as a Customer.
  • Also we might be doing the office coffee run, amd maybe we have with us our Order on a piece of paper.
  • These two 'Things of Interest', Products and Customer_Orders, are not related until we give our Order.
  • Data Modellers commonly describe a Database Schema as an Entity-Relationship-Diagram, or ERD.
  • The word 'Relationship' is therefore very important.
  • However, at this point, we haven't established a Relationship between the Products and the Customer_Orders.
  • We will do that in the next slide.



    © DataBaseAnswers.org 2006