next up previous
Next: Integrity Constraints Up: RELATIONAL MODEL OF DATA Previous: Terminology

Sample Database Instance

customers
CID  CNAME         CITY                     DISCNT
---- ------------- -------------------- ----------
c001 Tiptop        Duluth                       10
c002 Basics        Dallas                       12
c003 Allied        Dallas                        8
c004 ACME          Duluth                        8
c006 ACME          Kyoto                         0

agents
AID ANAME         CITY                    PERCENT
--- ------------- -------------------- ----------
a01 Smith         New York                      6
a02 Jones         Newark                        6
a03 Brown         Tokyo                         7
a04 Gray          New York                      6
a05 Otasi         Duluth                        5
a06 Smith         Dallas                        5

 
products
PID PNAME         CITY                   QUANTITY      PRICE
--- ------------- -------------------- ---------- ----------
p01 comb          Dallas                   111400         .5
p02 brush         Newark                   203000         .5
p03 razor         Duluth                   150600          1
p04 pen           Duluth                   125300          1
p05 pencil        Dallas                   221400          1
p06 folder        Dallas                   123100          2
p07 case          Newark                   100500          1

orders
ORDNO MON CID  AID PID        QTY    DOLLARS
----- --- ---- --- --- ---------- ----------
 1011 jan c001 a01 p01       1000        450
 1012 jan c001 a01 p01       1000        450
 1019 feb c001 a02 p02        400        180
 1017 feb c001 a06 p03        600        540
 1018 feb c001 a03 p04        600        540
 1023 mar c001 a04 p05        500        450
 1022 mar c001 a05 p06        400        720
 1025 apr c001 a05 p07        800        720
 1013 jan c002 a03 p03       1000        880
 1026 may c002 a05 p03        800        704
 1015 jan c003 a03 p05       1200       1104
 1014 jan c003 a03 p05       1200       1104
 1021 feb c004 a06 p01       1000        460
 1016 jan c006 a01 p01       1000        500
 1020 feb c006 a03 p07        600        600
 1024 mar c006 a06 p01        800        400



Raj Sunderraman
Tue Apr 1 16:15:10 PST 1997