CPU automated control systems and industrial safety. Abstract: Database. The concept of a database. Types of databases. Objects for working with databases. Data types

One of the most popular uses of computers is working with information. Information is any information about any event, entity, process, etc., which is the object of some operations: perception, transmission, transformation, storage or use. A computer can store large amounts of information, instantly process it and produce it in the required form.

Consider an enterprise that has a large amount of data, stored for long periods time in a computer, for example, an airline. This data may, in particular, contain information about passengers, flights, aircraft and personnel and represent relationships typical for a particular subject area. Such relationships are, for example, the sale of tickets (to which passengers, for which flights and seats tickets are sold), the formation of crews (who should be the captain of the ship, co-pilot, etc., on which flight) and the registration of maintenance (when and by whom each aircraft is serviced for the last time, etc.). You can imagine how much effort and time it would take for a person to be able to find some data if necessary (for example, whether a ticket of such and such a series was sold, and to whom, for such and such a flight)! What if this data is stored along with others like it in one large center that receives information from airports throughout the country?

Then, perhaps, such a task would require years of hard work. But we live in an age when people try to find ways to make their work easier. And one of faithful assistants this has become a computer, which is no secret to anyone now. You already guessed that what follows will be a discussion of how to resolve the problems described above. Indeed, the man found a great solution - he developed a database management system (DBMS). This system is designed so that a person can, without particularly bothering himself with tedious work, work with large volumes of data organized in a special way (more on this a little later). But, in addition to the fact that the DBMS allows the user to search for certain information, it provides the ability to draw up reports on certain data (for example, in the case of an airport, calculate salaries and prepare statements about them for various airport employees: pilots, administration, flight attendants, mechanics and etc.), change existing data (for example, in the event of an aircraft failure, re-issuance of a ticket, dismissal of a person, etc.), search for information under several conditions (for example, pilots whose work experience is more than 7 years, age not less than 30 years old and at least higher education), etc. The DBMS functions will be described in more detail below, but for now let’s introduce a definition.

Database(DB) – a named collection of data reflecting the state of objects and their relationships in the considered subject area.

In the case of Aeroflot, the database is data about flights, pilots, tickets, etc. You have already read about this data. It should be noted that data in the database is not collected about everything in the world, but data that relates to a specific area of ​​human activity and is somehow interconnected with each other. It makes no sense for accounting workers to have information in the database about the subject of books in city libraries; it will simply, most likely, never be used. In addition, the computer user, as is known, stores large amounts of information, and the database is one of them, in external memory. Not only will the information not be used, but it also requires a certain amount of external memory, which is associated with certain material costs, and no reasonable owner would throw money away.

2.2. Database presentation levels

Clearly, there are many levels of abstraction between the computer, which deals with bits, and the end users, who deal with abstractions such as flights or crew assignments. The levels of abstraction and the connections between them are presented in Fig. 1.

Introduction

Database systems today are the basis for building most information systems and are used to automate almost all areas of human activity. For example, access to a database is necessary when working with a library information system that contains information about all the books available in the library, its readers, requests for book reservations, etc. It usually contains tools that allow readers to find the book they need by title, author names, or specified topic. With the help of this kind of systems, accounting of the movement of books and other operations necessary in library activities are organized.

A university may have databases with information about students, teaching staff, faculties and departments, other data necessary for the functioning of the so-called integrated information and analytical systems and their subsystems (personnel records, accounting, document flow, information support educational activities and so on.).

Population databases contain information about residents of a city, region, etc., necessary for the functioning of taxation, healthcare, education, social protection, etc.

1. Basic concepts of databases

Database is an automated system that represents a set of information, software, hardware and personnel that provide storage, accumulation, updating, searching and issuing data. The main components of a data bank are the database and software, called a database management system (DBMS).

Database is a specially organized storage of information resources in the form of an integrated set of files, providing convenient interaction between them and quick access to data.

A database is a dynamic object that changes values ​​when the state of the reflected subject area changes ( external conditions relative to the base). The subject area is understood as a part real world(objects, processes), which must be adequately and fully presented in the database. The data in the database is organized into a single integrated system, which ensures more productive work for users with large volumes of data.

Database management system(DBMS) is software that allows users to define, create, maintain, and have controlled access to a database. The DBMS interacts with user applications and the database and has the following capabilities:

· Allows you to define a database, which is usually done using the Data Definition Language (DDL). DDL provides users with a means of specifying the data type and structure, as well as a means of specifying restrictions on the information stored in the database.

· Allows you to insert, update, delete and retrieve information from a database, which is usually done using a data management language (DML - Data Manipulation Language). Having a centralized repository for all data and its descriptions allows DML to be used as a general query tool, sometimes called a query language.

· Provides controlled access to the database using: a security system that prevents unauthorized access to the database from the users; data integrity support systems that ensure a consistent state of stored data; control systems parallel work applications that control their processes sharing to the database; a recovery system that allows you to restore a database to a previous consistent state that was disrupted by a hardware or software failure; a directory accessible to users containing a description of the information stored in the database.

In addition to the most important components of the database and DBMS, the data bank also includes a number of other components. Let's take a look at them.

Language means include programming languages, query and response languages, and data description languages.

Methodological tools- these are instructions and recommendations for creating and operating a data bank and choosing a DBMS.

Technical basis A data bank is a computer that meets certain requirements for its technical characteristics.

Service staff includes programmers, software engineers maintenance Computers, administrative apparatus, including the database administrator. Their task is to monitor the operation of the data bank, ensure compatibility and interaction of all components, as well as manage the functioning of the data bank, control the quality of information and meet information needs. IN minimal version All these functions for the user can be provided by one person or performed by the organization that supplies the software and performs its support and maintenance.

Plays a special role administrator database or data bank. The administrator manages the data and the personnel servicing the data bank. An important task of a database administrator is to protect data from destruction, unauthorized and incompetent access. The administrator grants users greater or lesser permissions to access all or part of the database. To perform administrator functions in the DBMS, various utilities. Database administration involves performing the functions of ensuring reliable and efficient work databases, meeting the information needs of users, displaying the dynamics of the subject area in the database.

The main users of databases and data banks are end users, i.e. specialists conducting various areas of economic work. Their composition is heterogeneous, they differ in qualifications, degree of professionalism, level in the management system: chief accountant, accountant, operations officer, head of the credit department, etc. Satisfying them information needs- this is the solution large number problems in organizing intramachine information support.

A special group of data bank users is formed by application programmers. They usually play the role of intermediaries between the database and end users, as they create convenient user programs in DBMS languages. The centralized nature of data management necessitates the administration of such complex system, as a data bank.

The benefits of working with a data bank for the user pay for the costs and expenses of its creation, since:

User productivity increases and their information needs are effectively met;

Centralized management data frees application programmers from data organization, ensures independence application programs from data;

The developed organization of the database allows you to perform a variety of ad hoc queries and new applications;

Costs are reduced not only for creating and storing data, but also for maintaining it in an up-to-date and dynamic state; the data flows circulating in the system are reduced, their redundancy and duplication are reduced.

Both the data bank and the database can be concentrated on one computer or distributed among several computers. In order for the data of one performer to be available to others and vice versa, these computers must be connected into a single computer system by using computer networks.

A bank and a database located on one computer are called local, and on several PCs connected by networks are called distributed. Distributed banks and databases are more flexible and adaptive, and less sensitive to equipment failure.

Assigning local databases and data banks to an organization in an easier and cheaper way information services users when working with small volumes data and solving simple problems.

Local databases data are effective when working with one or several users, when it is possible to coordinate their activities administratively. Such systems are simple and reliable due to their locality and organizational independence.

The purpose of distributed databases and data banks is to provide more flexible forms of service to many remote users when working with significant volumes of information in conditions of geographical or structural fragmentation. Distributed systems of databases and data banks provide ample opportunities for managing complex multi-level and multi-link objects and processes.

Distributed data processing allows you to place a database (or several databases) in different nodes of a computer network. Thus, each component of the database is located at the location where the equipment is available and where it is processed. For example, when organizing a network of branches of any organizational structure, it is convenient to process data at the location of the branch. Data distribution is carried out across different computers in the context of the implementation of vertical and horizontal connections for organizations with a complex structure.

The objective need for a distributed form of data organization is determined by the requirements imposed by end users:

Centralized management of dispersed information resources;

Increasing the efficiency of managing databases and data banks and reducing the time of access to information;

Maintaining data integrity, consistency and protection;

Ensuring an acceptable level of “price - performance - reliability” ratio.

Distributed system databases (or parts of a database) allows you to wide possibilities vary and maintain information resources, avoid bottlenecks that hinder user productivity, and achieve maximum efficiency in the use of information resources.

2. DBMS functions

In this section, we will look at the types of functions and services that a typical DBMS should provide.

Storing, retrieving and updating data. The DBMS must provide users with the ability to store, retrieve, and update data in the database. This is the most fundamental function of a DBMS. It is clear from the previous that the way this function is implemented in the DBMS should allow internal details to be hidden from the end user physical implementation systems (for example, file organization or storage structures used).

Catalog available to end users. The DBMS must have a directory accessible to end users in which descriptions of data elements are stored. Key Feature ANSI-SPARC architecture is the presence of an integrated system catalog with data about schemas, users, applications, etc. It is assumed that the directory is accessible to both users and DBMS functions. The system catalog, or data dictionary, is a repository of information that describes the data in the database (in essence, it is metadata). Depending on the type of DBMS used, the amount of information and the way it is used may vary. Typically the following information is stored in the system directory:

· names, types and sizes of data elements;

· names of connections;

· integrity support restrictions imposed on data;

· names of authorized users who are granted access to data;

· external, conceptual and internal circuits and mappings between them;

· statistical data, such as transaction frequency and access counts to database objects.

The system catalog allows you to achieve certain benefits, listed below.

· Information about data can be centrally collected and stored, which will allow you to control access to this data, like to any other resource.

· You can define the meaning of the data, which will help other users understand its purpose.

· Communication is simplified because precise definitions of the meaning of the data are maintained. The system directory may also identify one or more users who own or have access to the data.

· Thanks to centralized storage, redundancies and inconsistencies in the description of individual data elements can be easily detected.

· Changes made to the database can be logged.

· The consequences of any changes can be determined before they are made, since the system catalog records all existing data elements, the relationships established between them, as well as all their users.

· Security measures may be further enhanced.

· New opportunities for organizing data integrity support are emerging.

· Audit of stored information can be performed.

Transaction support. The DBMS must have a mechanism that ensures that either all of the update operations in a given transaction are completed, or none of them are completed. A transaction is a set of actions performed individual user or an application program for the purpose of accessing or changing the contents of a database. Examples of simple transactions include adding, deleting from, or updating information about an object to a database. If a transaction fails during execution, the database will end up in an inconsistent state because some changes will have already been made and others have not yet been made. Therefore, all partial changes must be undone to return the database to its previous, consistent state.

Concurrency management services. The DBMS must have a mechanism that guarantees correct database updating when updating operations are performed in parallel by many users. At the same time, parallel access is relatively easy to organize if all users only read data, since in this case they cannot interfere with each other. However, when several users simultaneously access the database, a conflict with undesirable consequences can easily arise, for example, if at least one of them tries to update the data.

The DBMS must ensure that such conflicts will not occur when many users access the database simultaneously.

Recovery services. When discussing transaction support, it was mentioned that if a transaction fails, the database must be returned to a consistent state, which must be guaranteed by the capabilities of the DBMS.

Data access control services. The DBMS must have a mechanism to ensure that only authorized users can access the database. The term security refers to protecting a database from intentional or accidental unauthorized access. It is assumed that the DBMS provides mechanisms for such data protection.

Data exchange support. The DBMS must be able to integrate with communication software in order to organize access for remote users to the centralized database (within the framework of a distributed processing system).

Data integrity services. The DBMS must have control tools to ensure that data and their changes comply with specified rules.

Database integrity means the correctness and consistency of the stored data and is expressed in the form of restrictions or rules for maintaining data consistency that should not be violated in the database.

Data independence support services. The DBMS must have tools to support program independence from the database structure.

The concept of data independence has already been discussed above. This is typically achieved by implementing a mechanism to support views or subschemas. Physical data independence is achieved quite simply because there are usually several types of permissible changes to the physical characteristics of the database that do not affect the views in any way. However, achieving complete logical data independence is more difficult. Typically, the system easily adapts to the addition of a new object, attribute, or relationship, but not to its deletion. Some systems generally prohibit any changes to existing logic components.

Support services. The DBMS must provide a certain set of different support services. Helper utilities are typically designed to assist the DBA in efficiently administering the database. Some utilities operate at the external level, and therefore they, in principle, can be created by the database management system itself, while others operate at the internal level of the system and therefore must be provided by the database management system developer himself. Below are some examples of such utilities.

· Import utilities for loading a database from flat files, as well as export utilities for exporting a database into flat files.

· Monitoring tools designed to track the performance and usage of the database.

· Programs statistical analysis, allowing you to evaluate the performance or utilization of the database.

· Index reorganization tools to rebuild indexes and handle index overflows.

· Garbage collection and memory reallocation tools for physical elimination deleted entries from storage devices, consolidating the freed space and redistributing memory if necessary.

3. DBMS architecture

IN this section Let's consider various typical architectural solutions used in the implementation of multi-user DBMS, namely: with teleprocessing, file-server and client-server systems.

Teleprocessing. The traditional architecture of multi-user systems used to be considered a scheme called "teleprocessing", in which one computer was connected to several "non-intelligent" terminals as shown in Fig. 1. Messages were sent from terminals to user applications, in turn, applications accessed necessary services DBMS. In the same way, messages were returned back to the user terminal. With this architecture, the entire load was placed on central computer, which was supposed to perform not only the actions of application programs and DBMS, but also significant work on servicing terminals (for example, formatting data displayed on terminal screens).

Currently, due to the development of information and computer networks, file-server and client-server DBMSs have become widespread.

Figure 1. Teleprocessing architecture topology

File - server systems. Systems of this type operate within local area networks (LANs) controlled by an operating system of the appropriate type. In this case, the file server contains the files necessary for the operation of applications and the DBMS itself. However custom applications and the DBMS itself are located and operate on separate workstations, and access the file server only as needed to gain access to the files they need - as shown in Fig. 2. In this way, the file server simply functions as a shared hard drive.

Figure 2. Architecture using file server

Obviously, the file server architecture has the following main disadvantages:

· Large volume of network traffic.

· Each workstation must have a complete copy of the DBMS.

· Managing concurrency, recovery, and integrity becomes more complex because multiple DBMS instances may be accessing the same files at once.

Client-server systems. At this approach It assumes the existence of a client process that requires certain resources, as well as a server process that provides these resources. However, it is not at all necessary that they be on the same computer. In practice, systems of this type are implemented within information and computer networks (not necessarily LANs) under the control of client-server operating systems (see Fig. 3).

In a database context, the client side manages user interface and application logic, acting as an intelligent workstation running database applications. The client accepts a request from the user, checks the syntax, and generates a database query in SQL or another database language that matches the application logic. It then passes the message to the server, waits for a response, and formats the received data for presentation to the user. The server accepts and processes requests to the database, and then passes the results back to the client. This processing includes verifying client credentials, ensuring integrity requirements, maintaining the system catalog, and querying and updating data. In addition, concurrency control and recovery are supported. The operations performed by the client and server are given below.

Fig 3. General scheme building systems with client/server architecture

Client:

· Manages the user interface;

· Accepts and checks the syntax of the user-entered query;

· Executes the application;

· Generates a query to the database and sends it to the server;

· Displays the received data to the user.

Server:

· Receives and processes requests to the database from clients;

· Checks user permissions;

· Ensures compliance with integrity constraints;

· Perform queries/updates and return results to the client;

· Maintains system directory;

· Provides parallel access to the database;

· Provides recovery management.

This type of architecture has the following advantages.

· Provides greater access to existing databases.

· Increases overall performance systems. Since the clients and server are on different computers, their processors are capable of running applications in parallel.

· Price hardware decreases. Enough powerful computer with a large storage device, only the server needs it - for storing and managing the database.

· Communication costs are reduced. Applications perform part of the operations on client computers and send only queries to the database through the network, which can significantly reduce the amount of data sent over the network.

· Increased level of data consistency. The server can independently manage data integrity checking, since all restrictions are defined and checked in only one place.

· This architecture fits well with open systems architecture.

· This architecture can be used to organize tools for working with distributed databases data, i.e. with a set of several databases logically connected and distributed over a computer network.

It should be noted that currently this architecture is usually considered in a three-level version, in which the functional part of the former, thick (intelligent) client is divided into two parts. In a three-tier architecture, the thin (non-intelligent) client on the workstation controls only the user interface, while average level data processing controls all other application logic. The third level here is the database server. This three-tier architecture turned out to be more suitable for some environments - for example, for Internet and intranet networks, where a regular Web browser can be used as a client.

Conclusion

Thus, a database is an organized structure designed to store information. Closely related to the concept of a database is the concept of a database management system. This is a complex software, intended for creating the structure of a new database, filling it with content, editing content and visualizing information. A databank is a type information system, which implements the functions of centralized storage and accumulation of processed information. The main components of a data bank are a database and database management systems.

The main users of databases and data banks are specialists conducting various areas of economic work. Their composition is heterogeneous, they differ in qualifications, degree of professionalism, level in the management system: chief accountant, accountant, operations officer, head of the credit department, etc. Satisfying their information needs is a solution to a large number of problems in organizing intramachine information support.

This paper examines the functions that a typical DBMS should provide, as well as various typical architectural solutions used in the implementation of multi-user DBMSs, namely: teleprocessing, file-server and client-server systems.

Bibliography

1. http://cit.vvsu.ru/portal/cifr/1/lek19.htm

2. http://do.bti.secna.ru/lib/book_it/istor_razv.html

3. http://do.bti.secna.ru/lib/book_it/ogr_file.html

4. http://www.lib.csu.ru/dl/bases/prg/kompress/articles/2000_05_dbms3/

5. Microsoft Access 2000: reference book /ed. Yu. Kolesnikova. – St. Petersburg: Peter, 2001.

6. Automated information technologies in economics / ed. prof. G.A. Titorenko. – M.: UNITY, 2005. – 399 p.

7. Informatics for lawyers and economists / ed. S.V. Simonovich. – St. Petersburg: Peter, 2005. – 688 p.

9. Leontiev V.P. The latest encyclopedia of a personal computer 2005. – M.: OLMA-PRESS Education, 2005. – 800 p.

10. Khomonenko A.D., Tsygankov V.M., Maltsev M.G. Databases / ed. prof. HELL. Khomonenko. – St. Petersburg: CORONA, 2000. – 416 p.

11. Economic informatics and computer technology./ Ed. V.P. Kosareva. M.: Finance and Statistics, 2005. –592 p.

Development computer technology was carried out in two main directions:

· use of computer technology to perform numerical calculations;

· use of computer technology in information systems.

Information system is a set of software and hardware, methods and people that provide collection, storage, processing and delivery of information to solve assigned problems. In the early stages of using information systems, a file processing model was used. Later, databases began to be used in information systems. Databases are modern form organization, storage and access to information. Examples of large information systems are banking systems, ordering systems train tickets etc.

Database is an integrated set of structured and interrelated data, organized according to certain rules that provide general principles description, storage and processing of data. Typically a database is created for a subject area.

Subject area is a part of the real world that needs to be studied in order to create a database to automate the management process.
Sets of principles that define an organization logical structure storing data in a database is called data models.

Exist 4 main data models– lists (flat tables), relational databases, hierarchical and network structures.

For many years, flat tables (flat databases) such as lists in Excel were predominantly used. Currently, relational data models are most widely used in database development. The relational data model is a set of simple two-dimensional tables - relations(English relation), i.e. the simplest two-dimensional table is defined as attitude(many posts of the same type united by one topic ) .

The name comes from the term relation relational model data. Relational databases use several two-dimensional tables in which rows are called records, and columns are fields, between the records of which relationships are established. This method of organizing data allows data (records) in one table to be linked to data (records) in other tables through unique identifiers (keys) or key fields.

Basic concepts of relational databases: normalization, relationships and keys

1. Principles of normalization :

· Each database table should not have duplicate fields;

Each table must have unique identificator(primary key);

· Each primary key value must have sufficient information about the entity type or table object (for example, information about academic performance, group or students);


· Changing values ​​in table fields should not affect information in other fields (except for changes in key fields).

2. Types of logical connection .

A relationship is established between two common fields (columns) of two tables. There are one-to-one, one-to-many, and many-to-many relationships.

Relationships that can exist between records of two tables:

· one-to-one, each record from one table corresponds to one record in another table;

· one - to - many, each record from one table corresponds to several records from another table;

· many – to - one, many records from one table correspond to one record in another table;

· many - to - many, many records from one table correspond to several records in another table.

Relationship type in created connection depends on how the associated fields are defined:

· A one-to-many relationship is created when only one of the fields is a primary key or unique index field.

· A one-to-one relationship is created when both fields being linked are key fields or have unique indexes.

· A many-to-many relationship is actually two one-to-many relationships with a third table whose primary key consists of fields foreign key two other tables

3. Keys. Key is a column (there can be multiple columns) that is added to a table and allows it to be linked to records in another table. Exist There are two types of keys: primary and secondary or foreign.

A primary key is one or more fields (columns) whose combination of values ​​uniquely identifies each record in a table. Primary key does not allow values Null and must always have a unique index. A primary key is used to link a table to foreign keys in other tables.

A foreign (secondary) key is one or more fields (columns) in a table that contain a reference to a primary key field or fields in another table. A foreign key defines how tables are joined.
Of two logically related tables, one is called the primary key table or main table, and the other is called the secondary (foreign) key table or subtable. DBMSs allow you to compare related records from both tables and display them together in a form, report, or query.

There are three types of primary keys: counter (counter) key fields, simple key and composite key.

Counter field(Data type “Counter”). A field data type in a database in which a unique numeric value is automatically entered into the field for each record added to the table.

Simple key. If a field contains unique values, such as codes or accession numbers, then this field can be defined as a primary key. Any field containing data can be defined as a key, as long as the field does not contain duplicate values ​​or values Null.

Composite key. In cases where it is impossible to guarantee the uniqueness of the values ​​of each field, it is possible to create a key consisting of several fields. This situation most often occurs for a table that is used for a many-to-many relationship between two tables.

It should be noted again that the primary key field must contain only unique values ​​in each row of the table, i.e. no match is allowed, but in a secondary or foreign key field, the values ​​in the table rows are allowed to match.

If you have difficulty choosing suitable type primary key, then it is advisable to select the counter field as the key.

Programs that are designed to structure information, place it in tables and manipulate data are called database management systems (DBMS). In other words, DBMSs are designed both for creating and maintaining a database and for accessing data. Currently, there are more than 50 types of DBMS for personal computers. The most common types of DBMS include: MS SQL Server, Oracle, Informix, Sybase, DB2, MS Access, etc.

Lesson " Basic concepts of database "

Any of us, starting with early childhood, came across “databases” many times. These are all kinds of directories (for example, telephone directories), encyclopedias, etc. A notebook is also a “database” that each of us has.

Databases are information models containing data about objects and their properties. Databases store information about groups of objects with the same set of properties.

For example, the “Address Book” database stores information about people, each of whom has a last name, first name, telephone number, and so on. A library catalog stores information about books, each of which has a title, author, year of publication, and so on.

Information in databases is stored in an orderly manner. So, in notebook all records are ordered alphabetically, and in the library catalog - either alphabetically - alphabetical catalogue) or by area of ​​knowledge (subject catalogue).

There are several different information model structures and, accordingly, various types databases: tabular, network, hierarchical (see models).

Hierarchical databases

Hierarchical databases can be represented graphically as an inverted tree consisting of objects different levels. Top level (tree root ) occupies one object, the second - objects of the second level, and so on.

There are connections between objects; each object can include several objects more than low level. Such objects are in relation ancestor (object closer to the root) to descendant (a lower-level object), while an ancestor object may have no children or have several of them, while a descendant object necessarily has only one ancestor. Objects that have a common ancestor are called twins .

For example: a hierarchical database is Folder directory Windowswhich you can work with by launching Explorer. The top level is occupied by the folder Desktop. On the second level there are folders My computer, My documents, network And Basket, which are children of the folder Desktop, and are twins to each other. In turn, the folder My computer is an ancestor in relation to third-level folders - disk folders (Disk 3.5(A:), (C:), ( D:), (E:), (F:))and system folders (Printers, Control Panel and etc.)

Network Databases

A network database is a generalization of a hierarchical database by allowing objects to have more than one ancestor. In general, on the connection between objects in network models no restrictions are imposed.

The network database is actually World Pow mu n aglobal computer network Internet. Hyperlinks link hundreds of millions of documents together into a single distributed network database data.

Tabular Databases

Table base data contains a list of objects of the same type, that is, objects that have the same set of properties. It is convenient to represent such a database in the form of a two-dimensional table: in each of its rows the values ​​of the properties of one of the objects are sequentially placed; Each property value is in its own column, headed by the property name.

Consider, for example, a database: Phonebook

Surname

Address

Telephone

Ivanov V.V.

Serova, 5 12

4325345

Petrov I.I.

Sedova, 3-21

3454365

Sidorov S.S.

Mira, 33-17

3454354

The columns of such a table are called fields; Each field is characterized by its name (the name of the corresponding property) and the data type representing the values ​​of this property.

Table rows are records about an object; these records are divided into fields by table columns, so each record is a set of values ​​contained in the fields.

Each table must contain at least one key field, the contents of which are unique to each record in that table. A key field allows you to uniquely identify each record in a table.

The field most often used as a key mole is containing data type counter . However, sometimes it is more convenient to quality key field use different tables fields: product code, inventory number, etc.

Phonebook

Field names

Surname

Address

Telephone

Record

Ivanov V.V.

Serova, 5 12

4325345

Record

Petrov I.I.

Sedova, 3-21

3454365

Record

Sidorov S.S.

Mira, 33-17

3454354

Key

field

Field

Field

Field

The field type is determined the type of data it containslive The fields may contain the following basic data: types:

    counter - integers that are set automaticallyski when entering records. These numbers cannot be changed user;

    text - texts containing up to 255 characters;

    numerical- numbers;

    date Time - date or time;

    monetary - numbers in monetary format;

    logical - values True(Yes or Lie(No);

    OLE object field - image or drawing

Each field type has its own set of properties. Most in important properties of fields are:

    field size - determines maximum length textnumeric or numeric field;

    field format - sets the data format;

    Obligatory field - indicates that this field must be filled out

Database management system Access (DBMS)

Purpose and main functions

The development of information technology has led to the creation computer databases data. Database creation and operationssearch and data sorting is performed special programs - database management systems (DBMS).

Thus, it is necessary to distinguish between databases themselves (DBs), which are ordered sets of data, and database management systems - programs that manage the storage and processing of data.

The database management system is the application Access, included with Microsoft Office.

Program interface Access

In Access the standard one for the environment is used Windows & Office multi-window interface, but unlike other applications, not multi-document. At one time there may be only one database is open , containing mandatory database window And windows for working with database objects. At each moment of time, one of the windows is active and the cursor marks the active object in it.

Database Window - one of the main interface elements Access . All database objects are systematized here: tables, queries, forms, reports, macros and modules.

You can move between records using using the mouse, cursor keys, or scroll bars. To quickly move between records in the database, you can use the navigation buttons on the panel Record, which is located at the bottom of the table window.

Objects in the Access DBMS:

· Table.In databases, all information is stored in two-dimensional tables. This base database object, all other objects are created based on existing tables (derivatives objects).

· Requests.Queries are designed to select data based on specified conditions. Using a database query, you can select information that meets certain conditions.

· Forms.Forms allow you to display data contained in tables or queries in a more readable form. Using forms, you can add new data to tables, as well as edit or delete existing ones. The form may contain pictures, graphs, and other embedded objects.

· Reports.Reports are designed to print the data contained in tables and queries in a beautifully formatted manner.

· Macros.Macros are used to automate repetitive operations. Recording a macro is done in the same way as in other applications, for example as in the application Word.

· ModulesModules also serve to automate work with the database. Modules are also called event processing procedures and are written on language VBA.

Work with Access DBMS

Laboratory work No. 1. Introduction to the Access DBMS

Goal of the work: mastering the techniques of working in the process of creating a database in MS Access (analysis of the subject area, data analysis, building a data model, creating a structure and filling out database tables).

Basic Database Concepts

The basis of many information systems (primarily information and reference systems) are databases.

Database - a set of related data, organized according to certain rules, providing general principles of description, storage and manipulation, independent of application programs, intended for long-term storage in external computer memory, constant update and use.

In most cases, a database can be thought of as information model some real system, for example, the book collection of a library, the personnel of an enterprise, the educational process at school, and so on. Such a system is called subject area database and information system to which it is included.

Classification by data storage method divides the database into centralized and distributed.

All information and centralized database stored on one computer. This can be a standalone PC or a network server that can be accessed by client users. Distributed databases used in local and global computer networks. In the latter case, different parts of the database are stored on different computers.

There are three types of data structure: hierarchical, network and tabular. Accordingly, based on the structure of the database, they are divided into hierarchical databases, network databases and relational (tabular) databases.

The word "relational" comes from the English relation- attitude. Attitude- a mathematical concept, but in the terminology of data models, relationships are conveniently depicted in the form of a table.

IN Lately Relational databases have become the most common type of database. It is known that any data structure can be reduced to tabular form.

A structured representation of data is called data model. The main information unit of a relational database is table. Relational databases use tabular data model. The database can consist of one table - a single-table database, or many interrelated tables - a multi-table database.

The structural components of the table are records and fields.

Each recording contains information about separate object systems: one book in the library, one employee of the enterprise, etc. And each field- this is a certain characteristic (property, attribute) of objects: the title of the book, the author of the book, the last name of the employee, year of birth, etc. The table fields must have non-matching names.

In this case, the table rows correspond tuples relations, and the columns are attributes. Key name any function of the attributes of a tuple that can be used to identify the tuple. Such a function can be the value of one of the attributes (simple key), specified by an algebraic expression that includes the values ​​of several attributes (composite key). This means that the data in the rows of each of the columns of a composite key may be repeated, but the combination of data in each row of those columns is unique.

For each relational database table, a master key- the name of a field or several fields, the totality of whose values ​​uniquely identify the record. In other words, the value of the master key should not be repeated in different records.

To represent the row structure of a table, the following form is used:

Table_name (FIELD_NAME_1, FIELD_NAME_2, ....)

The names of the fields that make up the main key are underlined.

Each table field has a specific type.

Type is the set of values ​​that a field can take and the set of operations that can be performed on those values. There are four main types for database fields: character, numeric, logical And date of.

Software designed to work with data sets is called a database management system - DBMS.

The most widely used on personal computers are relational databases that use tabular representation of data.

The main actions that a user can perform using the DBMS:

Creating a database structure;

Filling the database with information;

Changing (editing) the structure and content of the database;

Searching for information in the database;

Data sorting;

Database protection;

Checking the integrity of the database.

Conclusion

A database is an organized collection of data intended for long-term storage in external computer memory, regular updating and use.

A database is an information model of a specific subject area.

Classification of databases is possible according to the nature of the information: factual and documentary databases; by data structure: hierarchical, network, relational databases; by data storage method: centralized and distributed databases.

Relational databases (RDBs) are the most common type of database that uses a tabular representation of data.

Relational base data- a database based on a relational model.

Basic concepts of organizing data in a RDB: table, record, field, field type, main table key.

DBMS (database management system) is software for working with databases.