MySQL is a
relational database management system (RDBMS)
SQL is a database language for
SQL is a
nonprocedural language
what does SQL is a nonprocedural language mean
the user specifies what must be done, but not how.
where the data is stored isn’t important, only the specified relations + relationships matter
t/f: all relational DBMS software supports SQL
true
different SQL DBMS software
many database vendors have developed
extensions
extensions
categories of SQL commands
Data Definition Language (DDL) and Data Manipulation Language (DML)
DDL
commands that define a database
- includes creating, altering, dropping tables and stored procedures, and establishing constraints
examples of DDL commands
CREATE TABLE, set PRIMARY KEY
DML
commands that are used to manipulate data and extract information
examples of DML commands
select, update, insert, delete
mySQL data types
numeric, date and time, string
primary numeric types
tinyint, smallint, mediumint, int, bigint, decimal(M, D)
primary date and time types
date and datetime
format of datetime
YYYY-MM-DD HH:MM:SS
invalid dates and times are converted to
zero values 0000-00-00
built-in date and time functions
now(), curdate(), datediff(), intervaldate(), time(), day(), year(), month()
primary string types
char(n), varchar(n), blob, text, enum
values that exceed n characters in length are
truncated
blob
used for large binary strings of data
text
large character strings of data
enum
string object with value chosen from list of permitted values that is specified at table creation