Answered step by step
Verified Expert Solution
Question
1 Approved Answer
MYSQL Exercises 1. Write a script that adds an index to the AP database for the zip code field in the Vendors table Write a
MYSQL
Exercises 1. Write a script that adds an index to the AP database for the zip code field in the Vendors table Write a script that contains the CREATE TABLE statements needed to imple- ment the following design in the EX database: 2. members members groups groups member idmember id first name last name address city state phone group_id group name group _id 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. 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 3. name, member last name, and member first name. Sort the results by the group name. member last name, and member first name. 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. 4. Add one column for the payment date. 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. 5Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started