Show TOC

Procedure documentationDemo Data for the SQL Tutorial Locate this document in the navigation structure

 

The demo data for the SQL Tutorial represents an extremely basic hotel administration system with information on the hotel’s visitors, location, vacancies, room prices, and so on. The basic demo data is sufficient for you to understand all the examples in this SQL Tutorial.

Note Note

You can change the basic demo data to suit your needs. However, your results may then deviate from the example results given in this tutorial.

End of the note.

Prerequisites

  1. Install the database software and tools. To do so, proceed as described in your installation documentation. For more information, see Glossary, Installation.

  2. Create the demo database DEMODB. Do NOT load all of the demo data. You can use Database Studio or Installation Manager to create the demo database (See also: Glossary, Installation Manager).

    Database Studio, Creating the Database

Procedure

You can use a number of tools to execute the SQL statements (Database Studio, SQLCLI, Loader etc.).

Creating the MONA database user

The following sections describe how to enter the SQL statements for creating the database user MONA with the Database Studio.

  1. Log on to the demo database DEMODB as a database system administrator using the Database Studio (Logging on to a Database). If you transferred the default values when creating the demo database DEMODB, the database system administrator will contain the following user data: name of the database system administrator: DBADMIN, password: SECRET

  2. Use the Database Studio to create the database user MONA with the following SQL statement (Working with SQL Statements: Overview):

    CREATE USER mona PASSWORD red DBA NOT EXCLUSIVE

Creating the HOTEL demo schema along with its data

The following sections explain how to execute the SQL statements specified for the HOTEL demo schema for creating the database objects and their contents (basic demo data) with the Database Studio.

  1. Log on to the demo database DEMODB as the database user MONA with the password RED using the Database Studio (Logging on to a Database).

  2. Create the HOTEL demo schema and the required tables and fill these with values using the Database Studio (Entering and Executing SQL Statements). Use the SQL statements as specified in SQL Statements for the HOTEL Demo Schema to create the basic demo data.

Result

The database user MONA has been created in the demo database DEMODB as a database administrator (DBA) with the password RED. The database administrator MONA can open several database sessions at once (NOT EXCLUSIVE). The HOTEL demo schema has been created. A series of simply-structured tables have been assigned to the HOTEL demo schema. The tables are filled with basic demo data.

Note Note

If you want to learn to administer databases using the DEMODB or test SQL statements or Loader commands using existing demo data, you can load the complete set of demo data into the database DEMODB by executing specified scripts. To load the complete demo data in this case, select the corresponding Load Tutorial option when creating a database in the Installation Manager or in the Database Studio.

End of the note.