Contents / Previous / Next


Relational DB Concepts and Vocabulary

Relational Database Management System (RDBMS)
RDBMS manage data stored in relations.

Relation = Table = Data Array = Entity Set
A relation is essentially a mathematical term for table.
Imagine two tables with data and a third table=relation that combines the tables.
A table is a two-dimensional data array consisting of rows and colums.
The notion of storing data in tables might seem obvious, but there are a number of other ways of organizing DBs, e.g., hierarchical or object-oriented.

Column (Spalte) = Table-Column = Attribute = Field = Data-Field
Each column is named, e.g., name, phone number, price and assigned a data type, e.g., INTEGER, DATE, FLOAT.
Columns in a given table have a fixed order in each row.

Row (Zeile) = Record = Tuple = Entity = Data-Set
This is where the "real" data is. Each row of a given table has the same set of named columns.
The order of rows is arbitrary, it may be specified for display.

Domain
A set of possible values for an attribute (the type of the attribute).

Databases (DB)
Tables are grouped into DBs. A DB is the whole set of tables that make up all relevant data for a project or system.

Cluster
A collection of DBs (managed by a single PostgreSQL server which forks an instance for each DB connection).

Key and Primary Key and Foreign Key
Attribute that uniquely distinguishes between all tuples e.g., client ID. One table may have one primary key. A foreign key is a key for a table that is stored in an other table.
A weak entity set does not have a primary key, it can be formed by taking the primary key of the strong entity set on which its existence depends.
Keys can be used to build relations between table.

Index
Mapping of an attribute on for example a tree structure to accelerate search, sorting, etc bases on that attribute.
An index is not a key and a key is not an index! But you can put an index on a key attribute!

Integrity, Consistency and Redundancy of the Data
Data (or information) that can be concluded from other available data is redundant. Consistency means there is no contradiction in the data. Integrity includes contradiction free data plus completeness (no empty fields where a value is mandatory).