Basic Structures Few things are harder to put

Basic Structures Few things are harder to put up with than the annoyance of a good example Mark Twain 1

Basic structures One entity Two entities Relationship descriptors as identifiers A tree structure 2

One entity No relationships personid attribute 1 attribute 2 … 3

One entity A 1: 1 recursive relationship personid attribute 1 attribute 2 … spouse 4

One entity A recursive 1: m relationship personid attribute 1 attribute 2 … father 5

One entity A recursive m: m relationship personid attribute 1 attribute 2 … personid 2 attribute 3 attribute 4 friendship personid 1 … 6

Two entities A 1: 1 relationship department deptid deptattrib 1 deptattrib 2 … empattrib 1 empattrib 2 … bossno employee empid 7

Two entities A 1: m relationship nation natcode natname exchrate stkfirm stkprice stock stkcode stkqty stkdiv stkpe natcode 8

Two entities An m: m relationship book callno isbn booktitle … … callno borrowerid … copy bookno duedate borrowerid 9

Relationship descriptors as identifiers A dependent entity region regname regtype regpop regarea … citypop cityarea … regname cityname 10

Relationship descriptors as identifiers An associative entity cityname … storestreet storezip … cityname firmstreet firmzip … firmname 11

A tree structure firmname … division divname … firmname … divname firmname … deptname divname department deptname sectionid firmname 12

Recursive tree unitid attribute 1 … superunitid 13

Key points There a few basic structures All data models are constructed from these basic structures 14
- Slides: 14