SQL Developer Tutorial: Creating Objects for a Small Database

In this tutorial, you will use SQL Developer to create objects for a simplified library database, which will include tables for books, patrons (people who have library cards), and transactions (checking a book out, returning a book, and so on).


Note:

Many other SQL Developer tutorials are available. For information, see the Start Page (click Help, then Start Page, then the Get Started tab if it is not already visible), especially the Tutorials and Online Demonstrations.

The tables are deliberately oversimplified for this tutorial. They would not be adequate for any actual public or organizational library. For example, this library contains only books (not magazines, journals, or other document formats), and it can contain no more than one copy of any book.

You will perform the following major steps:

  1. Create a Table (BOOKS).

  2. Create a Table (PATRONS).

  3. Create a Table (TRANSACTIONS).

  4. Create a Sequence.

  5. Insert Data into the Tables.

  6. Create a View.

  7. Create a PL/SQL Procedure.

  8. Debug a PL/SQL Procedure (optional).

  9. Use the SQL Worksheet for Queries (optional).


Note:

To delete the objects that you create for this tutorial, you can use the DROP statements at the beginning of the script in Script for Creating and Using the Library Tutorial Objects.

This tutorial assumes that you have a database connection to a database user that will own the tables and other objects that you create.

To print this tutorial, right-click its book icon in the Help Contents display and select Print Topic Subtree.

Related Topics

Script for Creating and Using the Library Tutorial Objects

SQL Developer Concepts and Usage

SQL Developer User Interface

Database Objects