1. Create a new database named Membership.

2. 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. see image.

3. Write the CREATE INDEX statements to create a clustered index on the GrouplD column and a nonclustered index on the IndividuallD column of the GroupMembership table.

4. 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.

5. Write an ALTER TABLE statement that adds two new check constraints to the Invoices table of the AP database. The first should allow (l) 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 Payment Total and CreditTotal from being greater than InvoiceTotal.

6. 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.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.