Introduction to MySQL
MySQK is an SQL-based relational database management system(DBMS)
Free and open-source
Owned by Oracle
Commercial version of MySQL
Compatible with standard SQL
Frequently used for commercial web services
Why Mysql?
Popular
active discussion all over the Internet
Versatile
runs on Linux, Windows, MacOS, Solaris, FreeBSD
Cost starts from zero
High performance(fast and reliable)
MySQL
Massive
can handle terabytes of data
convenient
supports high-level query language
Multiuser
supports concurrent data access
Safe
supports transaction
unit of tasks R-DBMS: ACID → DDMS가 제공
Efficient
can handle thousands of queries/seconds
Reliable
99.99% up-time in many real-world products
SQL preview
structured query language
principal language used to describe and manipulate relational databases
very high-level; 자바, c보다 higher
what to do >> how to do
data-manipulation details
DBMSs figure out the best way to execute queries
called query optimization
Two aspect of SQL
Data definition: for declaring database schemas (DDL)
Data manipulation: for querying (asking questions about) databases and for modifying the database (DML)
SQL Parts
DML
provides the ability to query information from database
to insert tuples into,
delete tuples from,
modify tuples in the database
Integrity
DDL includes commands for specifying integrity constraints
View definition
DDL includes commands for defining views
Transaction control
specifying the beginning and ending of transaction
Authorization
commands for access rights to relations and views
set password, grant permission