|
|
|
|
|
1) INTRODUCTION :
This is a Beginner's Guide to Data Modelling - Cartoon Style, following the great example set by the
Manga Guide to Databases.
Here's the front cover of the Manga book
and the first page to show you what the cartoon approach looks like in practice (Click on each one to see a larger picture).
|
2) GETTING STARTED :
[Dimple] : Toby, I'm hungry, what can we get here ?
[Toby] : Lots of things, Dimple - like Coffee, Muffins and Paninis.
let's go inside and take a look ...
|
|
|
3) BASICS
[Dimple] That's great - I can have my favourite Caramel Machiatto and Mozzarella Panini !!!
[Toby] And we can draw little boxes to start our Data Model.
|
4) PLACING AN ORDER :
[Dimple] : What do we do ?
[Toby] : Place an order with the Barista behind the counter.
[Dimple] : Now we are Customers - hurrah !!!
|
|
|
5) COFFEE AND PANINI ARE JUST PRODUCTS :
[Dimple] : So many things to choose from, I can't get my head around it !!!
[Toby] : We can group things together in a way that reflects their basic structure.
[Dimple] : That sounds good, Toby, but I don't know what it means.
[Toby] : Well, Dimple, we can call everything a Product and then we just have different types of Products.
[Dimple] : OK, Toby, but what about Customers like us and their Orders ?
|
6) CUSTOMERS, PRODUCTS AND ORDERS :
[Dimple] : Toby, please remind me where we have got to.
[Toby] : Well, Dimple, right now, we know about Customers, Orders and Products, including examples of Products, like Coffee and Panini.
This picture tells us what we know.
[Dimple] : But Toby, it just shows some boxes on a page. What does it all mean ?
[Toby] : Well, Dimple, at this point, we can show how all these boxes are related, and that is a very big step, because it takes us to the idea of 'Relationships'.
|
|
|
7) RELATIONSHIPS :
[Toby] : Dimple, I have put some lines in the picture
[Dimple] : Toby, I don't understand them, please tell me what's going on
[Toby] : The lines are called Relationships, and in English, we would say, for example :-
"Customers place Orders, and an Order can have a number of things, like Coffee and Paninini."
"Coffee and Panininis are examples of Products.
These lines are very inmportant in Data Modelling, and we have now created our first Entity-Relationship Diagram or "ERD".
There Relationships are usually One-to-Many.
For example, One Customer can place many Orders (of course, not at the same time).
Also one Product can appear on many Orders.
|
8) HOW TO IDENTIFY MY ORDER :
[Dimple] : Toby, with so many Customer and Orders, how do they keep track of my Order ?
[Toby] : Well, Dimple, they have a separate piece of paper for your Order and on that piece of paper, they can write down a number which is unique and special for you.
[Dimple] : OK, that sounds sensible. And do they use this is a Database ?
[Toby] : The Database will automatically a new unique Identifier for your Order.
|
|
9) PLEASE EMAIL ME
I hope you have found this Tutorial fun and useful.
I would be very pleased if you could
email me with your questions or suggestions.
We have covered the following Topics :-
- Identifiers
- One-to-Many Relationships
- Many-to-Many Relationships
In the next one, we will cover :-
- Primary Keys
- Foreign Keys
- Hierarchies
- Inheritance
- Reference Data
Barry Williams
Principal Consultant
Database Answers Ltd.
London, England
|
|
|
|
© DatabaseAnswers.org 2009
|