O'Reilly logo

Discovering SQL: A Hands-On Guide for Beginners by Alex Kriegel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

ORACLE 10G XE

We are using Oracle 10g in this book because this is the latest Oracle Express edition freely available at the time of this writing; the latest commercial release is Oracle 11g. There is no difference in functionality within the scope of this book, and the installation process described here will be identical between these versions.

Installing Library Sample Database with SQL*Plus

  1. Launch Oracle's SQL*Plus utility; Figure A-1 shows the Windows XP menu location.

    images

    FIGURE A-1

  2. At the SQL prompt, type the following statement: @C:\discovery\DiscoveringSQL.Oracle.Library.sql. As shown in Figure A-2, @ instructs SQL*Plus to load and execute scripts contained in the file.

    images

    FIGURE A-2

  3. Figure A-3 shows successful execution of the DDL script and the syntax to load yet another script to populate tables with data.

    images

    FIGURE A-3

  4. Load data into the newly created tables by executing the DiscoveringSQL.Oracle.dat file that contains the INSERT statement. The results are shown in Figure A-4. You can verify that your new Library database tables indeed contain data by executing SELECT statements against them (BOOKS, AUTHORS, and so on; see the database model in Chapter 2 of the book).

    FIGURE ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required