Chapter 3. Databases

Table of Contents

Creating a database
Defining a simple schema with ODL
Creating and updating objects with the OQL interpreter
Querying objects using the OQL interpreter
Manipulating objects using OQL
Updating the database schema
Adding indexes
Adding constraints
Removing classes and schema

Creating a database

The next step is to create a database to perform our tests.

Before creating a database, you can check that you are authorized to perform this operation, using the eyedbadmin command, as in:

$ eyedbadmin user list
name      : "francois" [strict unix user]

If you are running the eyedbadmin command under the same Unix user as the one used when installing EyeDB, the command output will be a message like the one above, showing that you have superuser priviledge and are thus allowed to create a database.

Creating a database is performed using the eyedbadmin tool, as in (foo is the name of the database):

$ eyedbadmin database create foo

Similarly, deleting a database is performed using the eyedbadmin tool, as in:

$ eyedbadmin database delete foo

where foo is the name of the database.

Checking available databases is done through:

$ eyedbadmin database list --dname

(run without –dname for more details)