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 the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.