System Information

generated by SchemaCrawler 16.21.2
generated on 2024-04-21 12:40:55

 

 

Tables

AUTHORS [table]
Contact details for book authors
ID INTEGER NOT NULL
FIRSTNAME VARCHAR(20) NOT NULL
LASTNAME VARCHAR(20) NOT NULL
ADDRESS1 VARCHAR(255)
ADDRESS2 VARCHAR(255)
CITY VARCHAR(50)
STATE CHARACTER(2)
POSTALCODE VARCHAR(10)
COUNTRY VARCHAR(50)
Primary Key
[primary key]
ID
Foreign Keys
[foreign key, with no action]
ID ←(0..many) BOOKAUTHORS.AUTHORID
Indexes
[unique index]
ID ascending
[non-unique index]
LASTNAME ascending
FIRSTNAME ascending
[non-unique index]
CITY ascending
STATE ascending
POSTALCODE ascending
COUNTRY ascending
Triggers
[trigger]
after delete, per row
[action statement]
UPDATE BOOKS.PUBLISHERS SET PUBLISHER='Jacob'WHERE PUBLISHER='John'
Table Constraints
[check constraint]
STATE
[check constraint]
ID
[check constraint]
FIRSTNAME
[check constraint]
LASTNAME

 

BOOKS [table]
Details for published books
ID INTEGER NOT NULL
Unique (internal) id for book
TITLE VARCHAR(255) NOT NULL
Book title
DESCRIPTION VARCHAR(255)
Book description (Usually the blurb from the book jacket or promotional materials)
PUBLISHERID INTEGER NOT NULL
Foreign key to the book publisher
PUBLICATIONDATE DATE
Book publication date
PRICE DOUBLE(64, 0)
Current price for the book
PREVIOUSEDITIONID INTEGER
Primary Key
[primary key]
ID
Foreign Keys
[foreign key, with no action]
ID ←(0..many) SALES.BOOKID
[foreign key, with no action]
ID ←(0..many) BOOKAUTHORS.BOOKID
[foreign key, with no action]
ID ←(0..1) PREVIOUSEDITIONID
Indexes
[unique index]
ID ascending
[unique index]
PREVIOUSEDITIONID ascending
[non-unique index]
PREVIOUSEDITIONID ascending
Table Constraints
[unique constraint]
PREVIOUSEDITIONID
[check constraint]
ID
[check constraint]
TITLE
[check constraint]
PUBLISHERID

 

COUPONS [table]
ID INTEGER NOT NULL
DATA CLOB
COUPONS INTEGER ARRAY
BOOKS VARCHAR(20) ARRAY[10]
Primary Key
[primary key]
ID
Indexes
[unique index]
ID ascending
Table Constraints
[check constraint]
ID

 

CUSTOMERDATA [table]
ID INTEGER NOT NULL
DATA VALID_STRING(20)
Primary Key
[primary key]
ID
Indexes
[unique index]
ID ascending
Table Constraints
[check constraint]
ID

 

CUSTOMERS [table]
ID INTEGER NOT NULL
FIRSTNAME NAME_TYPE NOT NULL
LASTNAME NAME_TYPE NOT NULL
AGE AGE_TYPE
Primary Key
[primary key]
ID
Indexes
[unique index]
ID ascending
Table Constraints
[check constraint]
ID
[check constraint]
FIRSTNAME
[check constraint]
LASTNAME

 

PUBLISHERS [table]
List of book publishers
ID INTEGER NOT NULL
auto-incremented
Unique (internal) id for book publisher
PUBLISHER VARCHAR(255)
Name of book publisher
Primary Key
[primary key]
ID
Foreign Keys
[foreign key, with no action]
ID ←(0..many) ΒΙΒΛΊΑ.ΕΚΔΌΤΗΣ
Indexes
[unique index]
ID ascending