Data concept: definition, examples

Data is habitually associated with programming and in the modern information world is presented in three logically equivalent variants: data described and used in a program in a programming language; data in database systems; data in distributed information systems. Modern programming has provided relative freedom only to the first version of information formalization. The second two options are, to one degree or another, reliable forms of providing information and the relationships between its components.

Past and Present

The principal position of programming languages ​​is an accurate description of data and algorithms. Computers do not “present” any chance of uncertainty: there is something over which the action is performed, and there is a team that performs this action.

The modern concept is based on a much higher basis: there is a given, and exactly what it will be, is determined in the place of its use. In any case, at the time of use, this is automatically checked and converted to the desired type. A modern programmer is not obliged to take care of their preliminary description and compliance with type compatibility in the algorithm.

Past and Present

Transition process:

  • from typed data and their mandatory description before use;
  • untyped data and freedom from any obligations for their description and use.

In fact, one can recognize the relative relaxation of formalization requirements - it is available only in the modern programming environment. At the time of execution, the type of each given is fixed, and the sequence of commands is clearly defined.

Types and Modeling

Mathematics and physics, trade and production, economics and other areas where numbers are used, always operated on data and did not attach any importance to the concept of type. The fact that the numbers can be integer and fractional did not really matter.

Each specific formula or specific action could give an integer, infinite fraction, real or complex number. There are still such wonders of the mind as an infinitesimal and infinitely large quantity. Moreover, these miracles even have properties.

There is still no freedom in programming. Everything should be strictly formalized. The concept of data is, first of all, a type:

  • integer;
  • boolean;
  • char;
  • string and so on.

Type names may differ in different programming languages, but there is always an integer or real number, a logical value, a character, a string. There are still relics and specific ideas: an unsigned integer, code, byte, word, double word, fixed-length string.

Relics and ideas

The concept of data in a data system has no freedom. The SQL language - “international” (there is a dialect for each modern database) - does not tolerate any inaccuracies not only in data, but also in sql queries. An error in the request is a guarantee of the absence of a result. There is no need to talk about violation of descriptions.

Modeling information processes and data representations is the only sure way to build a structure that can be developed and adapted to changing conditions.

Source Dynamics

Natural information is a continuous change. To give a formal description and concept of a data model in a specific subject area means to solve three problems:

  • determine what data is here;
  • formalize the relationship between them;
  • Formulate processes for changing data and relationships.

An example of a data set of a simple JavaScript algorithm is a small copy of the model of even the most solid database management system.

Just in the second case, experts and specialists, when designing data structures, tables, and relationships, usually don’t see (it’s really difficult to cover a large amount of natural information) the essence of things, and we get a cumbersome, undeveloped collection of data piles, while in the subject area the initial information circulates free and easy.

The statics of the possible

The usual JavaScript practice is the code connected to the page and the functions assigned to events on its tags. In any situation, page tags define the data that this web resource receives, modifies or creates.

If you carefully concentrate the code of the handlers on the events of elements, and not on the code of the page as a whole, this is the best way out of the situation. Ideally, when the code does not introduce a new data or fixes the available, it focuses on what exactly it has at a particular moment in time.

In fact, if we define the concept of “data” as a minimally static description of the source information and follow it, it means we have a chance of success.

For databases, things are much more complicated. Any JavaScript code is “providing” the page with functionality. Any database is a collection of tables, relationships between them, stored procedures, queries, and functionality accessible from the outside.

Statics is the trouble of any algorithm. The modern concept of data is static: number, string, character, and so on. When processing or writing to a database table, everything turns out to be smooth. But when does the original take on a different dimension or meaning? There is only one option: change the nameplate, but connections and requests may immediately sprinkle.

Statics and objects

The definition of “data” as an object radically changes the situation. The object has its own structure. Here you can apply any descriptions of any variables. Roles will not play. An object has methods through which data is available. Since everything is used in the field of programming, there are three basic methods: read, write, change. You can add more to compare, search, clone, etc.

The subject area for each given imposes a range of properties. Thus, it turns out that the concept of data is transformed into a kind of description that can be changed dynamically. The statics inside the object give dynamics beyond.

By changing the combination of static descriptors inside an object, you don’t have to worry about the dynamics of its relations with other objects.

Programming and data presentation

What is data? The public consciousness is already accustomed to information technology, operates in the clouds and has containers in virtual spaces. Now, in matters of information and its use, not only professional programmers and users are competent, but also ordinary people.

Public opinion

However, what is programming? To this day, public opinion gives the following definition of this concept and its concepts:

  • Information and data are the basic concepts that are used in computer science.
  • The data are in a certain way obtained and recorded observations regarding the surrounding reality.
  • They are simple and complex (structures), primary and secondary.
  • A database is a collection of independent materials presented in a systematic form so that they are found, modified and used.

How objective is this? Authoritative authors believe that yes. Real practice is inclined to the fact that each subject area will determine its correct data system and gives all the possibilities to build a good dynamic model.

There are frequent cases when the customer (consumer) imposes his own opinion on the programmer (database designer) on how and what to do. From the point of view of programming, any desire of the customer can be fulfilled very accurately.

Need Oracle to solve the problem of budgeting for the maintenance of rural water supply (in the village 21 building) - good. MySQL is needed to organize a tracking system for mailings at all post offices in Russia - everything will work as well.

It is always possible to compose any algorithm and provide access to any representation of information within the definition of the concept of data that is established by the developer of a database management system or programming language. The question is different: how to do this with minimal costs in maximum dynamics?

Databases, examples

A simple base is created without a model. The basic concepts of data and communication are small, the functionality is very simple. For example, for a higher education institution, you need:

  • teacher table;
  • group table (key and group number);
  • General table of students (group keys are used).

The dean wants to know the performance of teachers. The teacher table has the fields:

  • surname;
  • name;
  • patronymic;
  • number of the supervised group.

Students table has fields:

  • surname;
  • name;
  • patronymic;
  • Date of Birth;
  • average mark (in all subjects);
  • group number.

There can be at least two sampling options: through the name of the teacher you can go to the group number and see all the students and their average scores, or by the name of the teacher and the student's last name you can see the average score of the latter.

Simple database

Even in this simple version, problems are guaranteed and you have to change something. Situation: the teacher fell ill, another month replaces him, which means he oversees two groups. There is only one field under one group number in the teacher table.

To solve the problem, you need to add a duplicate field. And if two get sick, then add three fields. So the teacher table begins to grow from scratch.

There is another option: replace the digital field of the group key with a character field. Then each time you select it, you will have to convert the string into a sequence of keys, and one sql-query will turn into several.

A more promising example is not to make tables, but to make objects. Then the teacher is an object, and he may have several curated groups. But this is always one object. The teacher’s object has a unique key, but there may be several curated groups. The group also has a unique key. The student also.

All three positions are not only available within the scope of the task, but can also be developed further.

Object Oriented Databases

Industry leaders offer classic relational databases. They are tested by life, work, are safe, reliable and, in case of problems, allow you to restore information.

Object-oriented databases (OOBD) began to be developed in the mid-1980s and, according to authoritative authors, are promising to this day. But so far, in addition to fundamental theories and conceptual provisions, there is not a single ODBD that has reached the same rating and distribution as MySQL, MS SQL Server or Oracle in all its various incarnations.

OO database

But what if the definition, concept of data, types, attributes, classes, hierarchies is offered by a developer whose rating is insufficient to create a community of programmers who profess the mentality of this ODBD? Have to rely on your strength.

In the environment of Linuxoids created more than thirty versions of the OBOB. But where is the guarantee that the created database does not require more functionality? The Windows environment does not have great guarantees in this area.

Object Oriented Solution

However, there is still a solution. Using the MySQL example, we can show how standard relational tables turn into an object-oriented model of the problem being solved.

An example of your own ODBD

There is no database, but there is an environment for creating your own system of objects. MySQL powers are used only as relational memory for tables from information strings. The logic of use is determined by the developer. In particular, there is an is_cache table. It has only a few main fields:

  • owner_code;
  • session_code;
  • h_code;
  • a_surprise;
  • a_contents.

The remaining fields carry utility functions. This table is at the input of any request and records its receipt. What will work out the database model is determined by its developer. What will fit in the content field (a_contents) is determined by the objects of the model created by the developer.

There are four points in such an idea: an appeal, an appeal session, a reference history code and specific content. What is the appeal, what system of objects should be built - the developer determines. What is meant by a session (work process) is determined by the developer. The history code is the ability to roll back on calls.

The tables here have nothing to do with the subject area. There is a hit controller (is_cache), there is logging (is_customs), there is a hit history (is_histories). The remaining tables are determined by the problem being solved.

In fact, such a solution proposes to create your own OOBD on the basis of the constructed domain database model and the problem to be solved. There is a huge plus - this is its own concept of data, its own model of their presentation and the relationships between them. There is a foundation here - a great relational database. There will be no problem looking for something and misunderstanding something.

Model: system of objects + DBMS

It is almost impossible to change anything in information technology. The real information revolution is still far away. The professional consciousness of software developers is not going to change the classical traditions. But there is still a way out of the situation.

The perfect solution

Using reliable modern database management systems as the basis for creating an environment for the existence of your own model, you can achieve significant success.

In any case, it will be necessary to build a representation or data model to solve the task, but you need to do it correctly: let it be a system of objects, and a good DBMS - the environment of its existence.


All Articles