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?
-
A local bank reported that it lost $150,000 as the result of an employee fraud. Travis Witt is not clear on what is meant by an employee fraud. Explain the meaning of fraud to Travis and give an...
-
Consider the composite solid shown. Solid A is a thermally conductive material that is 0.5-cm thick and has a thermal conductivity, k A = 50 W/m K. The back side of solid A (x = 0) is thermally...
-
Elite Mobile Homes reported the following in its financial statements for the year ended December 31, 2007 (adapted, in millions): .Determine the following for Elite Mobile Homes during 2007: a....
-
Assume that Revolights was interested in working with strategic partners in order to enhance the firms success. What types of companies might Revolights partner with to become more successful?
-
What is the rooms status report, and what is it used for?Explain
-
Compound A, C8H10O, has the IR and 1H NMR spectra shown. Propose a structure consistent with the observed spectra, and assign each peak in the NMR spectrum. Note that the absorption at 5.5 ?...
-
MATLAB Assignment: Use Matlab and the xcorr() function to determine the time autocorrelation functions for the following signals. a) x(t)= rect(400t) https://en.wikipedia.org/wiki/Rectangular...
-
A company seeks to effectively implement a preventive maintenance strategy for its equipment and machinery. To do this, take into account that, to achieve efficient productivity in the company, a...
-
The table above comparing Costco and Target financials is similar to one given in the course material. List at least three key differences between Costco and Target in the table and describe how they...
-
Research a manufacturing firm that you find interesting. Pick one of that firms products and decide if they are implementing a responsive or efficient supply chain strategy to manage inventory for...
-
1. Choose a specific production system and brand within a specific industry. Describe all the main processes and activities of this system, identify the nature of these processes, and draw a...
-
Exercises EX 3.1 Write a statement that prints the number of characters in a String object called overview. Fx32 XX 3.2 Write a statement that prints the 8th character of a String object called...
-
Looking for two magazine advertisements that exhibit ALL THREE rhetorical appeals Who is the target audience for the ad? How does Ad employ rhetorical appeals? Is the target audience of the...
-
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...
-
Measured data for performance of the reaction turbines at Shasta Dam near Redding, California, are shown in Fig. 10.38. Each turbine is rated at \(103,000 \mathrm{hp}\) when operating at \(138.6...
-
Francis turbine Units 19, 20, and 21, installed at the Grand Coulee Dam on the Columbia River, are very large [55]. Each runner is \(32.6 \mathrm{ft}\) in diameter and contains 550 tons of cast...
-
Conditions at the inlet to the nozzle of a Pelton wheel are \(p=700 \mathrm{psig}\) and \(V=15 \mathrm{mph}\). The jet diameter is \(d=7.5 \mathrm{in}\). and the nozzle loss coefficient is \(K_{\text...
Study smarter with the SolutionInn App