ComputersDatabase

Functional dependence and relational databases

The information always had an adequate dynamic interest. The development of programming languages, relational databases and information technologies has radically changed the content and structure of interest. A certain strict system of representations has been formed. Formalization, exact mathematics and binary relations have become a successful and rapidly developing field of knowledge and experience.

The natural world of information has not changed its dynamics and, developing its content and structure, has risen to a new height. It has smooth shapes, and in nature there is nothing "rectangular" . Information, of course, lends itself to formalization, but it has dynamics, not only data and algorithms for their processing are changing, the tasks themselves and the areas of their application are changing.

Information> formalization >> data

Information is transformed into data (data model, information structure, database ...) as the programmer sees it. There is no guarantee that this vision is correct, but if its program solves the task posed, then the data has been presented in an appropriate way.

The question of how correctly the information was formalized is a matter of time. So far, the concept of dynamics (self-adaptation to changing conditions of use) is just a dream of programming.

Functional dependence: "the correct solution = program (programmer)" and the condition: "continuous correspondence to the problem" are valid in most cases, but only together. But this is not the mathematical basis that is used when creating databases.

Direct statement: the natural and continuous dynamics of information and algorithms for solving problems is always the case. And relational databases are binary relations + strict mathematics + exact formal constructions, + ...

Data, files and databases

How data is stored for a long time does not matter: whether it's RAM or an external device. The hardware component has reached a steady pace of development and provides good quality in large volumes.

The main storage options, which differ in the use of data:

  • Files;
  • Database.

The first is reserved for the programmer (what to write down, in what format, how to do it, how to read ...), the second immediately brings the need to learn a simple functional dependence.

The speed of sampling and recording information when working with files (of reasonable size, not astronomical) is very fast, and the speed of similar operations with the database can sometimes be noticeably slow.

Personal experience and collective intelligence

In history, there have been attempts to reach beyond the limits, but to this day relational databases dominate. A great theoretical potential is accumulated, the practice of application is extensive, and the developers are highly qualified.

The concept of the functional dependence of database developers is imposed on the programmer, even if he does not intend to use the rich mathematical and logical experience of constructing complex information structures, processes of working with them, sampling and recording information.

Even in the simplest case, the programmer depends on the logic of the database, whatever he chooses to work with. There is no desire to follow the canons, you can use files, you will get many files and a lot of personal experience. A lot of personal time will be spent and the task will be solved in a long time.

No matter how difficult the examples of functional dependence seemed, it is not necessary to plunge into the depths of meaning and logic. Often it should be recognized that the collective mind has managed to create excellent databases of different size and functionality:

  • Solid Oracle;
  • Demanding MS SQL Server ;
  • Popular MySQL.

- Excellent relational databases with good reputation, easy to use, fast in skilled hands. Their use saves time and eliminates the need to write regular sheets of auxiliary code.

Features of programming and data

For a long time, programming has been constantly rewriting the disease, repeating the work of its predecessors, in order to somehow adapt something to the changed information, the task or the conditions of its use.

The peculiarity of the functional dependence is that, like in programming, an error can be very expensive. The task is rarely simple. Usually, during the formalization of information, a complex representation of the data is obtained. Usually their elements are singled out, then they are linked by keys to certain relationships, then algorithms for the formation of tables, queries, algorithms for retrieving information are established.

It is often important to bind to the encoding. Not all databases offer mobile solutions, you can often see how perfectly tuned MySQL, on which there are dozens of databases, perfectly and stably working, forces the developer to make the eleventh base similar to those that already exist.

There are times when shared hosting restricts the functionality of PHP and this leaves an imprint on programming access to the database.

In modern programming, the responsibility for the program algorithm is equivalent to the responsibility for creating a data model. Everything should work, but not always it is necessary to plunge into a jungle of theory.

DB: simple data dependency

First of all, the concept of a database is both a database as a database management system (for example, MySQL), and some information structure that reflects the data of the problem and the relationships between them. One MySQL database "holds" on itself any number of information structures in various fields of application. One Oracle database can provide information processes for a large company or bank, monitor security and data security at the highest level, located on a variety of computers that are at different distances in various instrumental environments.

It is generally believed that the relationship is basic in the relational model. An elementary relation is a set of columns with names and rows with values. The classic "rectangle" (table) is a simple and effective achievement of progress. The complexity and functional dependence of the database begins when the "rectangles" begin to enter into a relationship with each other.

The name of each column in each table must be unique in the context of the task. The same data can not be in two tables. Know the meaning of concepts:

  • "Identify entities";
  • "Eliminate redundancy";
  • "Fix relationships";
  • "To ensure reliability."

- an elementary need to use the database and build a data model for a particular task.

Violation of any of these concepts - low efficiency of the algorithm, slow data retrieval, data loss, and other troubles.

Functional dependence: logic and meaning

You can not read about the tuples of relations, about the fact that the function is the correspondence of a set of arguments to a set of values, and the function is not only a formula or a graph, but it can be specified by a set of values-a table.

Not necessarily, but it does not hurt to represent the functional dependence as:

F (x1, x2, ..., xN) = (y1, y2, ..., yN).

But it's necessary to understand that there is a table at the input, at the output there is also a table or a specific solution. Typically, the functional dependency establishes a relationship logic between tables, queries, privileges, triggers, stored procedures, and other database components (components).

Usually, the tables are converted into each other, then to the result. But the use of functional dependence is not limited to just such an idea. The programmer himself constructs his own picture of the data picture, domain model, information structure ... it does not matter how to name it, but if it works on a specific database, it should be built according to its logic, take into account its meaning and dialect of the language used, usually SQL.

It can be argued that the properties of the functional dependencies of the database are accessible through the dialect of the used SQL language. But it is much more important to understand: after all the vicissitudes of development, not so many databases have survived, but there are many dialects of this language and the features of internal constructions in the bases too.

About the good old Excel

When the computer showed itself on the positive side, the world immediately split into programmers and users. Typically, the first use:

  • PHP, Perl, JavaScript, C ++, Delphi.
  • MySQL, Oracle, MS SQL Server, Visual FoxPro.

The second:

  • Word.
  • Excel.

Some users manage to do it themselves (without the help of programmers) in the Word database - a real nonsense.

The experience of users in Excel for creating databases is practical and interesting. It is important that Excel, in itself, is functional, colorful and practical.

The tabular idea, defined the concept of functional dependence is obvious and accessible, but there are nuances for each database. Each has its own "face", but everything from Excel to Oracle is manipulated by simple squares, that is, tables.

If you consider that Excel is not a database at all, but many users (not programmers) use it that way, and Oracle is the most complex and powerful achievement of a large team of developers in the field of databases, it becomes natural to recognize that the database is this representation A specific programmer (team) on a specific task and its solution.

What is the functional dependence, with what, where, why ... obviously only the author or the collective of those.

About where the relational relationship goes

Scientific and technological progress is a very painful procedure, and sometimes cruel. If you remember how databases started, what * .dbf was, how they branded cybernetics, then they fell in love with computer science and began to create obstacles to the transfer of high technologies at the country level, it becomes clear why relational databases are so tenacious and good. Why is the classical style of programming still alive, and object-oriented programming is simply valued, but does not yet rule.

No matter how beautiful functional dependence is in the context of mathematics:

This is not a binary relationship, more precisely, it is an occasion to rethink the idea of establishing relationships between a multitude of attributes, investigating one-to-many, many-to-many, many-to-many, or many in general, and one in particular.

You can come up with a great variety of relations. This is mathematics with logic, and it is strict! Information is its own mathematics, special. In it, you can speak about formality only with a very big minus.

You can formalize the work of the personnel department, write an ACS for oil production or milk production, bread, make a selection in the huge base of Google, Yandex or rambler, but the result will always be static and every time is the same!

If the functional dependence = strict logic and mathematics = the basis for the databases, then what dynamics can we talk about. Any decision will be formal, any formal data model + strict algorithm = an exact and unambiguous solution. The information and scope of any program is always changing.

The selection of a search engine on the same search phrase can not be the same in an hour or two and, definitely, in a day - if the search phrase refers to the field of information in which the number of sites, resources, knowledge, other elements is continuously changing .

About strings and objects

Even if the program is purely mathematical and its database does not even think about dynamics, there are always lines . And the string has a length. And it can not be infinite. It can not even be a variable, only a conditional variable. In addition, any database with its mathematical and binary-bureaucratic apparatus imposes a lot of formalities, and this is the speed + quality of sampling and information processing.

строки условно-переменной длины с массой бинарных формальностей и строгих математических ограничений. And if some fields in the number database, especially real ones, are added to the constraints: the bit depth, the presence of the letter "e", the format of the representation is shorter everywhere and we always have important properties of the functional dependencies of the database: strings of conditionally variable length with a mass of binary ones Formalities and strict mathematical limitations.

If you change the tone and listen to the pulse of the dynamics, then everything can be painted on objects. In the first approximation, the column name in the table is an object, the list of names is also an object, the table is shorter is the object of the header and the names of the columns in the header are in it. And caps can not be at all ...

But in the table there can be lines. And the string can have values. And why they should always be the same number. A complete square table is a particular, and in most cases, a private one.

If you represent all the constructions in the database with objects, then, perhaps, you do not have to build strict binary relations. In this there is a natural and real meaning, if only because it is in terms of objective (unambiguously non-mathematical) logic that reflects the dynamics of information and the environment in which problems exist.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 en.delachieve.com. Theme powered by WordPress.