Abstract: Database. The concept of a database. Types of databases. Objects for working with databases. Data types What is a Database? What is SQL and MySQL

A database is a structured collection of data that can be edited and accessed, updated or deleted. According to their organizational approach, type of content and volume, databases can be classified into different types.

If you are planning to work as a database administrator, you should be familiar with some tools such as Oracle, SQL server and Sybase, since the relational database is the most common of all databases.

Data is any piece of information, while a database is defined as an integrated set of logically related data that is stored in electronic files (records) for easy access. Storing data in a database allows the user to access information for various purposes.

Databases are electronic filing systems that store data in the form of fields, records, etc. Some databases may provide access rights that allow the user to perform various operations such as editing, updating, deleting, etc.

Below is a classification of databases depending on storage purpose and capabilities.

Analytical databases are read-only. They are mainly used on the Internet, where you can see a collection of items present, but they cannot be changed. You can think of these as inventory catalogs. The best example of using analytical databases is any online store that has a product catalog and data about them. The information stored in analytical databases is mainly extracted from the operation of internal or external databases. They mainly select and edit data that is often used in managing an organization. It is expressed in the form of a summary of an organization or an employee's activities, or sales, marketing reports, etc. The main purpose of an analytical database is to allow the user to analyze the data, depending on management policies.

It is a digital database that stores data in a table in the form of rows and columns. Each row has a unique key. This helps in linking one table to another (which is referred to as a foreign key). In general, each object has a table—rows, an instance of it, and the columns have values ​​assigned to the instance. In this type of database, all data is stored and retrieved using "relationships", which are not just collections of tables; hence the name "relational databases".

Operational databases store information necessary for the organization's activities. This is basically all the information about a specific person or employee, department, or item. Therefore, they are also called database domain. Thus, these databases are based on the functional line of the organization.

These databases store all information in one place - centralized computing power. Users in various locations can access this data through a computer network. Examples could be a computer, server, processor, etc. The advantages of this type of database are its cost-effectiveness and storing all data in one place, thereby increasing the integrity of the data. However, operations depend on network connection.

Distributed databases are an organization's databases that are distributed across different geographic locations. Databases can be either common to all sites, or specific to a local site only. Distributed databases are removed from the corresponding authority of the local site. The reason why this type of database was developed is to parallelize the execution of work, distribute tasks, thereby reducing the overall time.

End User Databases

End-user databases are databases whose results are the result of various operations that the user performs on different databases. They contain information about the end users of the organization. Such databases are used to provide summary information about all transactions in an organization. This is faster than using live databases, although the latter can serve the same purpose. Examples include spreadsheets, Word documents, or downloaded files.

External Databases

External databases refer to online access to external, proprietary data. This access is largely free and available from commercial online services. Hence, they are also called "commercial databases". These databases are usually for external users who cannot afford to maintain a huge database. Examples include accessing information about a specific person or their address/telephone number through online directories.

Hypermedia Databases

When you surf the Internet, you see web pages that contain images, video clips, links, graphics, multimedia files, etc. This information is retrieved from hypermedia databases. They include a collection of interconnected multimedia web pages where information is stored online and data can be accessed by multiple users at the same time.

Data warehouses

As the name suggests, a data warehouse is a large collection of data extracted from various other databases. This data can be used by any of the management personnel to the end user. Data is mainly expressed as editable and screened information.

Depending on the volume of data, databases can be classified into three main types.

General Databases

General databases are databases that offer information about non-numerical entities. The purpose of such databases is to provide all the necessary information to the user on any topic he is looking for. They are mainly used for research work.

Discipline-specific databases

Discipline-specific databases are similar to general databases, however, the information they contain is more organized. This type of database is useful for specialists in a particular field.

Subject-specific databases

Subject-specific databases focus only on a specific topic. They are mainly used for academic purposes. Information is usually contained in the form of scientific articles from journals, etc.

There are a large number of programming languages ​​that help you access different types of databases. Countless operations can be performed on data using these languages. Thus, databases allow you to store, view, access and update data at any point in time.

Lesson " Basic concepts of database "

Any of us, starting from early childhood, have repeatedly encountered “databases”. 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 a notebook, all entries are ordered alphabetically, and in a library catalog - either alphabetically - alphabetical catalogue) or by area of ​​knowledge (subject catalogue).

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

Hierarchical databases Hierarchical databases can be graphically represented as an inverted tree consisting of objects at 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 lower-level objects. 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 directoryWindows which 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.)

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

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.

Tabular Databases

A tabular database 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 use others as the key field of the table

fields: product code, inventory number, etc.

Phonebook

Surname

Address

Telephone

Field names

Ivanov V.V.

Serova, 5 12

4325345

Field names

Petrov I.I.

Sedova, 3-21

3454365

Field names

Sidorov S.S.

Mira, 33-17

3454354

Record

Key

field

field

field

Field The field type is determinedthe type of data it contains live

    The fields may contain the following basic data: types:counter- integers that are set automatically

    ski 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

    - defines the maximum text length numeric or numeric field;

    field format - sets the data format; must be filled out

Database management system Access (DBMS)

Purpose and main functions

The development of information technology has led to the creation of computer databases. Database creation and operationssearch and data sorting is performed by 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 network 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 entries using the mouse, cursor keys, or scroll bar. 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 way.

· 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.

Databases and information systems are discussed below. The basic concepts of databases and database management systems are described. The characteristics of options for organizing an information system based on client-server architecture are given. The classification of DBMS is given and their main functions are described. I consider options for creating applications and organizing user interaction with information systems.

1.1. Databases and information systems

The solution to many problems is based on information processing. To facilitate information processing, information systems (IS) are created. Automated systems are those that use technical means, in particular computers. Most existing IS are automated, so for brevity we will simply call them IS.

IN broadly understood Any information processing system falls under the definition of IS. By Areas of use IP can be divided into systems used in manufacturing, education, healthcare, science, military affairs, social sphere, trade and other industries. By objective function Information systems can be divided into the following main categories: management, information and reference, decision support.

Note that sometimes more is used narrow interpretation of the concept of IP as a set of hardware and software tools used to solve some application problem. An organization, for example, may have information systems that are respectively assigned the following tasks: accounting for personnel and material and technical resources, settlements with suppliers and customers, accounting, etc.

Database is a type of information system that implements the functions of centralized storage and accumulation of processed information organized in one or more databases.

A data bank (DB) generally consists of the following components: a database (several databases) of data, a database management system, a data dictionary, an administrator, a computer system and maintenance personnel. Let's take a quick look at these components and some important concepts associated with them.

Bash of data (DB) is a collection of specially organized data stored in the memory of a computer system and reflecting the state of objects and their relationships in the subject area under consideration.

The logical structure of what is stored in a database is called data presentation model. The main data representation models (data models) include the following: hierarchical, network, relational, post-relational, multidimensional and object-oriented (see Section 2).

Sispi ma corrections 6a ami dannyi (DBMS) is a complex of language and software. framework designed for creating, maintaining and sharing databases among many users. Typically, DBMSs are distinguished by the data model used. Thus, DBMSs based on the use of a relational data model are called relational DBMSs.

Some of the first DBMSs are the following systems: IMS (IBM, 1968), IDMS (Cullinet, 1971), ADABAS (Software AG, 1969) and INES (VNIISIAII USSR, 1976). The number of modern database management systems numbers in the thousands.

Application is a program or set of programs that provides automation of information processing for an applied task. We have considered applications that use the database. Applications can be created in or outside the DBMS environment - using a framing system that uses database access tools, for example Delphi or C++Builder. Applications developed in a DBMS environment are often called DBMS applications, and applications developed rhc DBMS, - external connections.

To work with a database, DBMS tools are often sufficient and there is no need to use. Create applications the creation of which requires npoi framing. Applications are developed mainly in cases where koi yes, it is required to ensure ease of operation< БД неква тифицироьанным пользователям или ин­терфейс СУБД не устраивает пользователей.

Dictionary of foreign (SD) is a BnD subsystem designed for centralized storage of information about the structure of data, relationships of database files with each other, types of data and formats for their presentation, ownership of data by users, security codes and access control, etc.

Functionally, SD is present in all BnD, but the component performing these functions does not always have exactly this name. Most often, SD functions are performed by the DBMS and called from the main menu of the system or implemented using its utilities.

AOminsh trator about the basics of data ( АБД) is a person or persons responsible for developing requirements for a database, its design, creation, effective use and maintenance. During operation, the database usually monitors the functioning of the information system, provides protection against unauthorized access, and controls the redundancy, consistency, safety and reliability of the information stored in the database.

For single-user information systems, DBA functions are usually assigned to persons directly working with the database application. In a computer network, the DBA typically interacts with network administrator.

The latter’s responsibilities include monitoring the functioning of network hardware and software, network reconfiguration, software recovery after failures and equipment failures, preventive measures and ensuring access control Computer system

(CS) is a set of interconnected and coordinated computers or processors and other devices that provide automation of the processes of receiving, processing and issuing information to consumers. Since the main functions of the BnD are data storage and processing, the computer used, along with the acceptable power of the central processing units (CPU), must have a sufficient amount of RAM and external direct access memory.

Both staff

performs the functions of maintaining hardware and software in working condition. He carries out preventive, routine, restoration and other work according to plans, as well as as necessary

One of the most important areas of application of computers is the processing and storage of large volumes of information in various fields of human activity: economics, banking, trade, transport, medicine, science, etc.

The purpose of any information system is to process data about real world objects. The basis of the information system is the database. In the broad sense of the word, a database is a collection of information about specific objects of the real world in any subject area. A subject area is usually understood as a part of the real world that is subject to study in order to organize the management of its objects and, ultimately, automation, for example, an enterprise, a university, etc.

When creating a database, the user seeks to organize information according to various characteristics and quickly make a selection with an arbitrary combination of characteristics. It is very important to choose the right data model. A data model is a formalized representation of the main categories of perception of the real world, represented by its objects, connections, properties, as well as their interactions.

Database is an information model that allows you to orderly store data about a group of objects that have the same set of properties.

Information in databases is stored in an orderly manner. So, in a notebook, all entries are ordered alphabetically, and in a library catalog either alphabetically (alphabetical catalogue) or in accordance with the field of knowledge (subject catalogue).

A system of programs that allows you to create a database, update the information stored in it, and provide convenient access to it for viewing and searching is called systemdatabase management (DBMS).

  1. Database types

A group of data elements related to each other is usually called recording. There are three main types of data organization and relationships between them: hierarchical (in the form of a tree), network and relational.

Hierarchical database

In a hierarchical database, there is an ordering of elements in a record, one element is considered the main one, the rest are subordinate. The data in the record is ordered in a certain sequence, like the steps of a ladder, and the search for data can only be carried out by sequentially “descent” from step to step. Searching for any data element in such a system can be quite labor-intensive due to the need to sequentially go through several previous hierarchical levels. A hierarchical database is formed by a directory of files stored on disk; The directory tree, available for viewing in Norton Commander, is a clear demonstration of the structure of such a database and the search for the desired element in it (when working in the MS-DOS operating system). The same database is the family genealogical tree.

Figure 1. Hierarchical database model

Network database

This database is more flexible, since it is possible to establish horizontal connections in addition to vertical hierarchical connections. This makes it easier to find the required data elements, since it no longer requires going through all the previous steps.

Figure 2. Database network model

Relational database

The most common way to organize data is the third, which can be reduced to both hierarchical and network - relational (English relation - relationship, connection). In a relational database, a record means line rectangular tables. The elements of the record form columns this table (fields). All elements in a column have the same type (numeric, character), and each column has a unique name. There are no identical rows in the table. The advantage of such databases is the clarity and clarity of data organization, the speed of searching for the necessary information. An example of a relational database is a table on a class journal page, in which the entry is a row with data about a specific student, and the field (column) names indicate what data about each student should be recorded in the table cells.

The combination of a database and a DBMS program forms an information retrieval system called data bank.

1. Based on data processing technology, databases are divided into centralized and distributed. A centralized database is stored in the memory of one computer system. If this computer system is a component of a computer network, distributed access to such a database is possible. This method of using databases is often used on local PC networks. A distributed database consists of several, possibly overlapping or even duplicating parts, stored in different computers on a computer network. Work with such a database is carried out using a distributed database management system (RDBMS).

Rice. 3. Relational database model

2. Based on the method of accessing data, databases are divided into databases With local access and databases with remote (network access). Centralized database systems with network access require different architectures of such systems: file server; client-server.

File server

The architecture of database systems with network access involves the allocation of one of the network machines as a central one (file server). A shared centralized database is stored on such a machine. All other machines on the network perform the functions of workstations that support the user system's access to the centralized database. Database files, in accordance with user requests, are transferred to workstations, where most of the processing is done. With a high intensity of access to the same data, the performance of such an information system decreases. Users can also create local databases on workstations, which they use exclusively. The information processing scheme based on the file-server principle is shown in the figure.

Client-server

Unlike the previous system, the central machine (database server), in addition to storing the centralized database, must carry out the bulk of the data processing. A request to use data issued by a client (workstation) results in searching and retrieving data on the server. The extracted data is transported over the network from the server to the client. A specific feature of the client-server architecture is the use of a language - SQL queries.

Many, having begun to explore the world Web, still have no idea what it is Database. But almost all Internet users have already used it at least once - saving user data on the site, processing search queries and much more. Most of the data is stored in the Database, and in order to display certain information, it processes a request for the database. So what is it?

Database- a complex of data (information) that is structured and interconnected.

An example is library. Yes, yes, there are not just books on the shelves, but there are various types of Catalogs in which a librarian can find a specific book (by alphabet - by author or title, by shelf, by subject). Thus, having accepted a request for a book, it was then possible to find it based on a certain criterion. We can say that data was stored and processed in the library. But wouldn’t the data be of such interest if they couldn’t also be managed! So we come to the next term.

Database Management System is a set of language and software tools, the main functions of which include the ability to create data, process it and read it, delete it and carry out secure control of the database.

In general, a DBMS is a system that allows you to create databases and manipulate information from them. And it provides this access to DBMS data through a special language - SQL.

SQL- a universal structured query language, the main tasks of which include reading, writing and deleting information in the Database.

From the history of SQL

In the early 1970s, in one of the company's research laboratories IBM an experimental relational DBMS IBM System R was developed, for which a special language was then created SEQUEL, which made it relatively easy to manage data in this DBMS. The abbreviation SEQUEL stood for Structured English QUEry Language- “structured English query language”. SEQUEL was later renamed to SQL.

The date of creation is considered to be 1974.
The authors are considered Donald Chamberlin, Raymond Boyce.
The first standard was adopted in 1986.

What is MySQL

MySQL- a database management system that can work with PHP, Java, Perl, C, C++ and other programming languages. One of the most widespread DBMS in the world. Included in popular portable server builds Denwer And XAMPP, as well as to servers WAMP, LAMP, AppServ. Written in C, C++. developer - Oracle(since 2010).

Examples of SQL queries

Will display a list of ALL databases.

SHOW databases;
Will list ALL tables in the base_name Database.

SHOW tables in base_name;
Selects ALL data in the tbl_name table.

SELECT * FROM tbl_name;
More in detail requests can be found in the article