Collecting, the analysis and structurization of data in the professional environment (development of the database).
A database is a collection of interconnected data organized in accordance with a data schema in such a way that they can be used to support the effective work of the end user. The design and construction of any software system that involves working with a database begins with the design and construction of a data structure. Based on the created data structure, an application is designed, procedures for managing this data are written. This order of development is due to the fact that it is easier to move from the data structure to the logic of working with this data than vice versa.
Databases can be classified as follows.
A hierarchical database can be represented as a tree consisting of objects of various levels. The topmost level (root) is occupied by one object, then there are objects of the second level, etc. There are certain connections between objects. Each object can include several lower-level objects. Such objects are in relation to an ancestor (an object closer to the root) to a descendant (an object of a lower level); in this case, a situation is possible when an ancestor object has no descendants or has several of them, whereas a descendant object must necessarily have only one ancestor. Objects that have a common ancestor are called twins. The network database is based on a logical data model, which is an extension of the hierarchical approach and is based on a rigorous mathematical theory describing the structural aspect of the database, the aspect of data integrity and the aspect of data processing. The difference between a hierarchical data model and a network model is that in hierarchical structures, a descendant record must have one ancestor, and in a network data structure, a descendant can have any number of ancestors.
A relational database uses a logical relational (tabular) data model, an applied theory of database construction, which is an application to data processing problems of such branches of mathematics as set theory and relational algebra or first-order predicate calculus. An object-oriented database is a database in which data is modeled in the form of objects, their attributes, methods and classes.
An object-relational database is a relational database that supports some technologies that implement an object-oriented approach. Working with any database begins with designing the data structure. There is a distinction between high-level design, when entities and part of the fields in which information will be stored are allocated, and detailed, in which the created general structure is refined and modified. In the process of detailed design or after its completion, the process of programming the logic of working with data begins.
Depending on the type of applications, the logic can be developed by means of the database itself (which is more acceptable), or the logic is embedded in the application that will access and process data. In the first case, the application being developed will be with a "thin" client, in the second — with a "thick" client. Let's consider the main features of relational database design.
Fundamentals of relational database design. A relational database is based on a relational data model that includes the following aspects:
* structural aspect — the data in the database is a set of relationships (tables);
* integrity aspect - relationships meet certain integrity conditions (the relational data model supports declarative integrity constraints at the domain level (data type), relationship level, and DB level);
* aspect of processing —manipulation) - support for operators manipulating relationships (relational algebra, relational calculus).
To describe the database structure, it is necessary to introduce a number of fundamental concepts.Data type. The concept of "data type" in the relational data model fully corresponds to the concept of data type in programming languages. Domain. It is determined by specifying some basic data type to which domain elements belong, and an arbitrary boolean expression applied to elements of this type.
If the calculation of a boolean expression applied to a given element yields the result "true", then the data element is a domain element. For example, the domain "Age" is defined on the base type "Integers", but its number can only include values, for example, from 0 to 120 (Fig. 6.1). Thus, the domain allows you to create a custom data type with the ability to set the necessary limits of acceptable values.