Relational Database

A relational database is a Database structured according to the principles of the relational Algèbre. The theory of the relational databases is due to Edgar Frank Codd.

Note: the relational adjective does not refer here to the relations between the tables but to the tables themselves.

It is implemented by means of a Management system of Relational Databases (SGBDR).

Principle

The concept makes it possible to store and organize a great quantity of information. The DBMS (basic Management system of Data) make it possible to sail in these data and to extract (or to update) the information wanted by means of a Requête.

The data appear as stored in table S which one can connect. A table itself is a relation, but between the various fields which compose it.

This system thus dissociates completely in terms of interface of the databases of the hierarchical type, even if in the plan of the implementation and, according to the statistics of access to the base, a hierarchical model is used, which will not never need to be taken into account by the user. Moreover data of a table are often subordinated to one of the fields (a key).

This relational model leads to:

  • large a simplicity of use
  • a transparency for the user of any technical reorganization of the base (the only difference for the user will be, if the operation is successful, in the response times).
  • a facility of combination of the contents of several tables (operation join or Joint ).

The tables have a certain number of columns or fields making it possible to describe N-uplet S (lines or recordings). The not-duplication (absence of Redundancy) of the tuples is theoretically ensured by the SGBDR.

In the relations, it is possible to define two types of keys: ; primary key: allows to identify one and only one tuple (for example the social security number). ; foreign key: it is an attribute of a relation which is key primary education in another relation. It thus makes it possible to bind two tables between them.

To reach the data, one uses various logical operators, in particular the selection (or projection), but also the Jointure S (of which there exist various types).

The operations are communicated in the form of Requête S with the SGBDR (basic Management system of Data Relational). The majority use the language standardized SQL or the TCL for the SGBDR Multivalué.

In a relational database, the goal is to separate information to the maximum to avoid the doubled blooms and the Redondance, and to prevent the loss of quality of information (for example, the address of a supplier is updated only one and only once: the modification will then be taken into account on the whole of the mails).

Technical details

In the table NOBODY below, the unit {PersID, name, first name, date_naiss, ville_naiss} is a whole of attributes . Each attribute defines elementary information inside a line (also called tuple ) of the table. It cannot twice exist same the tuple in a relation. The attributes are sometimes also called columns .

One can define key , which are constraints of integrity relating to a relation. They consist in imposing that it cannot exist two tuples having even value for a sub-group of attributes (the key) of the relation. If to the example of the table NOBODY is taken again, the key could be PersID, therefore two tuples different could not have the same value for the PersID attribute (but the values of the other attributes can be identical).

Certain keys are known as key foreign ; they are constraints of integrity relating to a R1 relation, consisting in imposing that the value of a group of attributes seems value of key in another R2 relation. If one takes again to the example of the two tables ANYBODY and CITY, the foreign key of the table NOBODY could be ville_naiss, which points on the table CITY. It is imperative that the number of attributes forming the foreign key of the R1 table corresponds to the number of attributes forming the primary key of the table R2.
These foreign keys result from the process of standardization of the model of the data.

During the implementation of a database, it is necessary to think of certain aspects:

  1. Nobody must be able to update data in a table while another person modifies them already, because that could lead to inconsistencies. A system as Paradox however authorizes it thanks to a clever mechanism updating automatically all postings in progress at the same moment.
  2. the transactions are atomic , i.e. in the event of major breakdown of the computing system in the middle of a modification, a mechanism must make it possible to cancel the transactions in progress if it could not be carried out completely (mechanism known as of the MADE ).
  3. Of the checks of integrity must ensure that each value registered in a tuple is an allowed value (for example, one can prohibit to put a value higher than 12 in an attribute “month”).

Example: note: here ville_naiss is a foreign key (table CITY) |----- | In the same way, there is a table “city” containing the population and the surface of each city. | || note: here area is a foreign key (table AREA) |}

If one wants to be able to know, for each person, the population and the surface of its town of birth, it is useful, instead of storing the name of the town of birth in the table “nobody”, to store an identifier (key foreign) referring to a single number for each city (key primary education). Thus, information concerning each city is stored unitairement.

One of the languages used to build requests making it possible to question and handle the data of the relational databases is the language SQL. To take again our example, SQL is used to formalize questions (requests) type: “Which are all the people born in city X” or “In which city was born Dupont”.

Improvements

- SQL not being exactly close to the intuitive formulation of a request contrary to the TCL (see operating system Pick), two approaches are used to be freed some:

  • creation of frontal languages translating into SQL simple sentences of the kind: “To list by area the average turnover of each product”

  • creation of requests by filling a form with the conditions which one wishes to see checked and by leaving virgin the other fields ( Query by example )

SQL is not however impossible to circumvent to date to carry out very complex general requests. Several systems post initially in answer to a request complexes its foreseeable cost (in time or resources of access), while requiring of the user confirmation or invalidation before any execution. One can imagine indeed on current bases of the requests SQL of which the execution would ask for hundreds of hours or thousands of euros. A simple rewriting is often enough to obtain the same result, or a functional analog, in a way much more economic. In spite of the success of the language SQL which followed, Edgar F. Codd will denounce this tool which he regards as an incorrect interpretation of his theories.

To reach the data of a SGBDR

The SGBDR are delivered with API S owner (i.e. clean with each SGBDR) to communicate with them.

To make it possible to use one or more databases with a software without owe récrire the source code, of APIs standardized to reach the SGBDR were create:

  • ODBC in the universe Microsoft
  • JDBC in the universe Java

As there exists a conceptual difference between the world object (C++, Java, . Net, etc) and the relational representation, it appeared several solutions to reconcile them. A solution is the mapping relational object whose framework Open source Hibernate is one of the best examples for the Java universe.

Thus, in the universe Java, of new standards for the access to the SGBDR appeared:

  • the EJB entity
  • JDO

History

- Here a genealogy of the SGBDR. - here genealogy of SEQUEL

The relational databases were had a presentiment of in the Années 1970 as substitutes of the traditional files in the operating systems (see Technologie FS). That was implemented in the computers of the type IBM Système 38 or AS/400, like in an operating system named Pick, but without spreading. The patents of this time being now in the public domain, the idea becomes again of topicality in the Années 2000 with the system WinFS (see Microsoft Windows).

See too

Related articles

  • normal Form (relational databases)
  • SQL

External bonds

  • a genealogy of the SGBDR.
  • a genealogy of SEQUEL

Random links:Chilpéric II (king of the Francs) | Onex (Geneva) | List Dutch authors | University of the West (Timişoara) | Web Calendar Protocol Access