Relational Database Glossary

Table 23-5 is a glossary of terms that you can review and refer to as necessary. There are a few terms in here that appear later in the chapter.

Table 23-5. Relational database glossary

Name

Description

attribute

A column in a table, e.g., the “Name” attribute.

cardinality

The number of rows in a relation.

database integrity

You maintain database integrity by grouping statements in a “transaction” that is either executed as a whole, or has no part of it executed.

degree

The number of columns in a table.

domain

The set of permissible values for an attribute.

entity integrity

The requirement that key attributes never contain a null.

first normal form

A table in which no attributes have lists of data items.

foreign key

The attribute or group of attributes in one table that form a primary key for some other table.

join

An operation that combines the data in two or more tables by using foreign keys in the first table to access related data in a subsequent table. This is an “inner join” or “equijoin”.

prepared statement

An SQL statement which is cached in native code form to allow faster processing.

primary key

The attribute or group of attributes that together uniquely identify a record in a table.

referential integrity

The requirement that all foreign keys are present in the table where they are a primary key.

relation

A table in a relational database. It corresponds to a file of records.

relational database

A collection of relations in third normal form.

second normal form

A table is in second normal from when it is in first normal form and also every non-key attribute depends on the primary key.

stored procedure

A group of related SQL statements, which are kept in precompiled form inside the database, and can be invoked just like a method call.

third normal form

A table is in third normal form when it is in second normal form and also all non-key attributes are independent of each other.

trigger

A trigger is an SQL statement that is stored in the database, and that executes automatically when a specified event occurs in the database, such as a column update. It will usually be some kind of automatic delete, insert, or update of some other attribute.

tuple

A tuple is a row of related data in a table. It is essentially a record of related data.

Once we have our tables, SQL is the language we use to access and process them. The JDBC library is a way of connecting to a database, shipping it SQL statements, and getting back the results in a form that Java can process. We will shortly present a primer on SQL, showing the highlights of the language for those who have never seen it before. First we need to download the open source Mckoi database, which includes a GUI tool for submitting SQL queries.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.36.146