ComputersDatabase

MySQL - Windows Console Commands

The development of information technology is one of the foremost areas of human activity. Therefore, a huge amount of money is invested in this area. Since the beginning and until today, many different tasks have been solved, which have greatly facilitated the daily life of many people. However, with the development of technologies, a number of problems arose, one of which was the excessive amount of information to be stored. The databases were designed to resolve the situation.

A Brief Overview of Database Management Systems

Since the problem of storing a large amount of information is relevant for today, there are several ways to solve it. Each of them is focused on tasks of a certain orientation. However, in the aggregate, they form a complete complex, which simplifies the problem of data storage.

There is a certain classification, which determines the need to use a particular database and DBMS (database management system). The most common currently considered to be client-server storage technologies. These include: Firebird, Interbase, IBM DB2, MS SQL Server, Sybase, Oracle, PostgreSQL, Linter, MySQL. We will be interested in the last option - MySQL, whose commands fully comply with SQL standards. This technology is one of the popular and often used to solve both local applications and production problems of small scale.

The forerunners of client-server technology are file-server DBMSs, which lost their positions due to a number of existing shortcomings, among which are the need to distribute the database engine on each computer and a significant load on the local network, which leads to an increase in time costs. This group includes Microsoft Access, Borland Paradox.

New technologies that are gaining popularity

However, a few years ago there was advanced technology, which is gaining popularity and is in demand for solving small local problems. It's about embedded database management systems. The main feature of the DBMS in question is the lack of a server part. The system itself is a library that allows a unified way to work with large amounts of information placed on a local computer. This method eliminates the disadvantages of file-server facilities, and also significantly exceeds the speed of client-server technology.

Examples include OpenEdge, SQLite, BerkeleyDB, one of the variants Firebird, Sav Zigzag, Microsoft SQL Server Compact, Linter, and also one of the MySQL variants, whose commands are no different from those used in client-server DBMSs. However, embedded systems can easily lose their relevance if the problem ceases to be of a local nature.

Main advantages of MySQL DBMS

Database management system MySQL is one of the most popular technologies, as it can be used to solve a huge number of tasks. If we compare it with modern analogues, then we can single out a number of main advantages.

The main advantage in the Russian market is its availability, since it is free in most cases. The second feature is speed. One of the most popular systems is MySQL. Commands in it are executed quickly, with a minimum response time. Does not affect the processing speed of commands connecting to the server of multiple clients in multithreaded mode by using the InnoDB mechanism for fast transaction support.

The presence of an ODBC driver makes it easy for developers to solve many problems. The advantages are also the possibility of implementing fixed and variable length records. But the main function, which is very appreciated in the circle of programmers, is an interface with C and PHP languages. The possibilities provided by MySQL, allowed using this database for a huge number of providers of Internet hosting services.

And for a common citizen who is interested in modern information storage technologies, it is necessary to study MySQL, SQL commands and their syntax because specialists in this direction are widely in demand and highly paid anywhere in the world. Therefore, if someone is interested in this direction, do not hesitate. It is necessary to proceed to the study right now.

What is necessary to study

At first glance it may seem that this area is complex in independent study and requires constant communication with a specialist. However, this is not the case. To study the architecture and features of MySQL, the basic commands of the query language and everything related to it, you can independently, without resorting to the help of a consultant. To do this, it is enough to have the desire and make the effort to move on. Only self-development and study of this area will allow to acquire new knowledge, to consolidate the acquired skills and, possibly, to begin to build a career and advance in this direction.

To learn the basic commands, first of all, you need to have a free version of the MySQL console utility at hand. It is with her that the learning process begins. You can download it from the official MySQL site. It is easily installed on any operating system, forming a server and client on one computer, which is very convenient.

Then you need to look for a training manual containing basic information about the MySQL environment. Console commands for basic learning, as a rule, are also contained in them. There is a lot of information about this. However, the choice must be taken seriously. Information should be presented consistently and clearly structured.

If you have a basic knowledge of English, you can use the built-in console support. For this, there is a special help command, which helps to understand the use of the MySQL utility.

Basic Console Commands

Smoothly moving from the main features, opportunities and benefits, we got to the list of the main teams. The MySQL utility initially contains only one user, which is just used for learning. This is a user named root , the password for which is identical to the name.

During the first and subsequent startup of the MySQL console, the user will need to enter the root password for further work with the MySQL DBMS. The console commands will only be available after authenticating.

After a successful test, for convenience, you can display existing commands using the help command. After that, the console will present all existing commands and a brief description to them.

Control and display commands

Now go to the next step. To do this, you must select an existing database or create a new database. To select an existing database, use the use command. And enter the name of the database through a space. Initially, in the utility it exists only one - with the name test . Therefore, the query will look like this: use Test .

To create a database, you must use the create command, specifying the database keyword and specifying the appropriate name. The structure takes the following form: create database Name_of_database . To work with the created database, you need to access it using the use command.

The environment provides a function for displaying existing databases, tables, primary keys or external links and displaying the information about them on the MySQL console. The commands in this case should always start with the show clause. For example, in order to display a list of available databases for the current user, simply type the following query: show Databases . To display the table, it is enough to change the display object after the keyword by typing tables .

Table management commands

Before proceeding further, it is necessary to remind once again that conformance to the standards of the SQL language provides ample opportunities for developers, regardless of the DBMS and operating systems used. Queries developed in any environment that supports the SQL standard will successfully work (in the presence of a database and tables) in a MySQL environment. The Windows console commands are no different from those used in other operating systems.

To work with tables, there are a number of specific commands that, if translated from English, speak for themselves. The command create was mentioned above. It can also be used to add tables to a previously created database. To delete database objects, in particular, tables, use the drop command, to which the name of the object to be destroyed is added. Example: drop Name _ of _ your _ table .

The syntax of accesses to the database server always has a common structure. Therefore, a query developed in Windows will work well in the MySQL Linux console. Commands processed by the server without errors in one operating system, can not lead to errors in others.

The Select command

But the most important command for working with tables is the command, the syntax of which is quite simple - the select command. It is used to select data from the database. The initial syntax has the following structure: select * from Table _ name . By sending such a request to the database server, the client must receive all records stored in the table.

Many people never think about it, but when you browse the Internet, MySQL commands are constantly used. PHP queries use the syntax of the SQL language to display the contents of online store directories or news on social networks. Instead of the "*" sign after the select clause, a list of the main fields of the table or several tables, the data from which you need to process, is usually provided. In the case of a selection from several tables, a special join join is used , which serves to connect them to existing external links. However, this condition can be changed, independently indicating which fields should be used for communication.

Specifying Sample Constraints

Sometimes a situation occurs when the response received from the database server contains duplicate data. In order for the user to see only unique records, the distinct clause is used. It is placed in front of the list of requested fields and serves as an auxiliary tool for hiding duplicates.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 en.unansea.com. Theme powered by WordPress.