Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lets make sure our music database contains consistent data with good data integrity. (a) ALTER your tables so that no columns can contain a NULL

Lets make sure our music database contains consistent data with good data integrity.
(a) ALTER your tables so that no columns can contain a NULL value. All fields must be mandatory.
(b) ALTER the bandmembers table so that the End Year is set to 9999 if the band member is still currently in the band. You can use the DEFAULT value for that.
. (c) Define a Primary Key / Foreign Key relationship between Band
Name in the bandmembers and bandrecognition table - and the bandinfo table - to ensure that it is impossible to have a Band Name in either table bandmembers or bandrecognition table which is not already in the bandinfo table.
(d) Add a set of CONSTRAINTS on the bandinfo table to the following columns to ensure that their data values are meaningful: Formation Year, Current Status, Number of Releases, Number of Band Members, Genre
(e) Add a set of CONSTRAINTS on the bandrecognition table to the following columns to ensure that their data values are meaningful: Nomination, Year
(f) Add a set of CONSTRAINTS on the bandmembers table to the following columns to ensure that their data values are meaningful: Start Year, End Year, Role
(g) Build a TRIGGER called bandmemnum which ensures that any time a Band Member is added or removed from the bandmembers table that the Number of Band Members in the bandinfo table is updated accordingly
(h) Build a TRIGGER called bandmemstart which ensures that any time a Band Member is added or updated in the bandmembers table that the Band Member Start Year is not before the Band
Formation Year in the bandinfo table.

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

Professional SQL Server 2000 Database Design

Authors: Louis Davidson

1st Edition

1861004761, 978-1861004765

More Books

Students also viewed these Databases questions

Question

Draft a proposal for a risk assessment exercise.

Answered: 1 week ago