What types of databases exist. What are databases and where are they used? Subd - terms and definitions

Federal Agency for Education

State Educational Institution

Secondary Vocational Training

"Tula Economic College"

In the discipline "Informatics"

On the topic: “Database. The concept of a database. Types of databases. Objects for working with databases. Data types in Access databases and tables. Basic elements and concepts of databases"

Prepared by a 2nd year student

group 216-BP

Khramova Anna

Checked by the teacher:

Vasilyeva I.V.

Shchekino, 2007

WITH ABOUT D E R AND A N AND E:

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

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

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

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

5. Types of data in databases………………………………………………….8

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

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

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

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

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

11. List of references……………………………….20

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

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

INTRODUCTION:

We met Excel work and we know that this application was created specifically to solve problems of processing tabular data.

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

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

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

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

To develop programs and program systems that work with databases, special tools are used - database management systems (DBMS).

The DBMS usually includes special language programming and all other tools necessary for the development of these programs.

Currently, the most well-known DBMSs are FOXPRO and ACCESS. The latter is part of the MS Office 97 professional package.

This modern systems with great capabilities, designed for the development of complex software systems, and getting to know them is extremely useful for a computer user, but it is difficult to implement within the framework of this manual.

Database concept

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

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

Types of database:

1. Factual – contains brief information about objects of some system in a strictly fixed format;

2.Documentary – contains documents of the different types: text, graphic, sound, multimedia;

3. Distributed - a database, different parts of which are stored on various computers, united in a network;

4.Centralized – database stored on one computer;

5. Relational - a database with a tabular organization of data.

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

Working with a database requires a solution various tasks, the main ones are the following:

Creating a database, writing data to the database, updating data, retrieving data from the database according to user requests.

The tasks on this list are called standard.

The next concept related to the database: a program for working with a database is a program that provides a solution to the required set of problems. Any similar program must be able to solve all standard set of problems.

Database in different systems has a different structure.

PVEM usually uses relational databases - in such databases, a file is structured like a table. In it, the columns are called fields, the rows are called records.

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

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

Some queries may represent a serious task that requires writing complex program. For example, a request to the database - the bus schedule: determine the difference in the average departure interval of buses from Rostov to Taganrog and from Rostov to Shakhty.

Objects For work With bases data

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

data set

data source

visual controls

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

Table

DataSource

DBGrid

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

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

Why do we need an intermediary component? Why not connect to Table straight away?

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

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

DB – data set – data source – visual components – user

Data set:

Table (table, navigation access)

Query (query, relational access)

Visual components:

Grids DBGrid , DBCtrlGrid

Navigator DBNavigator

All sorts of analogues Label , Edit etc.

Substitution Components

Data types in databases

You can define the following field types in Access:

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

MEMO field – text up to 65535 characters long

Numeric – in the “Field Size” parameter you can specify a field: byte, integer, real, etc.

Date/time – a field that stores time data.

Monetary – special format for financial needs, which is essentially numerical

Counter is an auto-incrementing field. When adding a new record, the internal counter of the table is increased by one and written to this field of the new record. Thus, the values ​​of this field are guaranteed to be different for different records. The type is for a key field

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

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

Substitution

Data types in tables Access :

Text

MEMO field

Numerical

Date Time

Monetary

Counter

Logical

An object OLE

Don't forget about indexes.

Link tables.

Integrity communication controls cascading deletion and modification of data.

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

Basic concepts and elements of databases

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

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

As soon as computers appeared and spread, almost immediately they were entrusted with the hard and painstaking work of processing and structuring data, and databases (DBs) in their current understanding appeared.

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

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

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

holistic (all data must be linked, there should be no references to data that does not exist in the database)

Relational database model was proposed by Edgar Codd in the late 70s. In this model, a database is a set of tables connected to each other by relationships. With sufficient simplicity (and therefore ease of implementation on a computer) this model has the flexibility to describe complexly structured data. In addition, the theoretical basis for this model has been thoroughly developed, which also makes it possible to use the computer more effectively when creating a database and working with it. In terms of communication rules in relational model a one-to-many relationship between tables is implemented. This means that one record in the main table corresponds to several records in the subordinate table (and may not correspond to a single record). Other types of relationships: one-to-one, many-to-one, and many-to-many can be reduced to this one-to-many type. Relational databases consist of related tables.

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

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

Index – a field, just like a key, specially allocated in a table, the data in which, however, can be repeated. They also serve to speed up access and, in addition, for sorting and selection.

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

First normal form:

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

there are no repeating field groups in the table

Second normal form:

the first form is completed;

any non-key field is uniquely identified key fields(in fact, a requirement for a key)

Third normal form:

second form completed

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

The requirement of third normal form has the meaning that a table with fields (Name, Last name, Class, Class teacher) needs to be split into two tables (Name, Last name, Class) And (Class, Homeroom teacher), since the Class field uniquely defines the Class Teacher field (and according to the third form, only keys should uniquely define it).

To gain a deeper understanding of the intricacies of performing operations with records in tables, you need to have an understanding of access methods, transactions and business rules.

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

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

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

Correct database:

- non-redundant;

- consistent;

- holistic

Relational database:

- tables;

- connections between tables using keys

- fields (columns) – fixed;

- records (rows) – easily added and deleted

- uniquely identifies the record

Keys and indexes:

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

Normal forms:

- serve to combat data redundancy;

- they demand a lot, but with the best intentions

Access methods:

- navigation;

- relational

Database correctness protection:

- transactions – technical protection

- business rules – logical protection

T E S T

1.Database models:

A) commercial

B) network

IN) object-oriented

G) revolutionary

D) relational

E) integral

2.Types of database:

A) documentary

B) network

IN) graphic

G) relational

3.Which database contains documents of various types?

A) distributed

B) centralized

IN) factual

G) documentary

4.What is an example of a database?

A) pedestrian standing on the side of the road

B) phonebook

IN) schedule of lessons

G) train or bus schedule

5. What is a key?

A) link B) a codeword IN) program G) table field or combination of fields

6. What will be displayed on the screen as a result of executing a program fragment?

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

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

Answers to the test

Questions For self-tests :

1. What is a database?

2. What is a classic example of a database?

3. Give some database examples

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

5. What types of databases do you know?

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

7. What types of fields can you define in Access?

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

9. What is the relational database model?

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

11. What are transactions?

L AND T E R A T U R A :

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

2. Computer science. Textbook for students. ped. universities / A.V. Mogilev; N.I.Pak, E.K. Hoenner; Ed. E.K. Hoenner. – M., 1999. - 816 pp. 185 - 187

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

R E C E N S

Every website owner knows that for the website to function properly, you need not only files with page code, but also databases. Database management systems (DBMS) are used to interact with databases. In this article I want to talk about databases and DBMSs, what types exist, and how they differ from each other.

Database

The database is specific set data, which, as a rule, are connected by a unifying feature or property (or several). This data is organized, for example, alphabetically. The abundance of different data that can be placed in a single database leads to many variations in what can be recorded: user personal data, records, dates, orders, and so on. For example, if you have an online store, then your website database may contain price lists, a catalog of goods or services, reports, statistics and customer information.

First of all, this is convenient because information can be quickly entered into a database and just as quickly retrieved if necessary. If at the dawn of the development of web development all the necessary data had to be written in the page code, now there is no such need - necessary information can be queried from the database using scripts. Special algorithms storage and retrieval of information, which are used in databases, allow you to find the necessary information literally in a fraction of seconds - and when working in virtual space The speed of a resource is more important than anything else.

The relationship of information in the database is also important: changing one line can lead to significant changes in other lines. Working with data this way is much easier and faster than if the changes affected only one place in the database.

However, this does not mean that every site must have a database - for example, if you have a business card site, and no new information If you don’t post it on the website, then you simply won’t need the database. Most easy way make a simple website - create .

Database Management System

As you might guess from the name, a database management system (or DBMS for short) is software that is used to create and work with databases. The main function of a DBMS is data management (which can be in both external and external random access memory). The DBMS necessarily supports database languages, and is also responsible for copying and restoring data after any failures.

As for the classification of databases, various options are possible.
For example, you can divide the databases by data models: hierarchical (have a tree structure), network (similar in structure to hierarchical ones), relational (used to manage relational databases), object-oriented (used to object model data) and object-relational (some kind of merging of relational and object-oriented types of databases).

Or, if the division is based on where is the DBMS located?, they can be divided into local - the entire DBMS is located on one computer, and distributed - parts of the database management system are located on several computers.

File-server, client-server and embedded - these are the names DBMSs bear if we divide them by way to access databases. File server DBMSs are currently considered obsolete; Basically, client-server systems are used (DBMSs that are located on the server along with the database itself) and embedded systems (which do not require separate installation) systems.

The information that is stored in databases is not limited to text or graphic files- modern versions of the DBMS also support audio and video file formats.

In this article I will focus on DBMSs that are used to store information from various web resources.

Why are these DBMSs needed? In addition to their main function - storing and systematizing a huge amount of information - they allow you to quickly process client requests and provide fresh and relevant information.

This also applies to changes you make - instead of changing information in every file on the site, you can change it in the database, and then the correct information will immediately be displayed on each page.

Relational DBMS and SQL language

Relational and object-relational DBMSs are among the most common systems. They are tables in which each column (called a “field”) is ordered and has a specific unique name. The sequence of rows (they are called “records” or “records”) is determined by the sequence in which information is entered into the table. In this case, processing of columns and rows can occur in any order. Tables with data are interconnected special relationship, thanks to which you can work with data from different tables - for example, combine them - using one query.

To manage relational databases, a special programming language is used - SQL. The abbreviation stands for “Structured query language”, translated into Russian “language structured queries».

The commands that are used in SQL are divided into those that manipulate data, those that define data, and those that manipulate data.

The scheme for working with the database looks like this:


MySQL

MySQL is one of the most popular and widespread DBMS, which is used in many companies (for example, Facebook, Wikipedia, Twitter, LinkedIn, Alibaba and others). MySQL is relational DBMS, which refers to free software: It is distributed under the terms of the GNU Public License. Typically, this database management system is defined as a good, fast and flexible system recommended for use in small or medium-sized projects. MySQL has many different advantages. For example, it supports Various types tables: both the well-known MyISAM and InnoDB, and the more exotic HEAP and MERGE; in addition, the number of supported types is constantly growing. MySQL executes all commands quickly - it is perhaps the fastest DBMS in existence right now. This database management system can work simultaneously unlimited amount users, and the number of rows in tables can be 50 million.

Since, in comparison with some other DBMS, MySQL supports fewer features, it is much easier to work with it than, for example, with PostgreSQL, which will be discussed below.

The first version of MySQL was released back in 1995, and since then there have been several subsequent releases, each of which brought significant changes.

To work with MySQL, not only text, but also graphics mode. This is possible thanks to the phpMyAdmin application: you don’t even need to know SQL commands to work in the application, and you can administer your database directly through your browser.

In general, it can be noted that MySQL is the choice of those who need a DBMS for a small or medium-sized project, fast and easy to use and without administration difficulties.


PostgreSQL

This freely distributed database management system belongs to the object-relational type of DBMS. As with MySQL, PostgreSQL is based on the SQL language, however, unlike MySQL, PostgreSQL supports the SQL-2011 standard. This DBMS has no restrictions on maximum size database, nor the maximum of records or indexes in the table.

If we talk about the advantages of PostgreSQL, then, of course, it is the reliability of transactions and replications, the possibility of inheritance and easy extensibility. PostgreSQL supports various extensions and programming language options such as PL/Perl, PL/Python, and PL/Java. It is also possible to load C-compatible modules.

Many people note that, unlike MySQL this DBMS has good and detailed documentation that answers almost all questions.

The fact that this is a larger DBMS than MySQL is also evidenced by the fact that PostgreSQL is periodically compared to such a powerful data management system as Oracle.

All this allows us to talk about PostgreSQL as one of the most advanced DBMS at the moment.


SQLite

At the moment this is one of the most compact DBMS; it is also embedded and relational. SQLite allows you to store all data in one file and, due to its small size, is distinguished by enviable performance. SQLite differs significantly from MySQL and PostgreSQL in its structure: the engine and interface of this DBMS are in the same library - and this is what allows you to execute all queries very quickly. Other DBMSs (MySQL, PostgreSQL, Oracle, etc.) use the client-server paradigm, when interaction occurs through a network protocol.

Disadvantages include the lack of a user system and the possibility of increasing productivity.

SQLite can be recommended for use in projects where you need to be able to quickly migrate an application and there is no need for scalability.


Oracle

This DBMS is of the object-relational type. The name comes from the name of the company that developed this system, Oracle. Along with SQL, the DBMS uses a procedural extension called PL/SQL, as well as the Java language.

Oracle is a system that has been stable for decades, so it is chosen by large corporations for which reliability of recovery after failures, a streamlined backup procedure, the ability to scale and other valuable features are important. In addition, this DBMS provides excellent security and effective data protection.

Unlike other DBMSs, the cost of purchasing and using Oracle is quite high, and this is often a significant obstacle to its use in small companies. This is probably also the reason why Oracle is only in 6th place in the 2016 DBMS ranking in Russia.



MongoDB

This DBMS is different in that it is designed to store hierarchical data structures, and therefore it is called document-oriented (it is a document storage without using tables or schemas). MongoDB is open source.

Using an identifier, you can perform quick operations on an object; This DBMS also performs well in complex interactions. First of all, we are talking about performance - in some cases, an application written in MongoDB will run faster than the same application using SQL, because MongoDB belongs to the NoSQL DBMS class and uses SQL instead object language queries, which is much lighter than SQL.

However, this language also has its limitations, and therefore MongoDB should be used in cases where there is no need for complex and non-trivial selections.

Instead of a conclusion

Choosing a DBMS is an important point when creating your resource. Start from your tasks and capabilities, try and experiment to find exactly the option that will be most suitable.

A database is a data repository in which data is stored in an organized manner.

This facilitates functions such as retrieving, updating and adding new data. Databases have numerous uses and benefits when it comes to large volumes of data.

Do you know that?
"Database Integration" has led to a revolution in the business, IT, and educational sectors by providing a wide range of capabilities for data management and analysis.

Database structure

The database system consists of the following elements:

Tables: Data is stored in rows (records) and columns (fields).

Shapes: Forms are designed for the purpose of entering new data. To make it easier and error-free to add information to the database through a form, rather than entering data directly into the table.

Requests: Queries are written to retrieve rows and/or columns based on a predefined state.

The most famous databases are: MySQL, SAP, Oracle, IBM DB2, etc. DBMS or "database management system" is used as an interface for communication between the user and the database.

What are databases and where are they used?

Data Storage/Insertion: The initial phase (before data entry) involves creating data structures such as tables (with required quantity rows and columns). The data is then entered into this structure.

Data recovery: Databases are used when data that will be stored in large quantities needs constant search. This makes the extraction process specific information easier.

Modification data: Static data does not need to be updated. However, dynamic data needs constant modification. Consider the age of employees in the organization. It must be updated every year (periodic update).

Example

Consider an entertainment club that has a large number of registered people. The Secretary must continually monitor the contact details of all registered users. If these records are stored in a series technical descriptions or lists, changing details is a time-consuming task. Because, data extraction and modification must be done on all sheets containing these records in order to maintain consistency. Therefore, it is advisable to use a well-defined database.

Benefits of Databases

Storage capacity: Databases store large quantity data compared to other data stores. Small-sized data can fit into spreadsheets or documents. However, when it comes to heavy data, databases are the best choice.

Data association: Data records from separate tables can be linked. This is necessary when a particular piece of data exists in more than one table. For example, employee IDs may exist in data such as "Payroll" as well as "employees". Communication is essential in order to have consistent changes across multiple places and the same data.

Multiple users: Permissions can be granted for multiple access to the database. This allows multiple (more than one) users to simultaneously access and manipulate data.

Delete data: Unwanted data requests to be removed from the database. In such cases, records must be deleted from all related tables to avoid any data violation. It is much easier to delete records from a database using queries or forms rather than from other data sources such as tables.

Data Security: Data files are kept secure in most cases. This feature ensures that attackers do not gain illegal access to the data and that its quality is maintained.

Import: This is another important point in using databases. It allows you to import external objects (data from other databases). Import is mainly done for a table or query. When entered, the database creates a copy of the imported object.

Export: IN in this case, tables or queries are imported by other databases.

Data Links: This is done in order to avoid creating a copy of the object in the database. The link is defined to the required source database object.

Data sorting / Filtering: Filters can be applied to data that has same values data. An example of identical data could be the names of employees of an organization with similar last names or first names. Similarly, data can be sorted in either ascending or descending order. This helps in viewing or printing the results in the required order.

Database indexing: Most databases contain an index for the stored data, which ultimately increases access time. The fact that linear data retrieval takes a long time makes this feature the most popular.

Continuous related data changes: Tables with shared data can be associated with keys (primary, secondary, etc.). Keys are very useful because change general organization in one table is also reflected in related tables.

Reduces overhead costs: Data transfer takes a lot of time. Transactions using queries are very fast, thus producing faster results.

Databases simplify the whole point of storing and accessing information. However, forethought is required on the part of the database creator so as to have the most effective database possible.

The article talks about the role of databases in modern realities and creates a definition. In addition, the types of databases and their classification based on the data storage structure are indicated. MySQL as a reference DBMS for storing data on the Internet.

Even before the appearance information technologies people had a need for orderly storage of certain data. For convenience, they were divided according to certain criteria, combined into groups, created a hierarchical representation, and many other methods were used.

With development computer equipment and the Internet, most of the methods that were previously used in libraries and archives were taken as the basis for storing data on storage media. In the case of Internet spaces, data is stored on a specific medium that is present in the server machine. A server to host the database can be ordered from Rackstore.

From the point of view of computer science, a database is the storage of information in an ordered form, following a certain system pre-established by the developer.

Stand out the following types database structure:

  • hierarchical;
  • network;
  • relational;

Let's look at each of them.

Hierarchical database

A hierarchical database is understood as a database in which data is stored and structured according to the principle of dividing elements into parent and child ones. The advantage of such databases is the ease of reading the requested information and its quick provision to the user.

The computer is able to quickly navigate it. The hierarchical principle is taken as the basis for structuring files and folders in the operating room Windows system, and the registry stores information about the operating parameters of certain applications in a hierarchically structured form.

All Internet resources are also built on a hierarchical principle, since when using it it is very easy to navigate within the site.

An example is the database on XML language, containing essays about the state Agriculture in regions of Russia. In this case parent element the state will come forward, then there will be a division into subjects, and within the subjects there will be its own branching. In this case, there is strictly one call from the top element to the bottom one.

Network Database

A network database is understood as a modified hierarchical one. Its peculiarity is that elements can be connected to each other in violation of the hierarchy. That is child element can have several ancestors at the same time.

In this case, too, an example is a database based on the XML language.

Relational database

This type of database refers to its presentation within a two-dimensional table. It has several columns in which parameters such as, for example, the type of input data (text, number, date, etc.) are set.

The table here is a way to store data entered into it and is capable of responding to any requests from the DBMS. the main problem in working with relational databases lies in their proper design.

When designing a database, you should consider the following two factors:

  1. the database must be compact and not contain redundant components;
  2. Database processing should be simple.

The problem is that these factors contradict each other. But design is the most important moment when compiling a database and further work with her. It is recommended that this be done by a server administrator with some experience.

IN major projects many tables are involved, which can be more than a hundred. At the same time, it is impossible to do without them if a person is dealing with an important and complex project.

Before creating a table, you should create a chart or diagram that contains information about the types of information stored, as well as the type of data that is best suited for such purposes.

DBMS

Database management system is a term that does not need to be deciphered. It is a built-in module or full-fledged program, which is capable of working with data and making changes to databases.

There are two DBMS models - relational and schemaless. What relational databases are has already been discussed above. Schemaless DBMSs based on the principles of an unstructured approach relieve the programmer from the problems of the relational model, which include low performance and difficulty scaling data horizontally.

Unstructured databases (NoSQL) create structure as you go and eliminate the need for rigid creation certain connections between data. Here you can experiment with different ways access to certain types of data.

TO relational databases data include:

  • SQLite;
  • MySQL;
  • PostgreSQL.

Of these, the most common is the base MySQL data, but the rest are also popular and can be encountered.

The operating principle of such systems is to monitor a strict data structure, which is presented in the form of a set of tables. In turn, inside the table there are cells and fields that are also managed by MySQL.

The MongoDB database operates on the NoSQL principle. They store all data as a single unit in one database. In this case, the data can be a single object, but at the same time, any request will not remain unanswered.

Each NoSQL has its own query system, which requires additional study of this system.

Comparison of SQL and NoSQL

  1. If SQL systems are based solely on a strict representation of data, then NoSQL systems provide freedom and are able to work with any type of data.
  2. SQL systems are standardized, due to which queries are formed using SQL language. At the same time, NoSQL systems are based on technology specific to each of them, which is a disadvantage.
  3. Scalability. Both DBMSs are capable of providing vertical scaling, that is, increase the volume system resources for data processing. At the same time, NoSQL, being a newer type of database, allows you to use simple methods horizontal scaling.
  4. In terms of reliability, SQL has a strong lead.
  5. SQL databases have high-quality technical support due to their long history, while NoSQL systems are very young and it is more difficult to solve any problem.
  6. Storing data and accessing their structures within relational systems happens best in SQL systems.

Thus, although NoSQL is a rapidly growing type of database management system, at this stage It is recommended to opt for SQL.

The reliability of SQL systems, especially MySQL, has been confirmed by time and widespread use. Today, any self-respecting resource uses the MySQL system to store data.

You may not yet know what is included in the concept of a database, but the fact that you constantly use them is absolutely certain. Every time you search for something in a search engine, you are using a database. When you enter your username and password to log into a service, they are compared with the values ​​stored in the database of this service.

Despite the fact that we constantly use databases, it remains unclear to many what they really are. And this is partly due to the fact that the same database terms are used by people to define completely different things.

Let's understand the terms and concepts of databases:

Database- a set of information stored in some ordered way. You can compare a database to a cabinet in which documents are stored. In other words, a database is a data store. Databases themselves would not be of interest if there were no database management systems (DBMS).

Database Management System- is a collection of linguistic and software, which accesses data, allows it to be created, changed and deleted, ensures data security, etc. 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 is a structured query language whose main purpose is to provide a simple way to read and write information to a database.

So, simplest scheme working with the database looks something like this:

Based on the nature of their use, DBMSs are divided into single-user (designed to create and use a database on a personal computer) and multi-user (designed to work with a single database of several computers united in local networks). In general, the division by nature of use can be represented by the following scheme:

Without going into further detail, we note that today the number of DBMSs used is in the dozens. The most famous single-user DBMSs are Microsoft Visual FoxPro and Access, multi-user - MS SQL Server, Oracle and MySQL.

In these lessons we will use the MySQL DBMS. Firstly, it is free, and secondly, it is a de facto standard among Russian host providers. But more on that later, but for now let’s get back to the basics. The definition of a database says that it is information that is organized in some way. How are they actually ordered? This will be discussed in the next lesson.