Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assume that the takes relation has not yet been defined. Give an SQL statement that adds the takes relation to the database. Assume that: Id

image text in transcribed

Assume that the takes relation has not yet been defined. Give an SQL statement that adds the takes relation to the database.

Assume that:

Id is an integer

course_id is a string of up to10 characters.

sec_id should be a non-negative integer.

the semester is a one-character field, equal to either F or S, and the

year is an integer.

grade can be null, but if not, it should be a letter in the string ABCDF.

Your statement must ensure that no attributes, other than the grade, are allowed to be null in this relation, identify a suitable primary key, and indicate appropriate foreign key(s). Include not null constraints only on attributes where the domain is not already constrained to exclude nulls.

.

student takes ID course_id sec_id semester year name dept_name tot_cred grade section advisor course id sec_id course course_id title dept_name credits semester department dept_name building budget Slid i id year building room_no time_slot_id time_slot time slot_id day start_time end_time instructor classroom building room_no capacity prereq course_id prereg_id ID name dept_name salary teaches course_id sec_id semester year

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

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions

Question

2. What appeals processes are open to this person?

Answered: 1 week ago

Question

1. What are the peculiarities of viruses ?

Answered: 1 week ago

Question

Describe the menstrual cycle in a woman.

Answered: 1 week ago

Question

3. How frequently do the assessments occur?

Answered: 1 week ago