How to Construct the Exercise II (Cont.)

  1. Oracle9i Relational Database Design Relational database design uses either one of the following two methods:

    • Entity-relationship modeling, dividing your database in two logical parts, entities (such as “customer” and “product”) and relations (such as “buys” and “pays for”).

    • Normalization, a series of steps followed to obtain a database design that allows for efficient access and storage of data in a relational database.

  2. Oracle9i Relational Database Implementation (SQL)
    An Example of Oralce9i Database Implementation
    shell> ssh 172.20.4.9
    Password:
    
    Last login: Wed March 05 09:22:29 2008 from shell.cs.und.no
    Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
    
    $ sqlplus userid/password
    
    SQL*Plus: Release 9.2.0.1.0 - Production on Wed March 05 13:50:40 2008
    Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    
    
    SQL> create table  books (
      2    title     varchar(128)  not null,
      3    ISBN      char(12)  primary key,
      4    authors   varchar(128)  not null,
      5    price     number(5,2)   not null  check( price    >= 0.0 ),
      6    quantity  integer       not null  check( quantity >= 0 ) );
    
    Table created.
    
    
    SQL> insert into  books  values ( 'File Structures', '0201874016',
      2    'Michael J. Folk, Bill Zoellick, and Greg Riccardi', 94.80, 182 );
    
    1 row created.
    
     
    SQL> insert into  books  values ( 'Payment Methods for Mobile Commerce', '1591403464', 
      2    'Chung-wei Lee and Weidong Kou', 74.99, 21 ); 
     
    1 row created. 
    
    
    SQL> select  title, price  from  books;
    
    TITLE                                        PRICE
    -------------------------                    ----------------------
    File Structures                              94.8
    Payment Methods for Mobile Commerce          74.99
    
    
    SQL> commit;
    SQL> exit;
    Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    
    $

    Note that this database implementation is only an example and it is not correct for this exercise.
    The italic text with a yellow background color is entered by users.