Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Requesting a Membership database file I can open up to view in reference to the following exercise part 1 - 6 ... I can use

Requesting a Membership database file I can open up to view in reference to the following exercise part 1 - 6 ... I can use with my SQL Server 2016 I recently downloaded.

image text in transcribed

Create a new database named M Write the CREATE TABLE statements needed to implement the following design in the Membership database. Include foreign key constraints. Define IndividuallD and GroupID as identity columns. Decide which columns should allow null values, if any, and explain your decision. Define the Dues column with a default of zero and a check constraint to allow only positive values. Membership. Individuals GroupMembership Groups IndividualID, int FirstName, varchar LastName, varchar Address, varchar Phone, varchar GrouplD, int IndividuallD, int GroupID, int GroupName, varchar Dues, money Write the CREATE INDEX statements to create a clustered index on the GrouplD column and a nonclustered index on the IndividualID column of the GroupMembership table. Write an ALTER TABLE statement that adds a new column, DuesPaid, to the Individuals table. Use the bit data type, disallow null values, and assign a default Boolean value of False. Write an ALTER TABLE statement that adds two new check constraints to the Invoices table of the AP database. The first should allow (1) PaymentDate to be null only if PaymentTotal is zero and (2) PaymentDate to be not null only if PaymentTotal is greater than zero. The second constraint should prevent the sum of PaymentTotal and CreditTotal from being greater than Invoice Total Delete the GroupMembership table from the Membership database. Then, write a CREATE TABLE statement that recreates the table, this time with a unique constraint that prevents an individual from being a member in the same group twice

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

Advanced Oracle Solaris 11 System Administration

Authors: Bill Calkins

1st Edition

0133007170, 9780133007176

More Books

Students also viewed these Databases questions

Question

Should civil service employees be allowed to unionize? Why?

Answered: 1 week ago