CIS275 - Chapter 4: Structured Query Language Flashcards
_____ is a high-level computer language for storing, manipulating, and retrieving data in a relational database.
Structured Query Language (SQL)

- A database designer uses SQL to create a database and the database tables.
- A database user uses SQL to insert, retrieve, update, and delete data from the tables.



An _____ is a complete command composed of one or more clauses.
SQL statement
A clause groups SQL keywords like SELECT, FROM, and WHERE with table names like City, column names like Name, and conditions like Population > 100000. An SQL statement may be written on a single line, but good practice is to write each clause on a separate line.

- The SELECT clause starts the statement. Name is a column name.
- The FROM clause must follow the SELECT clause. City is a table name.
- The WHERE clause is optional. When included, the WHERE clause must follow the FROM clause. Population > 100000 is a condition.
- The three clauses ending in a semicolon is a statement. The statement retrieves the names of all cities that have a population greater than 100,000 people.





The SQL language is divided into five sublanguages:
_____ defines the structure of the database.
Data Definition Language (DDL)

The SQL language is divided into five sublanguages:
_____ retrieves data from the database.
Data Query Language (DQL)

The SQL language is divided into five sublanguages:
_____ manipulates data stored in a database.
Data Manipulation Language (DML)

The SQL language is divided into five sublanguages:
______ controls database user access.
Data Control Language (DCL)

The SQL language is divided into five sublanguages:
_____ manages database transactions.
Data Transaction Language (DTL)



The _____ statement creates a new database.

CREATE DATABASE
Once a database is created, tables can be added to the database.

The _____ statement deletes the database, including all tables in the database.

DROP DATABASE



The _____ statement provides database users and administrators with information about databases, the database contents (tables, columns, etc.), and server status information.
SHOW
Commonly used SHOW statements include:
_____ lists databases available in the database system.
SHOW DATABASES

Commonly used SHOW statements include:
_____ lists tables available in the currently selected database.
SHOW TABLES

Commonly used SHOW statements include:
_____ lists columns available in a specific table named by a FROM clause.
SHOW COLUMNS

Commonly used SHOW statements include:
_____ shows the CREATE TABLE statement for a given table.
SHOW CREATE TABLE
The ___ statement selects a database and is required to show information about tables within a specific database.
USE



A _____ is a number that may be negative.
signed number



























































































































































































