MySQL | Data Types | Conditions | Queries | Relationships | Scripts
MySQL is a database server that generates databases over a network. A database is a file that stores data in tables. A table represents an object. An object is defined in columns and rows. Columns represent the names of an object's attributes. Rows represent the values.
MySQL is a RDBMS (Relational Database Management System) that uses SQL (Structured Query Language). SQL is a standard computer language for accessing a RDBMS. SQL is cross-platform and can used in a variety of applications. Microsoft Access is a RDBMS that also uses SQL. Access generates on a local computer, not over a network.
PHP can manage and send SQL queries to the MySQL server. Tutorials for coding SQL within PHP scripts are on the Scripts page.
Databases, tables, and columns have a similar naming convention...
SQL keywords are coded as UPPERCASE (recommended). A new table is declared by creating column names with data types. Data type values are declared in ( ) parenthesis. The , comma separates column names. The ; semicolon declares the end of an SQL statement. This is an example of an SQL statement that creates a table...
The PRIMARY KEY declares one of the columns as the id column to identify rows, and is usually defined with the AUTO_INCREMENT attribute. AUTO_INCREMENT increases the id column by 1 each time a new row is added, starting with 0 by default. The PRIMARY KEY column is usually declared with a numeric data type, such as INT. These are examples of SQL statements...
Values can be selected from a column in a table...
Values can be selected from multiple columns in a table...
Values can be selected from multiple columns in multiple tables. The . is the concatenation operator...
Tutorials for installation and configuration of MySQL are on the Install page.