home *** CD-ROM | disk | FTP | other *** search
- /*****************************************************************
- Connect to the database
- */
-
- connect "adrs.gdb"
- user "SYSDBA" password "masterkey" ;
-
- /*****************************************************************
- Drop the database
- */
-
- Drop Database ;
-
- /*****************************************************************
- Create a new database
- */
- Create Database "adrs.gdb"
- user "SYSDBA" password "masterkey" ;
-
-
- /*****************************************************************
- Connect to the new database
- */
- connect "adrs.gdb"
- user "SYSDBA" password "masterkey" ;
-
-
- create domain domain_oid as integer not null ;
- create domain domain_type as varchar( 20 ) not null ;
-
- create table Next_OID
- ( next_oid domain_oid ) ;
-
- insert into next_oid
- ( next_oid )
- values
- ( 100 ) ;
-
- create table person
- ( oid domain_oid,
- last_name varchar( 60 ),
- first_name varchar( 60 ),
- title varchar( 10 ),
- initials varchar( 10 ),
- notes varchar( 250 ),
- primary key ( oid )) ;
-
- create table adrs
- ( oid domain_oid,
- owner_oid domain_oid,
- adrs_type domain_type,
- lines varchar( 180 ),
- state varchar( 20 ),
- pcode varchar( 10 ),
- country varchar( 20 ),
- primary key( oid ),
- foreign key( owner_oid ) references person (oid )
- on delete cascade ) ;
-
- create table EAdrs
- ( oid domain_oid,
- owner_oid domain_oid,
- eadrs_type domain_type,
- text varchar( 60 ),
- primary key( oid ),
- foreign key( owner_oid ) references person (oid )
- on delete cascade ) ;
-
-
- insert into person
- ( oid, last_name, first_name, title, initials )
- values
- ( 103, 'Hinrichsen', 'Peter', 'Mr', 'P.W.' ) ;
- insert into person
- ( oid, last_name, first_name, title, initials )
- values
- ( 104, 'Frizel', 'Chris', 'Mr', 'F.' ) ;
- insert into person
- ( oid, last_name, first_name, title, initials )
- values
- ( 105, 'Barnard', 'Cathy', 'Ms', 'C.' ) ;
-
- insert into adrs
- ( oid, owner_oid, adrs_type, lines, state, pcode, country )
- values
- ( 106, 103, 'Postal', 'PO Box 429;Abbotsford', 'VIC', '3066', 'Australia' ) ;
- insert into adrs
- ( oid, owner_oid, adrs_type, lines, state, pcode, country )
- values
- ( 107, 103, 'Business', '23 Victoria Pde;Collingwood', 'VIC', '3066', 'Australia' ) ;
- insert into adrs
- ( oid, owner_oid, adrs_type, lines, state, pcode, country )
- values
- ( 108, 104, 'Business', 'ITEC UK;9a London Road;Bromley', 'Kent', 'BR1 1BY', 'England' ) ;
- insert into adrs
- ( oid, owner_oid, adrs_type, lines, state, pcode, country )
- values
- ( 109, 105, 'Business', 'ITEC UK;9a London Road;Bromley', 'Kent', 'BR1 1BY', 'England' ) ;
-
- insert into EAdrs
- ( oid, owner_oid, eadrs_type, text )
- values
- ( 111, 103, 'Phone: Work', '+ 61 3 9419 6456' ) ;
- insert into EAdrs
- ( oid, owner_oid, eadrs_type, text )
- values
- ( 112, 103, 'Phone: Mobile', '+ 61 418 108 353' ) ;
- insert into EAdrs
- ( oid, owner_oid, eadrs_type, text )
- values
- ( 113, 103, 'Phone: Fax', '+61 3 9419 1682' ) ;
- insert into EAdrs
- ( oid, owner_oid, eadrs_type, text )
- values
- ( 114, 103, 'EMail', 'peter_hinrichsen@techinsite.com.au' ) ;
- insert into EAdrs
- ( oid, owner_oid, eadrs_type, text )
- values
- ( 115, 103, 'Web', 'techinsite.com.au' ) ;
-
- insert into EAdrs
- ( oid, owner_oid, eadrs_type, text )
- values
- ( 116, 104, 'Phone: Work', '+44 181 249 0354' ) ;
-
- insert into EAdrs
- ( oid, owner_oid, eadrs_type, text )
- values
- ( 117, 104, 'Phone: Fax', '+44 181 249 0376' ) ;
-
- insert into EAdrs
- ( oid, owner_oid, eadrs_type, text )
- values
- ( 118, 104, 'EMail', 'chrisf@itecuk.com' ) ;
-
-
- insert into EAdrs
- ( oid, owner_oid, eadrs_type, text )
- values
- ( 123, 105, 'Phone: Work', '+44 181 249 0354' ) ;
-
- insert into EAdrs
- ( oid, owner_oid, eadrs_type, text )
- values
- ( 124, 105, 'Phone: Fax', '+44 181 249 0376' ) ;
-
- insert into EAdrs
- ( oid, owner_oid, eadrs_type, text )
- values
- ( 125, 105, 'EMail', 'cathyb@itecuk.com' ) ;
-
-
-