sql midterm exam study guide
DESCRIPTION
MySQL Midterm Exam Study GuideTRANSCRIPT
CS31A Midterm Exam
Midterm Exam Study Guide
Databases and Database Users
What is a Database
Data
Information
Metadata
Database
A database management system (DBMS)
Database system
Data redundancy
The main characteristics of the database approach and how it differs from traditional file
systems.
DBMS Architectures
Two-tier architecture
Three-Tier architecture
The three-schema DBMS architecture allows three schema levels:
º An internal schema describes the physical storage structure of the
database.
º A conceptual schema is a high-level description of the whole database.
º External schemas describe the views of different user groups.
Data Independence
Logical Data Independence
Physical Data Independence
Database Languages
Data-Definition Language (DDL)
Data-Manipulation Language (DML)
Database Users and Administrators
The responsibilities of the DBA and the database designers
Database Users
Relational Model Relational Database Model
Relational table
Column ( field or attribute)
Row (tuple or record)
Relation Instance
Relation Schema
Domain
CS31A Midterm Exam
Atomic domain
NULL value
Keys
Primary Key
Foreign Keys
Super key
Composite Key
Candidate keys
Structured Query Language (SQL)
Queries
SQL query structure
SELECT clause
FROM clause
WHERE clause
Data-definition language (DDL), which provides commands for defining relation
schemas, deleting relations, and modifying relation schemas.
CREATE Tables ALTER DROP
Data-manipulation language (DML), which includes a query language and commands to
insert tuples into, delete tuples from, and modify tuples in the database
INSERT, UPDATE, DELETE SELECT statement The use of the IN, BETWEEN, and LIKE operators in WHERE clauses.
JOIN types
º Inner and outer join
º Left, right and full outer join
º Natural, using, and on
Aggregate functions
º avg, min, max, sum, count
º group by
º having
Integrity constraints
Domain constraints
Unique constraint
Check clause