Home > Data Recovery Server > The Basics of MySQL
The Basics of MySQL
Posted on Sunday, June 17, 2012
The basics MySQL is a DBMS (Database Management System) which is multiuser and multireading. SQL (Structured Query Language) which is the standard language used for relational database management system.
Data Types
Each data has a data type. Data types are divided into two: a standard data types and data type extension. Some of the standard data types such as:
1. Char: to represent sequences of characters (String)
2. Integer: to declare integers
3. Numeric: to declare the real numbers
And expansion of multiple data types such as:
1. Varchar: to declare variable-length string
2. Boolean: to declare the type of logical (true or false)
3. Money: to declare the money
4. Blob: to express binary data or images
5. Serial: to declare the value of the order
Create a database, use it, create tables, define index and table storage structure
- CREATE DATABASE {database name to be created}.
This command is used when creating a database for the first time
- USE {database name to be used}.
To use a database that was created
- CREATE TABLE {table name to be created}.
Create the necessary database tables.
DML (Data Manipulation System)
Manipulation and retrieval of data in the form of insertion or addition of new data, deletion of data and conversion data.
- INSERT
Command: INSERT INTO namatabel (field1, [field2, [...]]) VALUES (value1 [, value2, [....]);
- UPDATE
Command: UPDATE SET field1 = value1 namatabel, field2 = value2 [...] WHERE condition;
- DELETE
Command: DELETE FROM WHERE namatabel conditions;
- SELECT
Command: SELECT * FROM namatabel;
(*) To select the entire field when only some of which will be used fieldnya mentioned. Use of SELECT with a variety of conditions.
IS NULL operator is used to search for empty values in a column, while IS NOT NULL is used to find values that are not empty.
SELECT * FROM table WHERE my data IS NULL;
SELECT * FROM table WHERE my data S NOT NULL;
Example: SELECT * FROM table ORDER BY name;
Example: SELECT * FROM table ORDER BY name DESC
DCL (Data Control Language)
DCL is a command to make the definition of users to access the database with a variety of previlage. DCL consists of a group of SQL Server commands to give the right to access the database, allocating space, pendefinisan space and auditing the use of the database. Usually this is available on the database management system that has the facility to limit the user premises security and authority
Category Article Data Recovery Server
Popular Posts
-
SD stands for Secure Digital, that could be a digital memory device customary maintained by SD Card Association. SD technologies are enf...
-
Restore Hard Drive Errors "C0000221" Sometimes the increase for the Windows XP operating system in a data loss situation. At...
-
Hard drive failure is usually caused from the four major symptoms, the symptoms of firmware corruption , mechanical failur...