
CSIS 350 โ Lecture 22
Exam Results
15 exams
Mean 75.17
Median 76.00
Max 97.00
Distribution: 40s: 1 50s: 2 60s: 3 70s: 2 80s: 4 90s: 3
Let's go over problems 6 and 7
Chapter 7
This chapter takes a lot of what we've been doing, and brings it back to SQL for actually
defining the database tables!
Remember, there are two varieties of SQL statements:
- DML, such as SELECT, INSERT
- DDL
We finally get to start looking at some DDL.
Note: the DDL in the book is specific to SQL Server. While most of the features are the
same in all DBMSs, there are differences.
This chapter uses a case-study for its database: The View Ridge Art Gallery โ see slides
1 to 3.
So, how do we convert this DB design (slide 3) to actual database tables? We are going to
use SQL DDL statements:
- CREATE TABLE
- ALTER TABLE
- DROP TABLE
Once we've created the tables, we need to put data in them. Use DML statements:
- INSERT
- UPDATE
- DELETE
Let's look at what is involved in creating some of these tables. Let's start with the
ARTIST and WORK tables. See slide 4.
Note that this slide has some other notations on it describing the required parent actions.
- D:R means to restrict delete