3. add two rows to the members table for the first two member IDs. add two rows...
Fantastic news! We've Found the answer you've been seeking!
Question:
3. add two rows to the members table for the first two member IDs.
add two rows to the groups table for the first two group IDs.
add three rows to the group_membership table: one row for member 1 and group 2; one for member 2 and group 1; and one for member 2 and group 2
Transcribed Image Text:
Exercises 1. Write a script that adds an index to the AP database for the zip code field in the Vendors table. Chapter 11 How to create databases, tables, and indexes 2. Write a script that contains the CREATE TABLE statements needed to imple- ment the following design in the EX database: members member id first name last name Address oily. state phone members groups member id group d groups group_id group rambe These tables provide for members of an association, and each member can be registered in one or more groups within the association. The member_id and group_id columns are the primary keys of the Members and Groups tables, and these columns are foreign keys in the Members Groups table. Include any constraints or default values that you think are necessary. Include statements to drop the tables if they already exist. 3. Write INSERT statements that add rows to the tables that are created in exercise 2. Add two rows to the Members table for the first two member IDs. Add two rows to the Groups table for the first two group IDs. Add three rows to the Group Membership table: one row for member 1 and group 2; one for member 2 and group 1; and one for member 2 and group 2. Write a SELECT statement that joins the three tables and retrieves the group name, member last name, and member first name. Sort the results by the group name, member last name, and member first name. 4. Write an ALTER TABLE statement that adds two new columns to the Members table created in exercise 2. Add one column for annual dues that provides for three digits to the left of the decimal point and two to the right. This column should have a default value of 52.50. Add one column for the payment date. 5. Write an ALTER TABLE statement that modifies the Groups table created in exercise 2 so the group name in each row has to be unique. Then, use an INSERT statement to attempt to insert a duplicate name. This statement should fail due to the unique constraint. 351 Exercises 1. Write a script that adds an index to the AP database for the zip code field in the Vendors table. Chapter 11 How to create databases, tables, and indexes 2. Write a script that contains the CREATE TABLE statements needed to imple- ment the following design in the EX database: members member id first name last name Address oily. state phone members groups member id group d groups group_id group rambe These tables provide for members of an association, and each member can be registered in one or more groups within the association. The member_id and group_id columns are the primary keys of the Members and Groups tables, and these columns are foreign keys in the Members Groups table. Include any constraints or default values that you think are necessary. Include statements to drop the tables if they already exist. 3. Write INSERT statements that add rows to the tables that are created in exercise 2. Add two rows to the Members table for the first two member IDs. Add two rows to the Groups table for the first two group IDs. Add three rows to the Group Membership table: one row for member 1 and group 2; one for member 2 and group 1; and one for member 2 and group 2. Write a SELECT statement that joins the three tables and retrieves the group name, member last name, and member first name. Sort the results by the group name, member last name, and member first name. 4. Write an ALTER TABLE statement that adds two new columns to the Members table created in exercise 2. Add one column for annual dues that provides for three digits to the left of the decimal point and two to the right. This column should have a default value of 52.50. Add one column for the payment date. 5. Write an ALTER TABLE statement that modifies the Groups table created in exercise 2 so the group name in each row has to be unique. Then, use an INSERT statement to attempt to insert a duplicate name. This statement should fail due to the unique constraint. 351
Expert Answer:
Answer rating: 100% (QA)
To complete the exercises well assume that the AP and EX databases already exist and are currently selected Lets go through each exercise step by step ... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Set up, but do not evaluate, an integral for the volume of the solid obtained by rotating the region bounded by the given curves about the specified axis. 12. y = cos x, y = 0, x= 37/2, x = 5m/2;...
-
You need a particular piece of equipment for your production process. An equipment-leasing company has offered to lease you the equipment for $10,000 per year if you sign a guaranteed five-year...
-
Table 4.6 is a table with two rows and three columns, similar to the interaction effect term in the two-way factorial diagram in Figure 4.4. However, for this question we will assume that only two...
-
Suppose that Serendipity Bank has excess reserves of $8000 and checkable deposits of $150,000. If the reserve ratio is 20 percent, what is the size of the banks actual reserves?
-
Few organizations would develop an application in-house or pay another company to develop it if a similar application can be licensed. Why?
-
Torricellis idealization of efflux from a hole in the side of a tank is V≈ 2gh,as shown in Fig. P3.81. The tank weighs 150 N when empty and contains water at 20°C. The tank bottom is on...
-
The enzyme lipase catalyzes the hydrolysis of esters of fatty acids. The hydrolysis of p-nitrophenyloctanoate was followed by measuring the appearance of p-nitrophenol in the reaction mixture: The...
-
Padre, Inc., buys 80 percent of the outstanding common stock of Sierra Corporation on January 1, 2015, for $802,720 cash. At the acquisition date, Sierras total fair value, including the...
-
L = {w| L2 = {w| Two languages L1 and L2 are defined by symbols = {0, 1}, written as w contains 00 as a sub-string and the length of w is even number} w begins with 0 and ends with 1} (i) Write two...
-
When Howard Foth died in the current year, in addition to his $10,745,000 of certificates of deposit and investment property worth $200,000, the following facts were disclosed by the executor: a. In...
-
Who is NOT able to purchase a catastrophic plan under the Affordable Care Act? O A. An individual under the age of 30 B. OC. D. An individual with a hardship exemption from the federal government An...
-
Summarize the difference between price discrimination used for "exploitative" purposes vs. "exclusionary" purposes. Explain which - and why - one form is legal but the other is not?
-
Use the AS-AD model to derive the effects of a drop in animal spirits SP Show the effects on P, Y , r, C, I, N, and W=P: AND show the effects for the short run and the long run, and indicate which...
-
A company purchased inventory for $1,400 per unit. The company later sold one unit of the inventory for cash of $1,900. Under the perpetual inventory system, which accounts will be debited to record...
-
Draw and analyze scenarios when changing either discount rate or interest rate on reserves has absolutely no effect on market federal funds rate.
-
BBB has a steady dividend of $2.00 and be maintained indefinitely. Currently their cost of capital is 5%, and they expect that they can lock into that cost for the next 2 years. Cost of capital will...
-
Consider a lump sum of $800 today (t=0). What is its future value 10 years later at an expected return of 10% per year?
-
Use the following data to answer the next two (2) questions: Product 1 Product 2 Product 3 Direct Material Cost $25,000 $30,000 $35,000 Direct Labor Cost $30,000 $40,000 $50,000 Direct Labor Hours...
-
Scott Butterfield is self-employed as a CPA. He uses the cash method of accounting, and his Social Security number is 644-47-7833. His principal business code is 541211. Scott's CPA practice is...
-
Indicate, in each of the following situations, the number of exemptions the taxpayers are entitled to claim on their 2012 income tax returns. Number of Exemptions a. Donna, a 20-year-old single...
-
Ray and Maria Gomez have been married 3 years. They live at 1610 Quince Ave., McAllen, TX 78701. Ray works for Palm Oil Corporation and Maria works for the City of McAllen. Maria's Social Security...
-
Describe how competence, caring, and character affect your credibility as a communicator.
-
Explain the importance of establishing credibility for business communications.
-
Define and explain business ethics, corporate values, and personal values.
Study smarter with the SolutionInn App