DB definition. Databases and information systems. What are databases and what are they used for?

Federal Agency for Education

State Educational Institution

Secondary Vocational Training

"Tula Economic College"

In the discipline "Informatics"

Presentation on theme: "Database. The concept of a database. Types of databases. Objects for working with databases. Data types in databases and tables Access. Basic elements and concepts of databases»

Prepared by a 2nd year student

group 216-BP

Khramova Anna

Checked by teacher:

Vasilyeva I.V.

Shchekino, 2007

FROM ABOUT D E R F BUT H AND E:

1. Introduction…………………………………………………………….……2

2. The concept of a database………………………………………………..3

3. Types of database………………………………………….………4-5

4. Objects for working with databases…………………………...6-7

5. Data types in databases…………………………………………………….8

6. Data types in Access tables………………………………………9

7. Basic elements and concepts of databases…………………..10-15

8. Test…………………………………………………………….…16-17

9. Answers to the test……………………………………………...…….…18

10. Questions for self-examination………………………………..........19

11. List of literature used……………………………….20

12. Presentation……………………………………………………21-33

13. Review………………………………………………..…………..34

INTRODUCTION:

We got acquainted with the work of Excel and know that this application was created specifically for solving the problems of processing tabular data.

There are systems (applications) for solving other classes of problems. In particular, programs (applications, systems) now play a very important role, the chain of which is the storage of data and the issuance of data at the request of the user.

The use of computers specifically for solving this class of problems is becoming an increasingly widespread phenomenon.

We can safely say that such tasks and the need to solve them exist in any company, in any enterprise.

The basic concept for such a range of tasks is a database. This is the name of a file or group of files of a standard structure that is used to store data.

For the development of programs, systems of programs that work with databases, special tools are used - database management systems (DBMS).

The DBMS includes, as a rule, a special programming language and all other tools necessary for the development of these programs.

Currently, the most famous DBMS are FOXPRO and ACCESS. The latter is included in the professional package MS Office 97.

These are modern systems with great potential, designed for the development of complex software systems, and acquaintance with them is extremely useful for a computer user, but it is difficult to implement it within the framework of this manual.

Database concept

Database (DB) is a collection of arrays and data files organized according to certain rules that provide for standard principles for describing, storing and processing data, regardless of their type.

Database (DB)- a set of organized information related to a specific subject area, intended for long-term storage in the external memory of a computer and permanent use.

DB types:

1. Factographic - contains brief information about the objects of a certain system in a strictly fixed format;

2. Documentary - contains documents of various types: text, graphics, sound, multimedia;

3.Distributed - a database, different parts of which are stored on different computers connected to a network;

4.Centralized - database stored on one computer;

5. Relational - a database with tabular data organization.

One of the main properties of the database is the independence of data from the program that uses this data.

Working with a database requires solving various problems, the main ones are as follows:

Creating a database, writing data to the database, correcting data, selecting data from the database at the request of the user.

The tasks of this list are called standard.

The following concept related to the database: a program for working with a database is a program that provides a solution to the required set of tasks. Any such program should be able to solve all the problems of the standard set.

The database in different systems has a different structure.

In PVEM, relational databases are usually used - in such databases, a file is a table in structure. In it, columns are called fields, rows are called records.

An example of a database is a train or bus timetable. Here, each line - the record reflects the data of strictly one object. The base includes fields: flight number, route, departure time, etc.

A classic example of a database is a telephone directory. A database query is a statement that specifies what data the user wants to retrieve from the database.

Some requests can be a serious problem, for the solution of which it is required to write a complex program. For example, a query to the database - the bus schedule: to determine the difference in the average interval of departure of buses from Rostov to Taganrog and from Rostov to Shakhty.

Objects for work from bases data

To create an application that allows you to view and edit databases, we need three links:

data set

data source

visual controls

In our case, this triad is implemented in the form:

table

data source

dbgrid

Table connects directly to a table in the database. To do this, you need to set the database alias in the DataBaseName property and the table name in the TableName property, and then activate the relationship: Active property = true.

However, since the Table is a non-visual component, although the connection to the database is established, the user is not able to see any data. Therefore, you need to add visual components that display this data. In our case, this is the DBGrid grid. The grid itself “does not know” what data it needs to display, it needs to be connected to the Table, which is done through the DataSource intermediary component.

Why do we need a component - an intermediary? Why not connect to Table right away?

Let's say there are several visual components - a table, input fields, etc. connected to the table. And we need to quickly switch them all to another similar table. With the DataSource, this is easy to do - just change the DataSet property, but without the DataSource, you would have to change the pointers for each component.

Database applications - a thread connecting the database and the user:

DB - dataset - data source - visual components - user

Data set:

table (table, navigation access)

Query (query, relational access)

Visual Components:

Grids dbgrid , DBCtrlGrid

Navigator DBNavigator

All sorts of analogues label , Edit etc.

Substitute Components

Data types in databases

In Access, you can define the following types of fields:

Text – text string; the maximum length is set by the "size" parameter, but cannot be more than 255

MEMO field - text up to 65535 characters long

Numeric - in the "Field size" parameter, you can set the field: byte, integer, real, etc.

Date/Time is a field that stores time data.

Money - a special format for financial needs, which is essentially a numeric

The counter is an auto-increment field. When a new record is added, the table's internal counter is incremented by one and written to the given field of the new record. Thus, the values ​​of this field are guaranteed to be different for different records. The type is for the key field

Boolean - yes or no, true or false, on or off

An object OLE – documents, pictures, sounds, etc. can be stored in this field. The field is a special case BLOB – fields ( Binary large Object ) found in various databases

Substitution

Data types in tables Access :

Text

Memo field

Numerical

Date Time

Monetary

Counter

Logical

An object OLE

Don't forget about indexes.

Link tables.

The integrity link controls cascading deletion and modification of data.

Exclusive access to the database is needed in order to make fundamental changes in it.

Basic concepts and elements of databases

Databases were needed when there was a need to store large volumes of the same type of information, to be able to use it quickly. Databases (in the broad sense of the word) have been used throughout history by priests, officials, merchants, usurers, and alchemists.

The main requirement for databases is ease of access to data, the ability to quickly obtain comprehensive information on any issue of interest (it is important not only that the information is contained in the database, but how well it is structured and integrated is important).

As soon as computers appeared and spread, almost immediately they were assigned the hard and painstaking work of processing and structuring data, databases (DB) in their current sense appeared.

According to modern requirements for databases, the information contained in them must be:

consistent (there should be no data that contradict each other);

non-redundant (unnecessary duplication of information in the database should be avoided, redundancy can lead to inconsistencies - for example, if some data is changed, but their copy in another part of the database was forgotten to be changed);

holistic (all data must be linked, there should be no links to non-existent data in the database)

Relational database model was proposed by Edgar Codd in the late 70s. Within this model, a database is a set of tables linked to each other by relationships. With sufficient simplicity (and hence the convenience of implementation on a computer), this model has the flexibility to describe complexly structured data. In addition, the theoretical substantiation has been worked out quite deeply for this model, which also makes it possible to use a computer more efficiently when creating a database and working with it. In terms of relationship rules, the relational model implements a one-to-many relationship between tables. This means that one record in the main table corresponds to several records in the child table (including not a single record). Other types of relationships: "one-to-one", "many-to-one" and "many-to-many" - can be reduced to this one-to-many type. Relational databases are made up of related tables.

table is a two-dimensional array that stores data. The columns of the table (within the framework of the accepted notation of the database) are called fields, the rows are called records. The number of table fields is fixed, the number of records is not. In fact, the table is a non-fixed array of records with the same field structure in each record. Adding a new record to a table is not difficult, while adding a new field entails restructuring the entire table and can cause certain difficulties. Numbers, strings, pictures, etc. can be stored as field values ​​in records. Database tables are stored on the hard drive (on the local computer or on the database server, depending on the type of database). One table usually corresponds to several files - one main and several auxiliary ones. The subtleties of table organization depend on the format used (dBase, Paradox, InterBase, Microsoft Access, etc.)

Key - a field or combination of fields in a table whose values ​​uniquely identify a record. The key is called so because, having the values ​​of the key fields, you can unambiguously access the desired record. Thus, keys are extremely useful for linking tables. By writing the key values ​​in the designated fields of the child table and thereby setting the link, we provide a link between two records - a record in the main table and a record in the child table. In one record of the subordinate table, there can be several links to the records of the main table. For example, in a school journal there may be a table - a list of duties, where each entry contains the last names and first names (the key of their two fields) of several attendants. This is how the connection of various records of the main table is carried out and a rather complex data structure is implemented. In school practice, names and surnames are used as key fields, but in the database it is better to allocate special key fields - individual numbers (codes) of records. This is guaranteed to protect against possible problems with namesakes. In a school where such computer clarity is not required, the appearance of two students with the same first and last names in the same class is a very rare event, so such a technical omission can be forgiven. In addition to linking, keys can be used for direct access to records, speeding up work with the table.

Index - a field, as well as a key, specially selected in the table, the data in which, however, can be repeated. They also serve to speed up access and, in addition, for sorting and selections.

Normal forms were invented, rather, to automate the process of creating databases, rather than as a guide to those who create them manually (automatic design of large databases can be done using special software systems - tools (CASE). In reality, with manual development, the designer immediately thinks the necessary structure, plans the necessary tables, and does not come from one big table.Normal forms actually formalize intuitively understood requirements for data organization, helping, first of all, to avoid excessive duplication of data.

First normal form:

the information in the fields is indivisible (for example, the first and last names must be different fields, not one);

there are no repeating field groups in the table

Second normal form:

completed the first form;

any non-key field is uniquely identified by the key fields (actually, the requirement to have a key)

Third normal form:

completed the second form

non-key fields must be uniquely identified only by key fields (this means that data that does not depend on the key must be placed in a separate table)

The third normal form requirement has the meaning that a table with fields (First name, Last name, Class, Class teacher) split into two tables (Name, Surname, Class) And (Class, Class teacher), since the Class field uniquely identifies the Class Teacher field (and according to the third form, only keys should uniquely identify).

For a deeper understanding of the intricacies of performing operations with records in tables, it is necessary to have an understanding of access methods, transactions, and business rules.

Access methods define how records are technically processed. Access methods are chosen by the programmer during application development. The navigation method is based on the sequential processing of the necessary records one by one. It is typically used for small local tables. The relational method is based on processing a set of records at once using SQL queries. It is used for large remote databases.

Transactions determine the reliability of operations in relation to failures. A transaction combines a sequence of operations that either must be completed completely or not completed at all. If a transaction fails during the execution, then all the results of all operations included in it are canceled. This ensures that the correctness of the database is not violated even in the event of technical (rather than software) failures.

Business rules define the rules for conducting operations and represent the mechanisms for managing the database. By setting possible restrictions on the values ​​of the fields, they also contribute to maintaining the correctness of the database. Despite possible associations with business as commerce, business rules are not directly related to it and are simply rules for managing databases.

Correct DB:

- non-redundant;

- consistent;

- holistic

Relational DB:

- tables;

- links between tables using keys

- fields (columns) - fixed;

- entries (lines) - easily added and removed

- uniquely identifies a record

Keys and indexes:

- serve to link tables, direct access, speed up processing, etc.

Normal forms:

- serve to combat data redundancy;

- they demand a lot, but from the best of intentions

Access methods:

- navigation;

- relational

Database correctness protection:

- transactions - technical protection

- business rules - logical protection

T E S T

1.Database models:

BUT) commercial

B) network

IN) object-oriented

G) revolutionary

D) relational

E) integral

2.Types of database:

BUT) documentaries

B) network

IN) graphic

G) relational

3. Which of the databases contains documents of the most different types?

BUT) distributed

B) centralized

IN) factual

G) documentary

4.What is an example of a database?

BUT) pedestrian standing on the side of the road

B) phonebook

IN) timetable

G) train or bus schedule

5. What is a key?

BUT) link B) the codeword IN) program G) field or combination of table fields

6. What will be displayed as a result of the program fragment execution?

M:= 'biology';
k:= 'zoo' + copy(m, 4, 5);
writeln(k);

BUT) zoology B) zoo IN) biology G) logic 7.Data set contains: BUT) Navigator DBNavigator B) table IN) Query 8.Choose the correct statement: the monetary type of fields ... BUT) text string B) text up to 65535 characters IN) special format for financial needs G) autoincrement field 9.Basic data requirement: BUT) the need to store large volumes of the same type of information B) rapid dissemination of information IN) return deletion of information G) ease of access to data and quick finding of the necessary information on the issue of interest 10. What should be the information in the database requirements? BUT) holistic B) brief IN) consistent G) of the same type

Test Answers

Questions for self-test :

1. What is a database?

2. What is a classic example of a database?

3. Give some database examples

4. What type of database is usually used in PVEM?

5. What types of database do you know?

6. What three links do we need to create an application that allows us to view and edit databases?

7. What types of fields can be defined in Access?

8. Why do we need exclusive access to the database?

9. What is the relational database model?

10. How many normal forms are there in the database? List them

11. What are transactions?

L AND T E R BUT T At R BUT :

1. Computer science. Textbook for secondary vocational education (+ CD) / Under the general. ed. I.A. Chernoskutova - St. Petersburg: Peter, 2005. - 272 p.: ill. pp. 24 - 25

2. Computer science. Textbook for students. ped. universities / A.V. Mogilev; N.I.Pak, E.K.Hönner; Ed. E.K. Hönner. - M., 1999. - 816 p. 185 - 187

3. Computer science. Textbook. - 3rd revision. ed. / Ed. prof. N.V. Makarova. - M.: Finance and statistics, 2000. - 768 p.: ill.

R E C E N Z I A

In the broad sense of the word database (DB) is a collection of information about specific objects of the real world in any subject area.

For convenient work with data, it is necessary to structure them, i.e. to introduce certain conventions on how to represent them.

Database(in the narrow sense of the word) - a named collection of structured data related to a certain subject area

In real activity, database systems are mainly used.

Database system (SDB) is a computerized structured data storage system whose main purpose is to store information and make it available on demand.

Database systems exist both on small, less powerful computers and on large, more powerful ones. On large ones, mainly multi-user systems are used, on small ones - single-user systems.

Single user system(single-user system) is a system in which no more than one user can access the database at the same time.

Multiplayer system(multi-user system) is a system in which several users can access the database at the same time.

The main goal of most multi-user systems is to allow each individual user to work with the system as if it were a single user.

The differences between single-user and multi-user systems are in their internal structure, they are practically invisible to the end user.

The database system contains four main elements: data, hardware, software And users .

Data in the DB are integrated And general.

Integrated means that data can be represented as a union of several, possibly overlapping, separate data files. (For example, there is a file containing data about students - last name, first name, patronymic, date of birth, address, etc., and another one about the sports section. The necessary data about students attending the section can be obtained by referring to the first file. )

General - means that different data areas can be used by different users, i.e. each of these users can access the same data area, even at the same time. (For example, the same database data about students can be used simultaneously by the student personnel department and the dean's office.)

Hardware includes:

Drives for storing information along with connected I / O devices, I / O channels, etc.

The processor (or processors) along with the main memory that is used to support the operation of the system software.


THERE ARE QUESTIONS

In life, we are often faced with the need to store any information, and therefore we often deal with databases. For example, we use a notebook to store the phone numbers of our friends and plan our time. The phone book contains information about people living in the same city. It's all kind of Database. Well, since this Database, then let's see how they store data. For example, the phone book is a table (Table 10.1).

In this table, the data is actually phone numbers, addresses and full names, i.e. the lines "Ivanov Ivan Ivanovich", "32-43-12", etc., and the names of the columns of this table, i.e. the lines "Full name", "Phone number" and "Address" define the meaning of this data, their semantics.

Now imagine that there are not two, but two thousand records in this table, you are creating this directory and an error has occurred somewhere (for example, a typo in the address). Apparently, it will be difficult to find and fix this error manually. You need to use some kind of automation.

To manage a large amount of data, programmers (not without the help of mathematicians) came up with control systems databases (DBMS). Compared to text databases electronic DBMS have a huge number of advantages, from the ability to quickly search for information, the relationship of data with each other to the use of this data in various application programs and simultaneous access to data by several users.

For accuracy, let us define Database offered by Glossary.ru

Database is a collection of related data organized according to certain rules, providing for general principles of description, storage and manipulation, independent of application programs. Database is an information domain model. Appeal to databases carried out using the control system databases (DBMS). DBMS provides support for creating databases, centralized management and organization of access to them by various users.

So, we came to the conclusion that it is advisable to store data independently of programs, so that they are interconnected and organized according to certain rules. But the question of how to store data, according to what rules they should be organized, remained open. There are many ways (by the way, they are called presentation or data storage models). The most popular are object and relational data models.

The basis object model the concept of object-oriented programming is laid, in which data is represented as a set of objects and classes related to each other, and work with objects is carried out using methods hidden (encapsulated) in them.

Object Examples DBMS: Cache, GemStone (by Servio Corporation), ONTOS (ONTOS).

Recently, manufacturers DBMS seek to combine these two approaches and preach an object-relational model of data presentation. Examples of such DBMS- IBM DB2 for Common Servers, Oracle8 .

As we are going to work with MySQL, then we will discuss aspects of working only with relational databases. It remains for us to consider two more important concepts from this area: keys And indexing, after which we can start learning the query language SQL.

Keys

To begin with, let's think about the following question: what information should be given about a person so that the interlocutor can say for sure that this is exactly the person, there can be no doubt, there is no second such? Reporting a surname is obviously not enough, since there are namesakes. If the interlocutor is a person, then we can approximately explain who we are talking about, for example, remember the act that that person committed, or in some other way. The computer, however, will not understand such an explanation; it needs clear rules on how to determine who it is. In control systems databases to solve such a problem, the concept was introduced primary key.

Primary key (PK) is the minimum set of fields that uniquely identifies a record in a table. Means, primary key is first of all a set of table fields, secondly, each set of values ​​of these fields must define a single record (row) in the table and, thirdly, this set of fields must be the minimum of all those having the same property. Insofar as primary key defines only one unique record, then no two table records can have the same value primary key.

For example, in our table (see above), the full name and address make it possible to unambiguously select a record about a person. Speaking in general, without connection with the problem being solved, then such knowledge does not allow us to accurately point to a single person, since there are namesakes living in different cities at the same address. It's all about the boundaries we set for ourselves. If we believe that knowing the full name, phone number and address without specifying the city is enough for our purposes, then everything is fine, then the full name and address fields can form primary key.

In any case, the problem of creating primary key falls on the shoulders of the one who designs database(develops a data storage structure). The solution to this problem can be either the selection of characteristics that naturally define a record in the table (setting the so-called logical, or natural, PK), or the creation of an additional field designed specifically for uniquely identifying records in the table (setting the so-called surrogate, or artificial, P.K.).

An example of a logical primary key is the passport number database about the passport data of residents or full name and address in the phone book (table above). To set a surrogate primary key we can add an id (identifier) ​​field to our table, the value of which will be an integer that is unique for each table row. The use of such surrogates keys makes sense if natural primary key is a large set of fields or its selection is not trivial.

In addition to uniquely identifying a record, primary keys are used to organize links with other tables.

For example, we have three tables: one containing information about historical figures (Persons), one containing information about their inventions (Artifacts), and one containing images of both persons and artifacts (Images) (Figure 10.1).

primary key in all these tables is the id (identifier) ​​field. The Artifacts table has an author field that records the identifier assigned to the author of the invention in the Persons table. Each value of this field is foreign key for primary key person tables. In addition, the Persons and Artifacts tables have a photo field that refers to an image in the Images table.

These fields are also foreign keys for primary key the Images table and establishes a one-to-one logical relationship between Persons-Images and Artifacts-Images. That is, if the value foreign key photo in the person table is 10, it means that the person's photo has id=10 in the image table. In this way, foreign keys used to organize relationships between tables Database(parent and child) and to maintain referential integrity constraints.

Annotation: The lecture discusses the general meaning of the concepts of a database (DB) and a database management system (DBMS). The basic concepts related to the database such as algorithm, tuple, object, entity are given. Basic requirements for a data bank. Definitions of a database and a DBMS.

Purpose of the lecture: Understand the difference between a database and a database management system. Familiarize yourself with the basic requirements that apply to the data bank and the basic definitions related to the database and DBMS.

Consider the general meaning of the concepts of a database (DB) and a database management system (DBMS).

From the very beginning of the development of computer technology, two main directions of its use were formed.

The first direction is the use of computer technology to perform numerical calculations that are too long or impossible to do manually. The formation of this direction contributed to the intensification of methods for the numerical solution of complex mathematical problems, the development of a class of programming languages ​​focused on the convenient recording of numerical algorithms, the formation of feedback from the developers of new computer architectures.

The second direction is the use of computer technology in automatic or automated information systems. In the broadest sense, an information system is a software package, the functions of which are to support the reliable storage of information in computer memory, perform application-specific transformations of information and/or calculations, and provide users with a convenient and easily mastered interface. Typically, the amount of information that such systems have to deal with is quite large, and the information itself has a rather complex structure. Classical examples of information systems are banking systems, reservation systems for air or railway tickets, hotel rooms, etc.

In fact, the second direction arose somewhat later than the first. This is due to the fact that at the dawn of computing, computers had limited memory capabilities. It is clear that we can talk about reliable and long-term storage of information only if there are storage devices that store information after turning off the power supply. RAM usually does not have this property. In the beginning, two kinds of external memory devices were used: magnetic tapes and drums. At the same time, the capacity of magnetic tapes was quite large, but by their physical nature they provided serial access to the data. Magnetic drums (they are most similar to modern magnetic disks with fixed heads) made it possible to randomly access data, but were of a limited size.

It is easy to see that these restrictions are not very important for purely numerical calculations. Even if a program has to process (or produce) a large amount of information, when programming it is possible to think about the location of this information in external memory so that the program runs as quickly as possible.

On the other hand, for information systems in which the need for current data is determined by the user, the presence of only magnetic tapes and drums is unsatisfactory. Imagine a ticket buyer who, standing at the box office, must wait for the magnetic tape to be completely rewound. One of the natural requirements for such systems is the average speed of operations.

It was the requirements for computing technology from non-numerical applications that caused the appearance of removable moving head magnetic disks, which was a revolution in the history of computing. These external memory devices had a significantly larger capacity than magnetic drums, provided a satisfactory speed of access to data in the random access mode, and the ability to change the disk package on the device made it possible to have an almost unlimited data archive.

With the advent of magnetic disks, the history of data management systems in external memory began. Prior to this, each application program that needed to store data in external memory itself determined the location of each portion of data on a magnetic tape or drum and performed exchanges between RAM and external memory using low-level firmware (machine instructions or calls to the corresponding operating system programs). ). This mode of operation does not allow or makes it very difficult to maintain several archives of long-term stored information on one external medium. In addition, each application program had to solve the problems of naming parts of data and structuring data in external memory.

A historic step was the transition to the use of file management systems. From the point of view of the application program, a file is named area external memory that can be written to and read from. The rules for naming files, how data stored in a file is accessed, and how that data is structured depends on the specific file management systems and possibly file type. File management system takes care of allocating external memory, mapping filenames to corresponding external memory addresses, and providing access to data.

Any problem of information processing and decision making can be represented in the form of a diagram shown in fig. 1.1.


Rice. 1.1.

Definition of basic terms

Let us give definitions of the main terms. Information (input and output) and rules for its transformation are singled out as components of the scheme.

Rules can be in the form of algorithms, procedures and heuristic sequences.

Algorithm - the sequence of rules for the transition from the source data to the result. Rules can be executed by a computer or a person.
Data - a set of objective information.
Information - information previously unknown to the recipient of information, supplementing his knowledge, confirming or refuting the provisions and relevant beliefs. Information is subjective and is determined by the level of knowledge of the subject and the degree of his perception. The information is extracted by the subject from the corresponding data.
Knowledge - a set of facts, patterns and heuristic rules, with the help of which the task is solved.

The sequence of data processing operations is called information technology (IT). Due to the significant amount of information in modern tasks, it must be streamlined. There are two approaches to ordering.

  1. Data is associated with a specific task (array technology) - ordering by use. At the same time, algorithms are more mobile (may change more often) than data. This necessitates data reordering, which, moreover, can be repeated in different tasks.
  2. In this regard, another widely used database technology has been proposed, which is storage ordering.

Under database (DB) understand a collection of data stored together with a minimum amount of redundancy such that it can be used optimally for one or more applications. aim creating databases, as a variety of information technology and a form of data storage, is the construction of a data system that does not depend on the adopted algorithms (software), the technical means used and the physical location of data in a computer; providing consistent and complete information for non-regulated requests. The database assumes its multi-purpose use (several users, many forms of documents and queries of one user).

Knowledge base (KB) is a set of database and used rules received from decision makers (DM).

Along with the concept of "database" there is the term "data bank", which has two interpretations.

  1. The data is currently being processed decentralized(at workplaces) using personal computers (PCs). Initially, centralized processing on large computers was used. Due to centralization, the database was called a data bank and therefore often no distinction is made between databases and data banks.
  2. Database- database and its management system (DBMS). A DBMS (for example, FoxPro) is an application for creating databases as collections of two-dimensional tables.
Data bank (BnD) is a system of specially organized data, software, language, organizational and technical means designed for centralized accumulation and collective multi-purpose use of data.
Databases (DB) is a named collection of data that displays the state of objects and their relationships in the subject area under consideration. A characteristic feature of databases is persistence: data is constantly being accumulated and used; the composition and structure of data, necessary for solving certain applied problems, are usually constant and stable over time; individual or even all data elements may change - but this is also a manifestation of constancy - constant relevance.
Database management system (DBMS) is a set of language and software tools designed to create, maintain and share a database with many users.

Sometimes archives are allocated as part of the data bank. The reason for this is a special mode of data use, when only part of the data is under the operational control of the DBMS. All other data is usually located on media that is not operationally managed by the DBMS. The same data at different times can be included in both databases and archives. Databanks may not have archives, but if they do, then the archive management system may also be part of the databank.

Efficient Management external memory are the main function of the DBMS. These usually specialized tools are so important in terms of efficiency that, without them, the system simply will not be able to perform some tasks simply because they will take too long to complete. However, none of these specialized functions are visible to the user. They provide independence between the logical and physical levels of the system: the application programmer does not have to write indexing programs, allocate memory on disk, etc.

Basic requirements for data banks

The development of the theory and practice of creating information systems based on the concept of databases, the creation of unified methods and tools for organizing and searching for data make it possible to store and process information about increasingly complex objects and their relationships, providing for the multifaceted information needs of different users. The main requirements for data banks can be formulated as follows:

  • Data reuse: users should be able to use the data in different ways.
  • Simplicity: users should be able to easily find out and understand what data they have.
  • Ease of use: users should be able to access data in a (procedurally) simple way, with all the complexities of data access hidden in the database management system itself.
  • Flexibility of use: data can be accessed or retrieved using different access methods.
  • Fast processing of requests for data: requests for data must be processed using a high-level query language, not just application programs written to process specific requests.
  • Interaction language end users with the system should provide end users with the ability to obtain data without the use of application programs.

The database is the foundation for future application growth: databases must enable new applications to be developed quickly and cheaply.

  • Saving the cost of mental labor: existing programs and logical structures data should not be remade when changes are made to the database.
  • Availability of application programming interface: application programs must be able to easily and efficiently query data; programs should be isolated from file locations and addressing methods data.
  • Distributed data processing: the system must operate in the conditions of computer networks and provide effective user access to any distributed database data located anywhere in the network.
  • Adaptability and extensibility: the database must be customizable, and the customization must not cause application programs to be overwritten. In addition, the set of predefined data types supplied with the DBMS must be extensible - the system must have the means to define new types and there must be no difference in the use of system and user-defined types.
  • Data integrity control: the system must perform error control in the data and check the mutual logical consistency of the data.
  • Data recovery after failures: automatic recovery without loss of transaction data. In the event of hardware or software failures, the system must fall back to some consistent data state.
  • Auxiliaries must allow the developer or
  • Linguistic means;
  • Software;
  • Technical means;
  • Organizational and administrative subsystems and normative and methodological support.

Organizational and methodological means- this is a set of instructions, methodological and regulatory materials, descriptions of the structure and procedure for the user to work with the DBMS and database.

Database and DBMS users

Users (DBMS) can be divided into two main categories: end users; database administrators.

We should especially talk about the database administrator (DBA). Naturally, the database is built for the end user (KP). However, initially it was assumed that the KP would not be able to work without a specialist programmer, who was called the database administrator. With the advent of the DBMS, they took over a significant part of the functions of the DBA, especially for databases with a small amount of data. However, for large centralized and distributed databases, the need for a DBA has remained. In a broad sense, DBAs are system analysts, data structure and information designers, process technology designers, system and application programmers, operators, subject matter and maintenance specialists. In other words, in large databases, these can be teams of specialists. The responsibilities of the ABD include:

  1. analysis of the subject area, the status of information and users;
  2. structure design and data modification;
  3. setting and maintaining integrity;
  4. data protection;
  5. ensuring database recovery;
  6. collection and statistical processing of database requests, analysis of the effectiveness of the database;
  7. work with the user.

Brief summary

Databases (DB) are a named collection of data that displays the state of objects and their relationships in the subject area under consideration.

A database management system (DBMS) is a set of language and software tools designed to create, maintain and share a database with many users.

The main requirements for data banks are: data reuse, simplicity, ease of use, flexibility of use, fast processing of data requests, interaction language.

Users (DBMS) can be divided into two main categories: end users; database administrators.

Questions for self-examination

  • Define a database.
  • Define a databank.
  • Name two interpretations of the databank.
  • What is a database management system?
  • Basic requirements for a data bank.
  • What is data, information, knowledge?
  • Users of a DBMS and a DB?
  • Basic functions of a database administrator.
  • What makes it possible to quickly and cheaply develop new applications?

What is a database in computer science

In computer science, the concept of a database is a set of data for information networks and users stored in a special, organized form. The type of data storage is determined by the given structure (schema) of the database and the rules for its management.

By themselves, databases are useless if there is no way to manage them. By database management we understand the possibility of adding information individually or collectively, sorting it, copying and moving it partially or completely, and combining two or more databases. To manage databases, software products have been created that are database software. They are called DBMS - database management systems.

What is DBMS and SQL

It is with consumers, that is, we deal with you. Modern DBMS allow you to process not only texts or graphics, but also media files (audio and video files).

Any software product has its own language with which it is controlled. The DBMS is no exception. One of the main languages ​​for communicating with the DBMS is SQL (structured query language).

It is worth noting that, according to the nature of the use of DBMS, they are divided into single-user (for one user - a local computer) and multi-user (for networks).

I'm sure you don't think there is one universal DBMS. And yes, there are dozens of them. In this section, we will limit ourselves to working with the free and most common MySQL database.

DBMS MySQL

MySQL DBMS works only with relational databases. Relational databases are the easiest to learn first. In addition, they are used on all hosting and servers for mass use.

It remains to give the concept of a relational database. These are simple tables that have informational rows and columns. The intersection of a row and a column is called a cell. The entire database consists of several or many tables, and all tables interact with each other.

The concept of a database. A database is an organized structure for storing information. It stores information about groups of objects with the same set of properties.

For example, the database "Employees" contains information about the employees of the company, each of which has a last name, first name, patronymic, year of birth, address, telephone number, etc.

Usually a fairly large number of people have access to the database, but among them there is hardly a person who has access to the entire database and is able to make arbitrary changes to the database on his own. In addition to the data, the database contains methods and tools that allow each employee of the organization to operate only with the data that are within his competence. As a result of the interaction of the data contained in the database with the methods available to specific employees, information is formed that they consume and on the basis of which they enter and edit data within their own competence.

All information in the database is organized. There are several classifications of databases.

According to data storage technology, centralized and distributed databases are distinguished.

Centralized databases are located in the memory of one computer system.

Distributed databases consist of several parts stored on different computers.

According to the method of access to data, databases (DB) are distinguished, organized as a file server and a client server.

When organizing a file server, one of the machines is a shared repository of a centralized database. The database is accessed from other machines, which are called workstations. Database files are transferred to workstations where they are processed.

When organizing a client-server, in addition to storage, data processing functions also fall on the central machine. On client machines, only the presentation of information is performed.


Database organization models. The data model represents the relationships between objects in a database. Depending on the type of object relationships, there are hierarchical, network and relational (tabular) data models.

The hierarchical data model is represented on the object relationship diagram in the form of an inverted tree (Fig. 12.1). Each element corresponds to only one link from the element of a higher level.

The network data model is shown in fig. 12.2. In it, each element can have more than one parent element.

The relational (tabular) data model is based on the organization of data in the form of two-dimensional tables. The rows of a relational table are records and store information about one instance of the data object represented in the table.

There are no identical rows in the table. As an example, consider the Goods table (Table 12.1), in which each row contains information about one of the supplied goods.

The fields (table columns) contain the main characteristics of the data object. Each of the fields is homogeneous, i.e. the data in it has the same type and length. Each table field has a unique name. A field whose value uniquely identifies the corresponding record is called a key field. If there is one key field, then this is a simple key, if there are several key fields, then this is a composite key.

To reflect the links between several objects in the subject area, an information-logical (infological) model is used. It reflects the composition and structure of the data



subject area. The mythological model is built at the first stage of database creation.

Stages of creating a database. The main stages of creating a database can be represented in the form of a diagram (Fig. 12.3.)

At the stage of building an infological model, database objects and relationships between them are identified. Determining the structure of database tables involves determining the type of fields in each table.

Entering and editing data is done in two ways: using special forms and without using forms, directly into the table.

The processing of information in the database is carried out by executing queries or using a special program.


To display information from the database, there is a special tool - reports. They allow you to display summary information from the database, include selective information from database tables in the report, and add information that is not contained in the database, as well as format the output information.

A database management system is a set of software tools designed to create the structure of a new database, fill it with content, edit content, and visualize (select, organize and design) information. DBMS are programs that manage the storage and processing of data.

Working with a database in a DBMS includes the steps of creating a database structure, entering and editing data, and processing data. The most popular are relational DBMS: Access, Paradox, dBase, FoxPro, Visual FoxPro.