28.06.2013 Views

Papers in PDF format

Papers in PDF format

Papers in PDF format

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Indexes, Keys:<br />

these tables def<strong>in</strong>e the <strong>in</strong>dexes created on application tables and the columns <strong>in</strong>volved.<br />

Let us take a look at how the SQL statements from the music database application are translated by the RDBMS <strong>in</strong>to<br />

system catalog entries. If the database Music has already been created by the user Smith the catalog table Database<br />

conta<strong>in</strong>s (among others) the follow<strong>in</strong>g entry:<br />

The creation of a new table results <strong>in</strong> an entry be<strong>in</strong>g added to the catalog table Tables:<br />

For each columns of the newly created table, an entry is added to the catalog table Columns (for simplicity we omit the<br />

creator name <strong>in</strong> the follow<strong>in</strong>g):<br />

The primary key declaration and the <strong>in</strong>dex creation cause the tables Indexes and Keys to conta<strong>in</strong> the follow<strong>in</strong>g entries:<br />

In the application table Piece the field ComposerID is a foreign key referenc<strong>in</strong>g entries <strong>in</strong> the table Composer. The<br />

declaration ``FOREIGN KEY...'' means that the entries <strong>in</strong> the column ComposerID relate to entries <strong>in</strong> the Table<br />

Composer; the relationship has been given the name ``by''. This relationship name is entered <strong>in</strong>to the catalog table<br />

Relationships by the RDBMS:<br />

To keep track of the columns tak<strong>in</strong>g part <strong>in</strong> the reference, entries <strong>in</strong>to the catalog table Foreignkeys are added. In this<br />

case, there is only one correspond<strong>in</strong>g row:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!