SQL and database
You accept been accustomed the afterward blueprint of a simple database for befitting clue of exercise sessions and their advisers at a fettle centre (note that primary keys are apparent underlined, adopted keys in bold).
You should run your SQL to authenticate that it works correctly, and adhesive in the statements acclimated additional the achievement from Oracle.
INSTRUCTOR (InstructorName, InstructorEmail, Biography, Specialty)
TIMETABLE (SessionID, DayAndTime, NumberOfPlaces, ClassName, VenueName, InstructorName)
Based on the table blueprint provided, acknowledgment the afterward questions. Each catechism is account 3 marks.
a. Give the SQL to actualize the INSTRUCTOR table. Choose adapted abstracts types. None of the attributes should be accustomed to be null. Accommodate the primary key constraint.
b. Give the SQL to actualize the TIMETABLE table. Use adapted abstracts types, and accommodate the primary key and adopted key constraints. Referential candor should be set such that if an Instructor is deleted from the database, any sessions that she or he is active will additionally be deleted.
c. Give the SQL to add your own almanac to the INSTRUCTOR table. Accommodate your name and email, and accomplish up adapted entries for your Biography and Specialty.
d. Give the SQL to actualize a coercion to the TIMETABLE table to bind the accessible venues to the afterward 5: Main Group Fettle Studio, Indoor Cycle Studio, Mind and Body Studio, 25m Lap Pool, Warm Water Pool.
e. Give the SQL to almanac the actuality that all the sessions of the CycleMax chic accept added their cardinal of places by 5. (Note: you don’t charge to add any absolute abstracts to run the query, although you may do so if you wish.)
Order a unique copy of this paper