A relational data model is ... Definition, concept, structure and normalization theory

The relational data model is a unique approach to parameter management using the structure and language in accordance with the predicate logic of a single order. It was first described in 1969 by the English scientist Codd. In this project, all parameters are presented in the form of tuples grouped into certain relations.

The goal of a relational data model ...

relational data representation model

... this is to provide a declarative method for specifying models and queries.

Users directly note what information the database contains and what theory they want from it. And they also allow the database management system software to take care of describing the structures for its storage. An information retrieval procedure is also important for answering queries.

Most RDBs use SQL data definitions and a search language. These systems implement what can be considered as an engineering approximation to the relational model.

The table in the SQL database schema corresponds to the predicate variable. Key SQL constraints and queries match predicates.

However, such databases deviate in many details from the relational model, and Codd vehemently opposed the changes that jeopardized the underlying principles.

Overview

kinds of data models relational data model

The basic idea of ​​a relational data model is to describe the entire database as a set of predicates for a finite component of variables that describe restrictions on possible values ​​and their combinations. Content at any given time is the final (logical) model. That is, a set of relations, one per predicate variable, so that all components are satisfied. This is exactly the relational data model.

Alternatives

relational data model structure

Other models are hierarchical and network systems. Some of them using older architectures are still popular in data centers with high volume requirements. Or in cases where existing systems are so complex and abstract that the transition to them using the relational model will be prohibitively expensive. And also note the new object-oriented databases.

Implementation

concepts of a relational data model

Several attempts have been made to obtain the true materialization of the RMD, originally defined by Codd and explained by other scientists.

The relational model of data representation was the main one of its kind, which was described in formal mathematical terms. Hierarchical and network bases existed before relational systems, but their specifications were relatively informal. After the RMD was determined, experts made many attempts to compare and contrast different models - and this led to the appearance of more rigorous descriptions of early systems. Although the procedural nature of data manipulation interfaces for hierarchical and network bases limited the possibilities for formalization.

Topics

The fundamental assumption about the concept of a relational data model is that they are all represented as mathematical “p” - typical relations, “Cn” - pair communication, which is a subset of a Cartesian product from several domains. In the mathematical model, the discussion of such data is carried out in a two-valued predicate logic, which means that for each sentence there are two possible estimates: either true or false (and there is no third value, such as unknown or not applicable, each of which is often associated with the concept of 0 ) Data is processed using calculus or algebra, which are equivalent in expressive power.

Types of data models, relational data model

RMD allows the developer to create a consistent, logical presentation of information. This is all achieved by incorporating the stated limitations into a database design, which is usually called a logic diagram. The theory is to develop a model normalization process by which a project with certain desired properties can be selected from a set of logically equivalent alternatives. In access plans and other implementations and operations, the details are processed by the DBMS engine and are not reflected in the logical model. This contrasts with common practice in which performance tuning often requires changes to a logical function.

The basic relational data model is a building block — it is a domain or type of information, usually reduced to a minimum. A tuple is an ordered set of attribute values. And they, in turn, are a mutual pair of name and type. This can be either a scalar value or a more complex option.

Relationship consists of headline and body.

the basics of a relational data model

The first is a set of attributes.

The body (with the nth relation) is a set of tuples.

The heading for the touch is also the theme of each structure.

A relational data model is defined as a set of n-tuples. Both in mathematics and in the MRD, a set is an unordered collection of unique non-duplicated elements, although some DBMSs impose a sequence on their data. In mathematics, a tuple has an order and allows duplication. E.F. Codd originally established tuples using this mathematical definition.

Later, one of the great ideas of E.F. Codd was that using attribute names instead of ordering would be much more convenient (in the general case) in a relationship-based computer language. This statement is still useful today. Although the concept has changed, the name “tuple” has not been transformed. An immediate and important consequence of this distinguishing feature is that in the relational model the Cartesian product becomes commutative.

A table is a common visual representation of relationships. A tuple is similar to a string concept.

Relvar is a named variable of some particular type of tangency, to which at all times some connection of this type is assigned, although the look may contain zero tuples.

Basics of a relational data model: all information is represented by the values ​​of information in a relationship. In accordance with this principle, a relational database is a set of relvars, and the result of each query is presented as a tangency.

The consistency of the relational database is not ensured by the rules built into the applications that use it, but rather by the restrictions declared as part of the logic and implemented by the DBMS for all applications. Limitations are expressed in the use of relational comparison operators, of which only one is a subset (⊆), theoretically sufficient. In practice, it is expected that several useful abbreviations will be available, of which the most important are candidate keys and external source restrictions. That is all that is a relational data model.

Interpretation

In order to fully appreciate the RMD, it is necessary to understand the intended interpretation in the form of a relationship.

The tangent body is sometimes called its extension. This is due to the fact that it should be interpreted as a representation of an increase in some predicate. This is a set of true sentences that can be formed by replacing each free variable with a name.

There is a one-to-one correspondence between object-relational data models. Each tuple of a relationship body provides attribute values ​​for instantiating a predicate by substituting each of its free variables. The result is a statement that is considered true due to the appearance of a tuple in the body of the relation. On the contrary, every process whose title corresponds to the name of the relationship, but which does not appear in the body, is considered false.

This assumption is known as the closed world hypothesis. It is often violated in practical databases, where the absence of a tuple may mean that the truth of the corresponding sentence is unknown. For example, the absence of certain concepts (“John”, “Spanish”) in the language skills table may not necessarily prove that a boy named John does not speak Spanish.

Application to databases, normalization theory

The subject of information used in a typical relational RMD can be a set of integers, a set of character strings, constituent dates, or two logical values ​​true and false, and so on. The corresponding subject names for these figures can be strings with the names "Index", "Perform the necessary work", "Time", "Boolean value" and so on and so forth.

However, it is important to understand that relationship theory does not determine which types should be supported. And it’s really true, it is currently expected that the provisions will be available to user entities in addition to the built-in provided by the system.

Attribute

the relational data model represents

This is the term used in theory for what is usually called a column. Similarly, a table is usually used in place of the theoretical term of tangency (although in SQL it is by no means a synonym for relationship). The data structure of the table is indicated as a list of column definitions, each of which contains a unique column name and the type of values ​​allowed for it.

The value attribute is a record in a specific place, such as John Doe and 35.

A tuple is basically the same as a tuple, except that in SQL DBMS, where the meanings of the columns in the row are ordered, the tuples are not divided. Instead, each definition value is identified solely by its name, and not by its ordinal position in the tuple. The attribute name can be Name or Age.

Attitude

the relational data model is

It is a table of definition of the structure along with the appearance of data in this structure. A definition is a header, and the data in it is a body, a set of strings. A relationship variable is usually called the main table. The header of the value assigned to it at any time corresponds to that specified in the given cell, and its body corresponds to the one that was assigned to it last, calling some update operator (usually INSERT, UPDATE or DELETE).

Set-theoretic formulation

The basic concepts in a relational relationship model are the names and names of attributes. They need to be represented as strings such as Person and Name, and variables will usually need to be used to cover them. Another basic concept is a set of atomic values, which contains the necessary and important meanings, such as numbers and strings.

Source: https://habr.com/ru/post/E8342/


All Articles