Contents Index Tutorial: Design and build a simple database Lesson 2: Connect to your database

ASA Getting Started
  Designing and Building Your Database
    Tutorial: Design and build a simple database

Lesson 1: Create a database file


In this lesson, you create a database file to hold your database.

For more information, see The pieces of a database system.

Concepts 

A database file is a container, ready to hold your database. The database file contains system tables and other system objects that are common to all databases, but you must add tables and the data they hold.

The collection of tables, indexes, and so on within the database, and all the relationships between them, make up the database schema. The schema is the database without the data. This tutorial describes how to design and create a very simple database schema.

For a conceptual introduction to some of these pieces, see Relational database concepts.

The name of each object within the database, including tables, columns, and indexes, is an identifier. There are rules governing what you can use as identifiers. You can use any set of letters, numbers, or symbols. However, you must enclose a column name in double quotes if it contains characters other than letters, numbers, or underscores, if it does not begin with a letter, or if it is the same as a keyword.

If the QUOTED_IDENTIFIER database option is set to OFF, double quotes are used to delimit SQL strings and cannot be used for identifiers. However, you can always use square brackets to delimit identifiers, regardless of the setting of QUOTED_IDENTIFIER.

For more information about identifiers, see Identifiers.

Exercise 

To create a new database file

  1. Start Sybase Central.

  2. In the left pane, select the Adaptive Server Anywhere 9 plug-in, then click the Utilities tab in the right pane. In the right pane, double-click Create Database.

    The Create Database wizard opens.

  3. Read the information on the introductory page and click Next.

  4. Select Create A Database On This Computer and click Next.

  5. Choose a location and name for your database file:

  6. Click Finish to create the database.

    Other options are available when creating a database, which you could have viewed by clicking Next instead of Finish, but the default choices are good for many purposes.

    The Creating Database window displays the progress of the task. When the file is created, click OK to close the window.


Contents Index Tutorial: Design and build a simple database Lesson 2: Connect to your database