Relational Database | Part 1

Relational Database | Part 1

Using The Relational Database

A relational database is used for electronic data management in computer systems and is based on the relational database model. This was proposed in 1970 by Edgar F. Codd first time and is still, despite some criticism, as an established standard for databases.

The associated database management system is called a relational database management system, or RDBMS (Relational Database Management System). To query and manipulate the data predominantly the database language SQL (Structured Query Language) is used.

Basis of the concept of relational databases is the relation, in a sense of well-defined mathematical concept. It represents a mathematical description of a table, see database relation. Operations on these routes are determined by the relational algebra. The relational algebra is thus the theoretical basis of SQL.

Despite the math and abstract definition of the database model relational databases to handle relatively simple and flexible. This had great impact on the success of database technology.

Relational Database – Basic concepts

A relational database can be thought of as a collection of tables (the relations), which are stored in records. Each row (tuple) in one table is a record (record). Each tuple is a set of attribute values (attributes = attributes), the columns of the table. The relation schema specifying, in the number and type of attributes for a relation. The picture illustrates the relation R with attributes A1 to An in the columns.

For example, one book at a library by the record (book-id, author, publisher, publishing year, title, date of recording will be described). A record must be clearly identifiable. This takes about one or more keys (English Key). In this case book contains the key ID. A key must never change. It relates to the record and not on the position in the table.

Relations between tables

Furthermore, links are used to express the relationships between tables. A library database could therefore be implemented as follows:

Table books, which contains one row for each book:

  • Each line consists of the columns of the table (attribute): book ID, author, publisher, publishing year, title, date of recording.
  • The key is the book ID, because it marks any book unmistakably.

The entry (10.3) would be called so that the user has with the ID 10 (“Hans bookworms’) the book with the ID3 (“My life with Asterix). The same user also has the book “Borrowed Printing Made Easy”, which is evidenced by the table entry (10, 2). The key one here takes the attribute set (user-ID, book ID). At the same time connects the user ID each entry in the table Item out with an entry in the table users, and the book ID Item out of each entry with an entry of the table combines books. Therefore, these attributes mean in this context, foreign key (English foreign key).


In addition to the relational database model, there are several alternative approaches, which allow data to manage in other structures. These concepts often have only a minor importance or not yet enforced. Nevertheless, they provide an easier access for certain applications of the data to be managed.

Older approaches

In the 60s and 70s for operational data processing hierarchical database systems and network database systems were used. These are the data or table structure defined in the draft stage and may not vary with the query. They come in special cases, also still in use today.

Object oriented databases

With the advent of object-oriented programming languages object databases have been increasingly offered. This allows objects from OO languages like Java are held directly in the database – a mapping of objects to the relational table structure, the object-relational mapping is then no longer necessary. This approach has advantages over the relational design if you want to store complex data objects that can be mapped only heavy on the flat relational table structures.

Object databases have, however, still disadvantages to relational databases with the processing of large amounts of data. This is caused for example by access paths to objects on multiple levels (example, inheritance and association). This results in write operations to the lock management at an exponential complexity and thus leads to poor performance. The performance issues were addressed in the object-relational databases in which only the constructs of object-oriented databases with lower complexity (eg n * log (n)) were taken.

Object-relational databases

Some providers add their relational databases, object-oriented properties and then call these object-databases. However, these are not provided for the direct imaging of objects in the programming language – they are just using the concept of inheritance to simplify the definition and query of tables with similar field structures and thus their use. The SQL-99 standard was extended to object-language elements.

Semi-structured databases

New concepts are the semi-structured databases. They differ from the traditional database model is that they do not have a fixed predetermined scheme. The database is hierarchically structured as a tree, and each database unit (English Entity) of the same type can have different sets of attributes.

Typical representative of this type are XML databases that manage the data as XML fragments. The XML data is hierarchically organized here and can contain any structure as long as they are well formed according to XML definition. The data can be queried using XQuery or XPath. Manipulation are now used proprietary language extensions. Disadvantage of current XML databases is in comparison to relational systems lower performance.

Semi-structured database can be implemented via extensions or server programming with relational DB where the relational model is used but no more.



Leave your comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.