How to create a database on hosting. How to create a database in MySQL Creating a database on a computer

Many of the domestic users know what a commotion arose in due time due to the modified interface of MS Office 2007, and what they did not pour on the developers! "Gurus" complained that the new office suite had become "inconvenient and strange", and therefore confidently predicted a quick death and complete oblivion of users.

In vain! Since nothing of the kind happened, on the contrary, it soon became clear that using the new version of the Office had become much easier and more convenient.

That is why (as expected) all the changes, the preconditions for which were created back in the “Office 2007”, not only successfully migrated to its new hypostasis, but also received their quite logical development. That is why the 2010 version has become extremely popular among professional users.

Changes in the new version of Access

Quite significant changes have also been made to the famous. Through the new component Sparklines, you can create and edit huge amounts of information. And thanks to the Slicer tool, it became possible to navigate easily and quickly even in huge databases. And all thanks to well-thought-out and tuned filtration systems.

What it is

To create databases correctly, you must first understand their essence. is a strictly organized structure designed to store and organize information. It can contain extremely diverse objects, but their logical unit is a table.

Their main difference from similar structures in the spreadsheet editor is that they are interconnected. By making a change to any element, you automatically initiate the replacement of all structures interconnected with it. Simply put, you no longer need to worry about manually editing huge information tables.

What operations can be performed using MS Access?

Do not assume that this application is a kind of "logical continuation" of Excel. The possibilities of the program under consideration are much wider. In particular, any MS Access presupposes careful thought over the information structure of a specific document, checking the integrity of the source data, as well as using this information to model queries, forms and reports.

Example of creation

Since you can create a database in Access using the "Wizard", which simplifies the work for novice users, the process itself is not particularly complicated. But we would not recommend going this way, since for productive work you need to understand all the processes that take place.

Start the application first. A dialog for creating a new document will appear on the monitor. In it, you should select the item "New database". In the field "File name" is entered meaningful it. Avoid repetitive and meaningless names: as a result of any mistake or your own inattention, you can easily lose important information.

After that, the "Create" button is pressed. Immediately after that, a new information table will appear on the monitor, on the basis of which you will create your project.

Which mode should you choose?

The table can be mounted in several modes, but we would recommend the "Constructor", as it is easier to control the entire process and to better imagine the entire internal structure of the document.

To go to it, use the transition "View-Constructor". After that, you can enter the desired name for a specific table. Since several of them may be required at once, we recommend, again, to use some meaningful names.

Now, in fact, the process itself. How do I create a database in Access? First of all, you need to select and fill in the field names, define and set the correct key field. Only then can you start filling the table with data.

To do this, use the "View-table mode" command. Note! If in the field "Item Code" in your case there is the value "Counter", then you do not need to fill in a specific field. When you finish the work on entering information, you can close it. If a specific database needs a second table, it is mounted using the "Create-Table Design" command.

Examples of bases

All of the above would be hollow without providing you with the "field experience" in which Access databases came in handy. Examples in this area can be discussed almost endlessly, but we will focus on an option that can seriously facilitate the passage of the educational process.

Let's briefly describe the creation of a document on What do you need to include in it? This should include the following fields: specialty code, group number, subject and teachers. Please note: the fields "Subject" and "Teacher" must be associated with additional tables, from which the program will draw the relevant information.

How it's done?

First, perform all the actions according to the above instructions. Go to the "Constructor", start filling in the fields. In the line with the specialty code, the data type must be marked as "Counter, key field".

In the "Group" and similar lines designate as "Text". But in the fields "Subject" and "Teacher" you should select "Substitution wizard". Don't worry: right after choosing this value, the program will show you a dialog box. By following its instructions, you can create links to other tables. As you can imagine, they should be created in advance.

As soon as you click on the "Finish" button, you will see a warning that you must save the table to create a link. Confirm the execution of this action.

Creating links between tables

We have already said that working with an Access database assumes that there are links between several spreadsheets at once. So how do you create them?

To do this, open the document you need, and then follow the path "Working with databases - Data schema". To define and set the nature of the relationship, you need to double-click the left mouse button in the dialog box "Change links". After that, you should click on the "OK" button. This will set the default One-to-Many setting.

So we looked at the question of how to create a database in Access. We hope you find this information useful.

15.2K

Databases on PCs evolved from desktop (desktop), or local applications, when in reality one application could work with a database, to shared database access systems.
The local application was installed on a single PC; there was also a database (DB) with which this application worked. However, the need for collective work with the same database entailed the transfer of the database to the server. The database application was also located on the server.

Less typical was another method, which consisted of storing the application that accessed the database on a specific computer of users ("clients"). New versions of local DBMS were released, which made it possible to create applications that simultaneously work with one database on a file server. The main problem was the explicit or implicit processing of transactions and the inevitable problem of ensuring the semantic and referential integrity of the database while changing the same data in the case of collective access.

The location of the database determines the so-called database architecture. There are four flavors of database architectures:

Local databases;

File-server architecture;

Client-server architecture;

Multi-tiered architecture.

The use of one architecture or another leaves a strong imprint on the general ideology of the application and on the application code.
When working with local databases, the databases themselves are located on the same computer as the applications that access them. The database is operated in single-user mode. The application is responsible for maintaining the integrity of the database and for executing queries against the database.
In a file-server architecture, the database and application are located on a network file server. Multi-user work with the same database is possible, when each user from his computer starts an application located on a network server. Then a copy of the application is launched on the user's computer. For each request to the database from the application, data from the database tables are transferred to the user's computer, regardless of how much data is actually needed to complete the query. The request is then executed.

Each user has a local copy of the data on his computer, updated from time to time from a real database located on a network server. At the same time, the changes that each user makes to the database may be unknown to other users until a certain point, which makes the task of systematically updating data on the user's computer from a real database urgent. Another urgent task is to block records that are changed by one of the users; this is necessary so that at this time another user does not make changes to the same data.

In a file-server architecture, the entire burden of querying the database and managing the integrity of the database falls on the user's application. The database on the server is a passive data source.
There are no major architectural differences between the single-user architecture and the file-server architecture. In either case, the so-called "personal" (or "desktop", "local") DBMSs, such as paradox, dbase, etc., are used as a DBMS. The database itself in this case is a set of tables, index files , files of comments fields (memo-fields), etc., stored in one directory on the disk as separate files.

During the operation, general drawbacks of the file-server approach were identified when providing multi-user access to the database.
The entire burden of the computational load when accessing the database falls on the client's application, which is a consequence of the principle of information processing in file-server systems: when a request is issued to retrieve information from a table, the entire database table is copied to the client's place, and the retrieval is carried out on the client location. Local DBMSs use the so-called "navigation approach" focused on working with individual records.

The resources of the client computer and the network are not used optimally; for example, if as a result of a query we need to get 2 records from a table of 10,000 records, all 10,000 records will be copied from the file server to the client computer; the result is increased network traffic and increased hardware requirements on the user's computer.
In a database on a file server, it is much easier to make changes to individual tables, bypassing the application, directly from the tools (for example, from borland's database desktop utility for paradox or dbase files); This possibility is facilitated by the fact that, in fact, for local DBMSs a database is a more logical concept than a physical one, since a database is a set of separate tables that coexist in a single directory on disk. All this suggests a low level of security - both in terms of theft and harm, and in terms of making erroneous changes.

An underdeveloped transaction apparatus for local DBMSs serves as a potential source of errors both from the point of view of simultaneously making changes to the same record, and from the point of view of rolling back the results of a series of operations over the base, combined in meaning into a single whole, when some of them failed. and some are not; this can violate the referential and semantic integrity of the database.
Disadvantages of desktop DBMSs usually do not appear immediately, but only during long-term operation, when the amount of stored data and the number of users become large enough - this leads to a decrease in the performance of applications using such DBMS.

Since desktop DBMSs do not contain special applications and services that manage data, but file services of the operating system are used for this purpose, all real data processing in such DBMSs is carried out in the client application, and any data access libraries in this case are also located in the address space of the client applications. Therefore, when executing queries, the data on the basis of which such a query is performed (it can be one or several tables in full, or, if you're lucky, one or more indexes and parts of tables selected with their help) must be delivered to the same address space of the client application ... This leads to network overload with an increase in the number of users and the amount of data, and also threatens other unpleasant consequences, for example, the destruction of indexes and tables. It is not without reason that utilities for "repairing" corrupted desktop DBMS files are still popular.
The drawbacks of the file-server architecture are addressed by the migration of applications to the client-server architecture, which marks the next stage in the development of DBMS. A characteristic feature of the client-server architecture is the transfer of the computational load to the database server (sql-server) and the maximum unloading of the client application from computational work, as well as significant strengthening of data security - both from malicious and simply erroneous changes.
In this case, the database is placed on a network server, as in the "file-server" architecture, but there is no direct access to the database (DB) from applications. The function of direct access to the database is carried out by a special control program - the database server (sql-server), supplied by the DBMS developer.

The client-server architecture separates the functions of the user application (called the client) and the server.
The client application forms a request to the server where the database is located in the structured sql query language, which is the industry standard in the world of relational databases. The remote server receives the request and forwards it to the sql database server. sql server is a special program that manages a remote database. sql-server provides the interpretation of the request, its execution in the database, the formation of the query execution result and its issuance to the client application. In this case, the resources of the client computer are not involved in the physical execution of the request; the client computer only sends a request to the server database and receives the result, after which it interprets it as necessary and presents it to the user.

Since the result of the request is sent to the client application, only the data that the client needs "travels" over the network. As a result, the load on the network is reduced. Since the request is executed where the data is stored (on the server), there is no need to send large data packets. In addition, the sql server, if possible, optimizes the resulting query so that it is executed in the shortest time with the least overhead. All this increases the system performance and reduces the waiting time for the query result.

When executing queries by the server, the degree of data security is significantly increased, since the data integrity rules are defined in the database on the server and are uniform for all applications using this database. This eliminates the possibility of defining conflicting rules for maintaining integrity. The powerful transaction apparatus supported by sql-servers allows you to exclude the simultaneous modification of the same data by different users and provides the ability to rollback to the original values \u200b\u200bwhen making changes to the database that ended abnormally.

The client application functions are:

Sending requests to the server;

Interpreting the results of requests received from the server and presenting them to the user in the required form;

User interface implementation.

sql server must be loaded when accepting client request. The database server functions are:

Receiving requests from client applications, interpreting requests, executing queries in the database, sending the query execution result to the client application;

Database integrity management, ensuring security system, blocking incorrect actions of client applications;

Storing business rules, frequently used queries in an already interpreted form;

Providing simultaneous safe from fault-tolerant multi-user work with the same data.

In the client-server architecture, so-called "remote" (or "industrial") DBMS are used. They are called industrial because it is the DBMS of this class that can ensure the operation of information systems of the scale of a medium and large enterprise, organization, bank. Local DBMS are designed for single-user work or to ensure the operation of information systems designed for small groups of users.
Oracle, informix, sybase, ms sql server, db2, interbase and a number of others belong to the category of industrial DBMS.

Typically, the sql server is managed by an individual employee or a group of employees (sql server administrators). They manage the physical characteristics of databases, optimize, tune and redefine various database components, create new databases, modify existing ones, etc., and grant privileges to various users.
In addition, there is a separate category of employees called database administrators. As a rule, these are server administrators, database developers or users who have privileges to create, change, and configure the optimal parameters of individual server databases. Database administrators are also responsible for granting multilevel access rights to the databases they maintain for other users.

Access mechanisms

When choosing a DBMS, it is necessary to have an idea of \u200b\u200bwhat development tools will be used to create an information system based on this DBMS, as well as how the developed applications will manipulate data. A lot depends on whether the data access mechanism is chosen correctly, in particular, application performance, the ability to use certain functional features of a given DBMS, the ease of developing a user interface, and a number of other factors.

There are several ways to access data from development tools and client applications.
The overwhelming majority of DBMSs contain libraries that provide a special application programming interface (api) for accessing the data of this DBMS. Typically, such an interface is a set of functions that are called from the client application. In the case of desktop DBMSs, these functions provide reading / writing of database files (DB), and in the case of server DBMSs, they initiate the transmission of queries to the database server and receipt of query results or error codes from the server, interpreted by the client application. Libraries containing api for accessing data of a back-end DBMS are usually part of its client software installed on computers where client applications run.

Recently, windows versions of client software for the most popular server DBMSs, in particular microsoft sql server, oracle, informix, also contain COM servers that provide objects for accessing data and metadata.
Using the client api (or client COM objects) is the most obvious way to manipulate data in an application. However, in this case, the created application will only be able to use the data of the DBMS of this manufacturer, and replacing it with another will entail rewriting a significant part of the client application code - client api and object models do not obey any standards and are different for different DBMSs.

Another way to manipulate data in an application is based on the use of universal data access mechanisms. A generic data access mechanism is usually implemented in the form of libraries and additional modules called drivers or providers. Libraries contain a certain standard set of functions or classes, often obeying one or another specification. Additional models specific to a particular DBMS implement direct access to the client api functions of specific DBMSs.

Note that the advantage of universal mechanisms is the ability to use the same abstract api, and in many cases - COM servers, components, classes for accessing different types of DBMS. Therefore, applications that use universal data access mechanisms are easy to modify if the DBMS needs to be changed.
The most popular universal data access mechanisms are the following:

open database connectivity (odbc). ole db. activex data objects (ado). borland database engine (bde).

Microsoft's generic odbc, ole db and ado mechanisms are essentially industry standards. As for the borland bde data access mechanism, it never became an industry standard, but until recently it was used quite widely, since before the release of delphi 5 it was practically the only universal data access mechanism supported by borland development tools at the component and class level

What is sql?

sql is often called Esperanto for DBMS. Indeed, there is no other language in the world for working with databases (DB) that would be so widely used in programs. The first sql standard appeared in 1986 and has gained universal acceptance by now. It can be used even when working with non-relational DBMSs. Unlike other software tools, such as the C and Cobol languages, which are the prerogative of professional programmers, sql is used by specialists from a wide variety of fields. Programmers, DBMS administrators, business analysts - all of them successfully process data using sql. Knowledge of this language is useful to everyone who has to deal with a database.

sql is a specialized non-procedural language that allows you to describe data, retrieve and process information from relational DBMS. Specialization means that sql is intended only for working with a database; it is impossible to create a full-fledged application system only by means of this language - for this, you will need to use other languages \u200b\u200binto which you can embed sql commands. Therefore, sql is also called an auxiliary language tool for data processing. An auxiliary language is used only in conjunction with other languages.

A general-purpose application language usually has tools for creating procedures, but sql does not. With its help, you cannot indicate how a certain task should be performed, but you can only determine what exactly it is. In other words, when working with sql, we are interested in the results, not the procedures for getting them. In other words, sql is a non-procedural language. The term "non-procedural" means that in this language you can formulate what exactly needs to be done with the data, but you cannot instruct how to do it. The sql language lacks algorithmic constructs such as labels, loop statements, conditional jumps, etc.

The most essential property of sql is the ability to access relational databases. Many even think that the expressions "database processed by sql" and "relational database" are synonyms. The sql-92 standard doesn't even have the term relation.
Suppose you have a database managed by some DBMS. To extract data from it, a query formulated in the sql language is used. The DBMS processes this request, retrieves the requested data, and returns it.

sql allows not only to retrieve data, but also to define the data structure, add and delete data, restrict or provide access to data, maintain referential integrity. sql itself is neither a DBMS nor a standalone product. It is a language used to interact with a DBMS and is, in a sense, an integral part of it.

2017-06-21


Create a MySQL database

Hello dear visitor!

Before proceeding with the next topic of creating a site, I want to apologize for the delay in writing articles. But, as they say, the reason is valid, since it was connected with work on other important projects. I hope that in the future, pressing matters will allow me to consider all the main stated issues on the development of the site in a regular mode, with a frequency of 1-2 articles per week.

This article begins the next part of the collection "Make a website from scratch with your own hands", which will mainly be aimed at developing and optimizing the site, filling it with content and the necessary functionality.

And in order to be able to fully develop the site in the future, we will not be able to do without considering such an important issue as working with the MySQL database (in what follows, the abbreviation "DB" will also be used to denote the MySQL database).

In this article, we will create a database on the local Denwer web server and on the hosting that hosts our site.

  • Why do you need a database
  • What is a MySQL database
  • Create a database on the local web server Denwer
  • We create a database on hosting

Why do you need a database

In previous articles, we were engaged in creating the basis of the site, which includes the following main stages:

  • design layout development;
  • formation of web pages using HTML and CSS;
  • creating a dynamic website using PHP;
  • adaptation of the site for mobile devices using media queries;
  • site placement on the Internet;

At the same time, at all these stages, the use of any database was not required.

And now, as mentioned above, we will be engaged in the development of the site, which will include questions such as:

  • filling content;
  • work with forms;
  • accounting of information about clients;
  • registration of information about orders;
  • registration of information about received commissions;
  • accounting of information about sent and received e-mail;
  • optimization;

As you can see, even from the name of the above points, we need to save and process the necessary information somewhere.

But, perhaps, the question may arise, why do we need a database at all? After all, you can save information in ordinary files?

Of course, you can solve all these issues without a database, using the contents of the files. But, in this case, extraction and sorting operations will be much more laborious. And the speed of obtaining information from the database is much faster than from files. And if you add to this the amount of code that will be required to process the data located in the files, then the question of whether to use the database disappears by itself.

What is a MySQL database

A lot of different reference literature has been written about the MySQL server software, which can be found on specialized Internet resources. Therefore, if necessary, it will not be difficult to get acquainted in more detail with theoretical issues on this information system. Here we will focus on the practical application of this tool for our site.

And for this, in my opinion, it is quite enough to understand only that the MySQL database, in fact, is a set of ordinary tables with which we all had to come across sometime. And, therefore, for those who are familiar with this for the first time, do not be intimidated by such a term as "database".

These tables can have, depending on the size, a different number of rows (records) and columns (fields). The first column usually defines a unique identifier for the record (commonly referred to as "id"), and the remaining fields are assigned based on the number of fields.

Thus, having selected a row with the help of special queries of the SQL language, we can perform all the necessary actions with it, such as writing data to it, retrieving, sorting or updating it.

In order to clearly explain this, I give below a screenshot of a fragment of a table from one of my existing sites, which keeps a constant record of all visits, including various services and search robots.

Such an application tool makes it possible to collect information about all visits to the site in a given period, and, if necessary, analyze this data. Which is especially useful for emergency situations. If anyone is interested in this, let me know, in one of the following articles I can post the corresponding code and tell you how it works.


Here you can see that the table consists of 6 columns and a certain number of rows, depending on the size of the specified period (in this case, the table has 35539 last records). Each line contains data by date, time, number of visits per day, user ip-address and host name.

At the same time, in the first column you can see the unique id for each row of the table, which allows them to be identified by this value.

For example, you can make a SQL query that will iterate over all the id values \u200b\u200bin order, and thus will retrieve data from the entire table. Or, by making a request for a specific ip-address, sort and analyze the visits that were made from it.

In general, having any data in the MySQL table, you can retrieve the necessary information depending on the required task.

Likewise, using queries, you can both write and update the contents of tables.

As you can see, there is nothing complicated here. The main thing when working with MySQL is to know how to write queries correctly. But, even in this, there should not be any big difficulties, which can be verified when in the future we will record and extract the data necessary when adding the site's functionality.

And now, in order to be able to form MySQL tables and work with them, we will create a database in the local Denwer web server and on the hosting where the site is located.

Create a database on the local web server Denwer

To work with MySQL, there is a special phpMyAdmin application that provides a web interface for administering a database management system (DBMS). This tool allows you to administer your MySQL server through a browser, including creating tables and viewing their contents.

Thus, using the specified application, we will create a MySQL database.

To do this, at the beginning, by typing in the address bar of the browser "http: // localhost / Tools / phpMyAdmin /" open phpMyAdmin home page.


It should be noted that this interface can be opened in another way - through the link on the main page of Denver, as shown in the following screenshot, after typing "http: // localhost / denwer /" in the browser.


And then, going to the appropriate section, we will create a database. To do this, just enter its name (let's call it, for example, "avtobezugona") and the required encoding, in our case, it will be "ult8_general_ci"


That's all, our database named "avtobezugona" has been created, as evidenced by the corresponding fields in the list of databases in the "Databases" section and in the main menu of phpMyAdmin.


We create a database on hosting

In order to create a database, you first need to enter the hosting control panel, as shown in the article Buying hosting for a website.


The successful creation of the database is confirmed by the corresponding information message with the display of the necessary data for connection. They should definitely be written down somewhere, as in the future they will be required for work.

Due to the fact that this database is intended for a functioning site, for obvious reasons, some fields in the screenshots are made illegible.


Now you can go directly to the PhpMyAdmin editor and set the required database encoding.


But, in order to enter the PhpMyAdmin application, you must enter in the appropriate fields the data that was determined when creating the database and confirmed at the final stage (Fig. 7).

As a result, we got the desired result, created a database in Denver and hosted. And now we are ready to create tables in them and work with their content in the next articles.

  • Next Satya:
14K

Dolphins have always been trusted by people. We associate them with kindness and joy. Although the dolphin is a symbol of MySQL, this does not in any way explain the popularity that it enjoys around the world:


According to current statistics, MySQL ranks first in terms of prevalence on the Internet among all relational database systems.

MySQL Features

The procedure for creating a MySQL database is no different from other DBMSs. And its free is also hardly the main reason for the popularity of this system. For example, Microsoft's SQL Server. Each version of this product comes with a free edition, and with pretty good technical characteristics.

Features of the MySQL DBMS:

  • Most often used as a remote server;
  • Includes a large number of table types;
  • Comes with a special EXAMPLE type to show how to create new tables;
  • High scalability due to support for most popular platforms;
  • Open source - thanks to this, this DBMS is constantly being improved and modernized by many developers around the world;
  • A large number of APIs have been created that provide interconnection of MySQL with the main part of all programming languages;
  • The maximum size of a database table file is limited only by the capabilities of the operating system being used.

The closest competitor MySQL, MS SQL Server in the free Express edition, has a database size limit of 10 GB.

  • The latest version of the DBMS 5.7.5m15 (test) was released in September 2014.

Creating a MySQL database

The basic logical and structural unit of data division in any relational model of information presentation is the base. Only the server goes above it. Any database consists of tables, each of which is divided into columns. Let's consider all the ways how to create a database in MySQL.

PHPMyAdmin is one of the most popular MySQL frameworks. Its interface greatly facilitates database administration.

To create a MySQL database via PHPMyAdmin, do the following:

  • We go into the shell;
  • Go to the "Databases" tab;
  • In the first field, enter the name of the database being created, and select the desired encoding from the drop-down list. In our case, this is utf8_genegal_ci.

The database name must not exceed 64 characters.

  • Then click on the "Create" button:
  • After that, the name of the created MySQL database should appear in the lists on the left and below:
Now let's create the first table in our database. We do the following:
  • In the list on the left we find the name of our database and click on it:
  • In the next window, enter the name of the table and set the number of columns;
  • Then click on the "Ok" button.

The same can be done by clicking on the "Create table" link immediately below the list of databases on the left, but then a blank without a name and with four columns will appear in the next window.

  • The next step is to set the structure of our table. We write down the names and data types that will be stored in the columns of the table;
  • After that, click on the "Save" button:
  • Our MySQL database table is created and ready to be filled with data:
But this is not the only way how you can create a database in PHPMyAdmin. A similar effect can be obtained if you use an SQL query. To do this, use the CREATE command. Its syntax:

CREATE DATABASE db_name;

Arguments:

  • IF NOT EXISTS - serves to track the uniqueness of the database name. If you do not specify this parameter, then in the case of creating a database with the same name, a query execution error may occur;
  • db_name - the name of the created database is indicated;
  • CHARACTER SET charset - sets the database charset. If not specified, the default is used;
  • COLLATE collation - sets the sorting order of data. Optional parameter.

Now let's create a database using an SQL query through the PHPMyAdmin shell:

  • Go to the "SQL" tab;
  • In the editor window that appears, enter a request to create a database;
  • Or click on the "Request Window" icon. It is located on the left above the list of databases:
  • Enter the request text:

CREATE DATABASE `my_db`;

  • At the bottom, click on "Ok":
  • After that, the name of our database will be displayed in the list on the left:
Use the DROP DATABASE "my_db" command to drop the sql database.
  • A query for creating a database with optional parameters will look like this:

CREATE DATABASE `my_db` CHARACTER SET utf8 COLLATE utf8_general_ci;

Setting up a database backup

Database recovery is very important. In the event of unforeseen situations, recovery will help return the lost information and quickly resume the operation of the resource.

Setting up a database backup in PHPMyAdmin. Procedure:

  • In the list on the left, select the database we need;
  • Click on the "Export" tab;
  • Click "Ok".
If you select "Normal" in the "Export Method" section, a large window will open in front of you with many options for setting:
Now we will try to restore the saved copy of the database. But first, let's delete the existing instance. Go to the "Operations" tab and click the link " Delete database»:
To restore the MySQL database in PHPMyAdmin, go to the "Import" tab. In section " Imported file»Depending on the location where you saved the copy of the database, select the source. After that, click on the "OK" button located at the bottom of the screen:
Sometimes, after making any changes, it is necessary to restore not the entire database, but only a specific table. This feature is also implemented in PHPMyAdmin. To do this, on the page of the desired table at the bottom of its structure, select the appropriate item from the drop-down list and click on "OK" below:

In file systems, the simultaneous work of several users associated with the modification of data in the file was either not implemented at all, or was slowed down. These shortcomings have led to the development of new approaches to information management. This approach was implemented within the framework of new software and is called a database management system (DBMS), and the information stores themselves were called databases and data banks. One of the first stages in the creation of a database was large computers. The first DBMSs were put into operation by IBM in the late 60s. This DBMS was associated with the organization of a database on mainframes (360) and EU (Unified System). Here the databases were stored in the external memory of the central computer. The user tasks were to run data in batch mode. Powerful operating systems performed many tasks in parallel. These systems could be classified as a distributed access system because the database was centralized. It was stored on an installed external memory of one of the central computers, and access to it was supported by many users and tasks.

Subsequently, a great contribution to the theory of the database was made by the American mathematician Edward Codd, who was the creator of the theory of the relational database and at the same time high-level languages \u200b\u200bappeared.

The second stage is the era of personal computers. At this time, programs appeared that were called DBMS and made it possible to store a significant amount of information. They had a convenient interface for filling the database. They made it possible to automate multiple functions that were previously done manually. The first databases on computers were short-lived; they did not take into account the relationship of real objects and the demand for user-friendly DBMS programs. This led to the creation of desktop DBMSs. At the same time, each developer developed his own DBMS using standard programming languages \u200b\u200band thus each time he had to transfer the typed data to a newer DBMS. This was one of the main disadvantages of this era. The brightest representatives of this era were: dbase, FoxPro, clipper, Paradox.

The third stage of database distribution. At this stage, a large number of local networks appeared, more and more information is transferred between computers and the problem arises of reconciling data stored and processed in different places, but which are logically related to each other. The solution to this problem leads to the emergence of a distributed database that retains the advantage of all desktop DBMS, but at the same time allows organizing parallel information processing. It was at this stage that the work related to the concept of an object-oriented database (SQL) began. To manipulate data at this stage, SQL and technologies for data exchange between DBMS were used, to which ODBC (open database connectivity) can be attributed. It was at this stage that MsAccess, MsSQL, ORCL, etc. were introduced.

The fourth stage is the prospects for the development of the DBMS. It is characterized by the new intronet data access technology. This eliminates the need to use special client software. To work with a remote database, standard Internet Explorer browsers are used, etc. At the same time, the code embedded in the html page uploaded by users is written in java languages, JavaScript debugs all user actions and translates them into low-level SQL queries. This is how the client program is executed. The convenience of this approach made it possible to use it not only in remote databases, but also in local networks of enterprises.

Basic concepts and definition of a database

The term bank and database is often mentioned and they differ. Database is a named collection of data, reflected states of objects and their relationships in the considered subject area. A subject area is understood as one or more information management objects of which are modeled using a database and used to solve various functional tasks. A database management system is a collection of languages \u200b\u200band software tools designed to create an introduction and share a database with many users. The DBMS must ensure data independence. Almost the same DBMS can be used to introduce different files that are used to solve various unrelated management tasks. All functions of the DBMS can be combined into the following groups:

1) Data management. The tasks of data management are preparation and control of data, entering data into the database, ensuring the integrity and secrecy of data.

2) Access to data. Searches, data selection, data transformation into a form convenient for further use.

3) Organization and communication with users, dialogue. Issuance of these messages about errors in the work on the database, etc. To process queries to the database, the development of programs that are presented as application programs with which the user works with the database, called the application. In principle, many different applications can work with one database. It is the DBMS that ensures the work with a single database in such a way that each of them is executed correctly and takes into account all changes in the application.

Database design stages

The issue of database design is highlighted as a separate area of \u200b\u200bwork in the development of information systems; database design is an iterative multi-stage decision-making process in the process of analyzing the information model of the subject area. Here, the data requirements on the part of the application programming and the user, logical and functional data structures, the choice of software and hardware must be taken into account. The stages of database design are associated with the layered organization of data. The multilevel data process is as follows: external, infological, logical, datalogical, internal. There are other levels of data presentation, where 3 levels are used: external, conceptual, internal.

The external layer is required to implement any request or application programming. Sometimes the external level is also considered infological, i.e. at the same time, all out-of-machine information support is studied, i.e. forms for documenting and presenting data, as well as the external environment where the database function will be. The external level is a description of input and output messages and data that it is advisable to store in a database. The description of the outer layer does not exclude the presence of elements of duplication, redundancy and data inconsistency. To eliminate these contradictions, infological design was applied. The infological model can be viewed as a means of documenting the form of presentation of information needs, which ensures consistent communication between the user and the system developer. All external representations are integrated at the information level, where the infological level is an infological model of the subject area from which redundancy of data and the display of information features of control objects are excluded, i.e. an infological representation of data, targeted at the person who designs or uses the database.

At this level, a conceptual data model is formed that meets the features and limitations of the selected DBMS. This model is geared towards programmers. The logical level model that supports the instantiation of the DBMS facilities is called datalogical. Infological and datalogical models are interdependent. An infological model can easily be transformed into a datalogical one. The inner layer deals with the physical location of the data. The amount of memory and the response time of the system depend on the parameters of the physical model. The physical parameters of the database can be changed to improve the efficiency of the functional system. The change in physical parameters is not predetermined by the need to change the infological and datalogical model. The level relationship diagram includes a description of the data.

Network model. If there is more than one connection in a relationship between data, then this relationship is described as a network structure. A network database consists of a set and many links between them.

The relational model, in contrast to the hierarchical and network models, has no drawbacks. In order for the database to function more efficiently, we propose a relational approach. The creation of the relational model is associated with the name of Edward Codd. The first works in this area appeared in the 70s and for a very long time this approach was a convenient formal apparatus for analyzing a database.

The relational approach has its origins in the set theory of mathematics. In the relational model, objects and their relationships are represented using tables. We also consider relationships as objects. Each table is an object. In terminology, relational table models are called a relationship, each column in a table is called a value attribute in a column allocated from a domain. A domain is a set of values \u200b\u200bthat each attribute can take. The rows in the table are called tuples.

Did you like the article? To share with friends: