4.3. DDL

The following DDL is used to create the tables from the data model. The constraint names and types are seen in the data dictionary queries of Chapter 5.

Business rules not enforced with constraints are enforced with triggers and stored procedures in Chapters 6, 7, and 8.

 DROP TABLE students_courses; DROP TABLE professors; DROP TABLE courses; DROP TABLE parking_tickets; DROP TABLE student_vehicles; DROP TABLE students; DROP TABLE state_lookup; DROP TABLE major_lookup; -- SEQUENCE DROP SEQUENCE students_pk_seq; CREATE SEQUENCE students_pk_seq START WITH 201; -- -- STATE_LOOKUP -- CREATE TABLE state_lookup (state VARCHAR2(2) NOT NULL, state_desc VARCHAR2(30) NOT NULL) TABLESPACE student_data; -- -- MAJOR_LOOKUP -- CREATE TABLE major_lookup ...

Get Programming Oracle® Triggers and Stored Procedures, Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.