

System Information
========================================================================

generated by                              SchemaCrawler 16.24.3         
generated on                              2024-12-28 16:23:25           
database version                          HSQL Database Engine 2.7.4    
driver version                            HSQL Database Engine Driver 2.7.4



Tables
========================================================================



PUBLIC.BOOKS.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)                 
                                    default 'USA'               

Primary Key

                                                           [primary key]
  ID                                                            

Foreign Keys

                                           [foreign key, with no action]
  ID <--(0..many) PUBLIC.BOOKS.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

TRG_AUTHORS                                                    [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                                                      



PUBLIC.BOOKS.AUTHORSLIST                                          [view]
------------------------------------------------------------------------
  ID                                INTEGER                     
  FIRSTNAME                         VARCHAR(20)                 
  LASTNAME                          VARCHAR(20)                 



PUBLIC.BOOKS.BOOKAUTHORS                                         [table]
------------------------------------------------------------------------
Relationship between books and their authors, 
along with the latest updated information
  BOOKID                            INTEGER NOT NULL            
  AUTHORID                          INTEGER NOT NULL            
  SOMEDATA                          VARCHAR(30)                 

Foreign Keys

                                           [foreign key, with no action]
  AUTHORID (0..many)--> PUBLIC.BOOKS.AUTHORS.ID                              

                                           [foreign key, with no action]
  BOOKID (0..many)--> PUBLIC.BOOKS.BOOKS.ID                              

Indexes

                                                      [non-unique index]
  AUTHORID                          ascending                   

                                                      [non-unique index]
  BOOKID                            ascending                   

                                                          [unique index]
  BOOKID                            ascending                   
  AUTHORID                          ascending                   

Table Constraints

                                                      [check constraint]
  BOOKID                                                        

                                                      [check constraint]
  AUTHORID                                                      



PUBLIC.BOOKS.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) PUBLIC."PUBLISHER SALES".SALES.BOOKID                              

                                           [foreign key, with no action]
  ID <--(0..many) PUBLIC.BOOKS.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                                                   



PUBLIC.BOOKS."Celebrities"                                       [table]
------------------------------------------------------------------------
  "Id"                              INTEGER NOT NULL            
  NAME                              VARCHAR(20)                 

Primary Key

                                                           [primary key]
  "Id"                                                          

Foreign Keys

                                           [foreign key, with no action]
  "Id" <--(0..1) PUBLIC.BOOKS."Celebrity Updates"."Celebrity Id"                              

Indexes

                                                          [unique index]
  "Id"                              ascending                   

Table Constraints

                                                      [check constraint]
  "Id"                                                          



PUBLIC.BOOKS."Celebrity Updates"                                 [table]
------------------------------------------------------------------------
  "Celebrity Id"                    INTEGER NOT NULL            
  "UPDATE"                          VARCHAR(20)                 

Primary Key

                                                           [primary key]
  "Celebrity Id"                                                

Foreign Keys

                                           [foreign key, with no action]
  "Celebrity Id" (0..1)--> PUBLIC.BOOKS."Celebrities"."Id"                              

Indexes

                                                          [unique index]
  "Celebrity Id"                    ascending                   

                                                      [non-unique index]
  "Celebrity Id"                    ascending                   

Table Constraints

                                                      [check constraint]
  "Celebrity Id"                                                



PUBLIC.BOOKS.COUPONS                                             [table]
------------------------------------------------------------------------
  ID                                INTEGER NOT NULL            
  DATA                              CLOB                        
  COUPONS                           INTEGER ARRAY               
                                    default ARRAY[]             
  BOOKS                             VARCHAR(20) ARRAY[10]       

Primary Key

                                                           [primary key]
  ID                                                            

Indexes

                                                          [unique index]
  ID                                ascending                   

Table Constraints

                                                      [check constraint]
  ID                                                            



PUBLIC.BOOKS.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                                                            



PUBLIC.BOOKS.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                                                      



PUBLIC.BOOKS.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) PUBLIC.BOOKS.ΒΙΒΛΊΑ.ΕΚΔΌΤΗΣ                              

Indexes

                                                          [unique index]
  ID                                ascending                   



PUBLIC.BOOKS.ΒΙΒΛΊΑ                                              [table]
------------------------------------------------------------------------
  ΜΟΝΑΔΙΚΌΣ                         SMALLINT NOT NULL           
  ΤΊΤΛΟΣ                            VARCHAR(255) NOT NULL       
  ΠΕΡΙΓΡΑΦΉ                         VARCHAR(255)                
  ΕΚΔΌΤΗΣ                           SMALLINT NOT NULL           

Primary Key

                                                           [primary key]
  ΜΟΝΑΔΙΚΌΣ                                                     

Foreign Keys

                                           [foreign key, with no action]
  ΕΚΔΌΤΗΣ (0..many)--> PUBLIC.BOOKS.PUBLISHERS.ID                              

Indexes

                                                      [non-unique index]
  ΕΚΔΌΤΗΣ                           ascending                   

                                                          [unique index]
  ΜΟΝΑΔΙΚΌΣ                         ascending                   

Table Constraints

                                                      [check constraint]
  ΜΟΝΑΔΙΚΌΣ                                                     

                                                      [check constraint]
  ΤΊΤΛΟΣ                                                        

                                                      [check constraint]
  ΕΚΔΌΤΗΣ                                                       



PUBLIC."PUBLISHER SALES".REGIONS                                 [table]
------------------------------------------------------------------------
  CITY                              VARCHAR(50) NOT NULL        
  STATE                             VARCHAR(2) NOT NULL         
  POSTALCODE                        VARCHAR(10) NOT NULL        
  COUNTRY                           VARCHAR(50) NOT NULL        

Primary Key

                                                           [primary key]
  POSTALCODE                                                    
  COUNTRY                                                       

Foreign Keys

                                           [foreign key, with no action]
  POSTALCODE <--(0..many) PUBLIC."PUBLISHER SALES".SALES.POSTALCODE                              
  COUNTRY <--(0..many) PUBLIC."PUBLISHER SALES".SALES.COUNTRY                              

Indexes

                                                          [unique index]
  POSTALCODE                        ascending                   
  COUNTRY                           ascending                   

Table Constraints

                                                      [check constraint]
  CITY                                                          

                                                      [check constraint]
  STATE                                                         

                                                      [check constraint]
  POSTALCODE                                                    

                                                      [check constraint]
  COUNTRY                                                       



PUBLIC."PUBLISHER SALES".SALES                                   [table]
------------------------------------------------------------------------
  POSTALCODE                        VARCHAR(10) NOT NULL        
  COUNTRY                           VARCHAR(50) NOT NULL        
  BOOKID                            INTEGER                     
  COUPON_ID                         INTEGER                     
  PERIODENDDATE                     DATE                        
  TOTALAMOUNT                       DOUBLE(64, 0)               
  SALESDATAID                       INTEGER                     

Foreign Keys

                                           [foreign key, with no action]
  BOOKID (0..many)--> PUBLIC.BOOKS.BOOKS.ID                              

                                           [foreign key, with no action]
  SALESDATAID (0..many)--> PUBLIC."PUBLISHER SALES".SALESDATA.SALESDATAID                              

                                           [foreign key, with no action]
  POSTALCODE (0..many)--> PUBLIC."PUBLISHER SALES".REGIONS.POSTALCODE                              
  COUNTRY (0..many)--> PUBLIC."PUBLISHER SALES".REGIONS.COUNTRY                              

Indexes

                                                      [non-unique index]
  BOOKID                            ascending                   

                                                      [non-unique index]
  SALESDATAID                       ascending                   

                                                      [non-unique index]
  POSTALCODE                        ascending                   
  COUNTRY                           ascending                   

Table Constraints

                                                      [check constraint]
  POSTALCODE                                                    

                                                      [check constraint]
  COUNTRY                                                       



PUBLIC."PUBLISHER SALES".SALESDATA                               [table]
------------------------------------------------------------------------
  SALESDATAID                       INTEGER                     
  YEARLYAMOUNT                      DOUBLE(64, 0)               

Foreign Keys

                                           [foreign key, with no action]
  SALESDATAID <--(0..many) PUBLIC."PUBLISHER SALES".SALES.SALESDATAID                              

Indexes

                                                          [unique index]
  SALESDATAID                       ascending                   

Table Constraints

                                                     [unique constraint]
  SALESDATAID                                                   



Routines
========================================================================



PUBLIC.BOOKS.NEW_PUBLISHER                        [procedure, no result]
------------------------------------------------------------------------
  PUBLISHER                         CHARACTER VARYING, out      



PUBLIC.BOOKS.NEW_PUBLISHER                        [procedure, no result]
------------------------------------------------------------------------
  NEWPUBLISHER                      CHARACTER VARYING, in       
  PUBLISHER                         CHARACTER VARYING, out      



PUBLIC.BOOKS.CUSTOMADD               [function, does not return a table]
------------------------------------------------------------------------
  ONE                               INTEGER, in                 



PUBLIC.BOOKS.CUSTOMADD               [function, does not return a table]
------------------------------------------------------------------------
  ONE                               INTEGER, in                 
  TWO                               INTEGER, in                 



Sequences
========================================================================



PUBLIC.BOOKS.PUBLISHER_ID_SEQ                                 [sequence]
------------------------------------------------------------------------
  increment                         1                           
  start value                       1                           
  minimum value                     -2147483648                 
  maximum value                     2147483647                  
  cycle                             false                       

