Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Database Systems Help 1. Create a table High_School that has as attributes name, city name, state/province/region name, country name, and an ID as primary key.

Database Systems Help

1. Create a table High_School that has as attributes name, city name, state/province/region name, country name, and an ID as primary key. Insert records for at least three high schools.

2. Create a table Student that has as attributes first name, last names, and high_school_id for students, and that has a foreign key to High_School, using ON DELETE CASCADE as referentially triggered action. Insert the names of yourself and friends (or made-up names if you prefer). Make sure there is at least one high_school that none of the students attended.

3. ) Do a query that shows all students together with their respective high school information. For high schools, that no students have attended, list all student information as null (i.e. RIGHT OUTER JOIN).

4. Do a query that lists high school names together with the number of students in the database that have attended that high school, using the GROUP BY statement.

5. Delete a High_School instance that has at least associated one student record. Do a query of catalog information to show that the student record(s) was(were) deleted.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 Universal Database V7.1 Application Development Certification Guide

Authors: Steve Sanyal, David Martineau, Kevin Gashyna, Michael Kyprianou

1st Edition

0130913677, 978-0130913678

More Books

Students also viewed these Databases questions

Question

Understand the role of internal marketing and communications.

Answered: 1 week ago