How to set up smartphones and PCs. Informational portal

Databases: basic concepts. Abstract: Database

What is a database in computer science

In computer science, the concept of a database is a collection 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 mean the ability to individually or collectively add information, sort it, copy or completely copy and move it, combine two or more databases. To manage databases, software products have been created, which are database software. They are called DBMS - database management systems.

What is DBMS and SQL

This is what consumers are dealing with, that is, you and I. Modern DBMS can process not only text or graphics, but also media files (audio and video files).

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

It should be noted that by the nature of their use, DBMSs are divided into single-user (for one user - a local computer) and many user (for networks).

I'm sure you don't think there is one universal DBMS. And rightly so, there are dozens of them. Within the framework of this section, we will limit ourselves to working with the free and most widespread MySQL database management system.

MySQL DBMS

MySQL DBMS works only with relational databases. Relational databases are the easiest to learn initially. 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.

DB is an acronym that stands for "database" or "databases" (depending on the context). In this article, we will consider what she / they are, what they are and where they are used. We will also discuss whether DBMS and DB are the same or not.

Terminology

A database is a structured storage of information. A database is also capable of containing some data, with the condition that they will necessarily be ordered. Each of us has worked with a database at least once, but could not even guess about it, for example, by entering a search query, we turn to a large-scale database for specific information.

DBMS is another abbreviation, which is deciphered as In a general sense, they represent various software solutions with which you can organize database data. This means filling the database with information, ordering it, deleting, copying, analyzing and much more.

DB types

In theory, there are several types of them. There are:

  • Relational databases (from the English word relation, which translates as "connection") - are characterized by relationships and expressed in a set of interrelated entities. The latter are presented in the form of tablets, which contain database data. This is the most common
  • Hierarchical - relationships at the level of "ancestor-child", "boss-subordinate".
  • Network - a branch from the previous type.
  • Object oriented ones that work directly with the corresponding methodology

Let's consider each of them in more detail, along the way dwelling on the basic ideas and concepts of the database.

Is the DB a sign?

In their usual presentation, they are not difficult to understand - these are tablets with information. To clarify, you can call for help from a very famous DBMS from Microsoft - "Access", which is part of their usual office suite of applications.

Relational database tables have records (rows) and fields (columns). The former contains directly information, data, the latter contain descriptions of what exactly the records mean. For example, the field is "name", the record is "Katerina".

Value types are specified for fields. They can be numeric, character, date, time, and so on. In addition, each table must have a key field - records in it uniquely identify the data.

It should be understood that the database itself is not a table. The database can store from one to several hundred tables, depending on the amount and variety of information.

Relationships between tables

To provide links between tables, the DBMS has data schemas. Connections are:

  • "One-to-one" - each record of the table corresponds to only one record from another table.
  • One-to-many and many-to-many. Several records from a related table can correspond to one record. And vice versa (for the second option).
  • Many-to-many. It is already easy to guess that in this case, for several rows, several rows of another table can be selected for connection (such a connection is organized using an intermediate table and two links of the above type).

Up and down movement

Hierarchical databases have a much clearer structure than relational ones. They are characterized by strict obedience. There is a root element - "top", from which subordinates branch off - "descendants" or "descendants". A hierarchical database is a base with a tree structure, in which each node can have only one ancestor.

This type is convenient to use for building information storages of an already ordered structure: for example, a database of a military unit or a file manager. The disadvantage is the impossibility for a node to have more than one ancestor, as well as the complexity of the database logic.

Expanding connections

Networked databases have become a solution to the lack of hierarchical, named just above. The only difference of this type from the previous one is the many-to-many relationship, which in this case is manifested in the fact that both an ancestor can have many descendants, and they, descendants, can descend from several nodes at once.

Tabular display method

Despite the fact that tables are associated primarily with relational databases, both hierarchical and network tables can also be represented in the form of tables. The main difference between these types is precisely in the principle of constructing a structure: relational, in comparison with the other two, are much freer and less ordered.

Object oriented type

The last type to consider, object-oriented, is the least common. This is because he is very highly specialized. The complex data structures of such a database form an object and work directly with object-oriented programming languages. They were developed in the eighties of the last century and have not yet received great popularity due to their complexity and not very high performance.

Many, starting 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 - storing 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 are structured and interconnected.

An example is library... Yes, yes, there are not just books on the shelves, but there are various types of Catalogs by which the librarian can find certain books (alphabetically - by author or title, by shelf, by topic). Thus, by accepting a request for a book, then it was possible to find it on a certain basis. We can say that data was stored and processed in the library. But wouldn't the data be so interesting if it couldn't be manipulated as well! This brings us 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 and read them, delete and implement safe 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 the DBMS data through a special language - SQL.

SQL- a universal language of structured queries, 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 possible to relatively easily manage data in this DBMS. The abbreviation SEQUEL stands for Structured English QUEry Language- "structured English query language". Later, for legal reasons, the SEQUEL language was renamed to SQL.

1974 is considered the date of creation.
Authors are Donald Chamberlin, Raymond Boyes.
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 widely used database management systems in the world. Included in popular portable server builds Denwer and XAMPP as well as servers WAMP, LAMP, AppServ... Written in C, C ++. developer - Oracle(since 2010).

Examples of SQL queries

Will list ALL databases.

SHOW databases;
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 the requests can be found in the article

VALUES OF THEORY. The concept of meaning in the analytical philosophy of language is actually an analogue of what in the philosophy of consciousness is called “mind”, “consciousness” (English), or “Geist” (German), i.e. consciousness, spirit. In terms of meaning ... ... Encyclopedia of Epistemology and Philosophy of Science

The ages, which are in good agreement with each other, obtained by the lead isotope method according to decomp. isotope ratios. They testify to the good preservation of the milk and the reliability of the found abs. age. Syn .: age values ​​are concordant. ... ... Geological encyclopedia

The theoretical values ​​of the derivatives of the potential corresponding to the idealized model of the Earth. They are negligible or exactly equal to zero, therefore the measured values ​​of the second derivatives of the gravitational potential can be practically considered ... ... Geological encyclopedia

- (g 0) theoretical values ​​of the force of gravity acting on a unit mass correspond to such a model of the Earth, in which the density inside the spherical shells is constant and changes only with depth. The structure of their analytical expression ... ... Geological encyclopedia

Syn. the term meanings of age are inconsistent or divergent. Geological Dictionary: in 2 volumes. M .: Nedra. Edited by K. N. Paffengolts and others. 1978 ... Geological encyclopedia

Obtained by the lead isotope method according to four dec. Isotopic ratios:, and strongly divergent in magnitude. They testify to the poor preservation of the baby and to the violation of the radioactive balance in it between the maternal and ... ... Geological encyclopedia

Syn. the term meanings of age are consistent. Geological Dictionary: in 2 volumes. M .: Nedra. Edited by K. N. Paffengolts and others. 1978 ... Geological encyclopedia

abnormal operating mode parameter values- data of anomalous operation [Intent] Parallel texts EN RU The P63x generates a large number of signals, processes binary input signals, and acquires measured data during fault free operation of the protected object as well as fault ... ...

Terms and concepts of general morphology: Dictionary-reference

verb orientation meanings- Values ​​of spatial modification of actions and their derivatives ... Dictionary of linguistic terms T.V. Foal

values ​​(voltage) between line and earth- - [Ya.N. Luginsky, M.S.Fezi Zhilinskaya, Y.S.Kabirov. English Russian Dictionary of Electrical Engineering and Electric Power Engineering, Moscow, 1999] Subjects of electrical engineering, basic concepts EN line to ground values ​​... Technical translator's guide

Books

  • , A. Potebnya. Reproduced in the original author's spelling of the 1888 edition (Voronezh publishing house). V…
  • Plural Values ​​in Russian, A. Potebnya. This book will be produced in accordance with your order using Print-on-Demand technology. Reproduced in the original author's spelling of the 1888 edition (Voronezh publishing house ...

The continuously growing volume of information coming through all the media to each person individually and to humanity in general is constantly growing, and it definitely needs to be stored and processed. Therefore, the development of the means allowing to systematize, accumulate and rationally use all information becomes a necessity in everyone's life. This is what various DBMS are intended for - database management systems.

DBMS - terms and definitions

The database is a multifaceted concept. In the general case, a database (DB) means a set of information, combined according to some criterion. For example, a telephone directory or a company's price list can be referred to as a database.

Information databases also have a narrower definition. They are understood as a storage of information structured in an optimal way for machine processing. This is the most common definition, and it is better to take it as a basis.

Creation of a database, processing and search of all the necessary information in it is carried out using a database management system (DBMS). DBMS is a set of specific software tools that enable the user to quickly and efficiently interact with the database.

Comparing Access and Excel

What are the advantages of a database over other repositories of information, for example, spreadsheets, text editors, and so on? Excel spreadsheets are also best for comparison. This choice is due to the fact that both applications are included in the same package and are used to store data. Access is essentially a free database that comes as a bonus to the Word text editor and Excel spreadsheets.

So, the first problem in Excel is the lack of control over the correctness of the information entered. Sometimes there are duplicate data in the rows of a table, and any typo will lead to an error when grouping them. Excel cannot set rules for entering certain information. For example, if you need to enter a TIN of 12 digits, then Excel will not sound the alarm if the operator enters an extra character.

In Access, you can flexibly configure the restrictions on the information entered. It is also entered once in Access. If some data can be repeated, they are placed in a separate table, which can then be linked to other tables. This approach dramatically reduces the likelihood of errors associated with information input.

The number of rows in Excel cannot exceed 65536; in Access, the number of records is not limited at all. There is only a limit on the total file size - no more than 2GB.

Excel has built-in tools for sorting, filtering information, creating pivot tables and charts, but they pale in comparison to the capabilities of Structured Query Language (SQL) - the main tool for selecting and sorting data in any DBMS.

Obviously, a database is a better place to store information than Excel spreadsheets. The best solution would be to create a database for storing information, and analysis and calculations should be carried out in spreadsheets - both of these applications allow you to freely exchange all the information entered.

Database classification

Databases can be divided according to 4 criteria:

1. Used programming language. Open bases are based on one of the universal languages. Closed bases use their own programming language.

2. Functions performed. Information databases are designed to store and access information. Operating rooms allow complex information processing.

3. Scope of application. Distinguish between universal and specialized databases, designed to solve specific problems.

4. By "capacity" all databases are divided into corporate and desktop. The latter are of low cost, are designed for a single user, and have low requirements for technical means.

Corporate databases are designed to work in a distributed environment, support the simultaneous operation of many users, offer ample opportunities for the design and administration of the database.

5. By targeting the target audience. There are systems geared towards developers and end users. In the first case, the DBMS should have broad debugging capabilities for the designed database, be able to create an application not tied to the DBMS, it should include tools for creating complex and efficient end products.

Databases for end users must be simple, intuitive, and must have software protection against unintentional data corruption on the part of the user.

Database Models

There are 3 ways to store information in databases:

1. The hierarchical model can be represented as a tree. There is one object on the first level. Subordinate objects of the 2nd level are located below. Each object can have several subordinates of the lower level, but it is always associated with only one object of the higher level. The Windows operating system is an example of a hierarchical model.

2. The network model is an extension of the hierarchical one. It removes the limitation on the number of links between a lower-level object and a higher-level object. An example of such a model is the Internet, which is a globally distributed database.

3. The relational (tabular) model is the most common way of storing data. All data are collected in tables, between which you can establish links. We will dwell on this view in more detail.

Relational Database Model

Most modern DBMSs use a relational database design model.


Such databases are characterized by the following features:

1. All tables have the same structure.

2. Each table has a key field, the values ​​of which cannot be repeated.

3. Tables are linked through key fields, when the key field of one of them is brought into line with the key fields of other tables.

Scope of databases

The globalization of the economy, the development of computer technology and the spread of the Internet have created the preconditions for the introduction of computerized accounting systems. In life, at every step we are faced with the need and cases when a database is used. An example can be found in a library, where paper files have already been replaced by an electronic catalog, and in a supermarket, where trade automation has long been used. Accounting and management accounting, trade and warehouse - all this also cannot do without the use of a database.

They can be useful even for ordinary people. For them, a database is a set of word cards for learning a foreign language, an electronic diary, a collection of culinary recipes, and so on.

Access is the most common database

For these purposes, complex DBMSs tailored for corporate clients are not required. A desktop application per user is usually sufficient. And the best way to do this is an Access database. It is part of the MS Office suite. Access is focused on the end user and has a user-friendly interface. There is a huge amount of literature that deals with the database. A sample sample database is also included with Access.

A quick tour of Access

Let's consider its main features - most of them are typical for other databases. Here is a list of elements that make up any database: table, report, query, form.

The peculiarity of Access is that they are all stored in one file. Access has the concept of a data type. That is, you cannot enter text in a column that is assigned a numeric type, and vice versa. Such division of information by types gives rich possibilities for sorting, selection, control over the entered values.

The input itself does not take place in tables, but through the interface configured by the programmer. Thus, it is possible to ensure the safety of information in the table - the user simply will not have access to it. In addition, the data entry itself will be comfortable and convenient.

A special language, SQL, is responsible for fetching data from tables. It is approximately the same for different DBMSs, although individual commands in them may differ. In Access, selection is done using queries. Queries are dynamic in nature, that is, when new data is entered into tables, the results returned by the query will change. The query result can also be viewed in a readable form in the form of a report.

A report is a document template that, when opened, fills in data from a query or table. Access has created a flexible system of data exchange, primarily between the various applications of the Office suite. Data from Access can be easily transferred to Word or Excel. Then you can send them by e-mail, carry out the necessary calculations and export again to Access.

A database is also a programming environment. Access includes a powerful programming language, Visual Basic for Application (VBA). It allows you to create fairly complex applications, including those for commercial use.

Database trends

The availability of the Internet and the proliferation of mobile devices are driving the development of the cloud. In other words, all data is stored on a remote server, and information processing occurs there. This allows, for example, a businessman to have access to up-to-date information anywhere in the world - all he has to do is go online from a tablet or smartphone. He can also remotely make changes to his database.

Such services are already working and are becoming more and more popular - for example, there are warehouse and trading programs brought online. To work according to this scheme, you do not need to buy a powerful computer or purchase expensive software. Firms that provide such services usually charge a small subscription fee to connect to their service.

Top related articles