Question: modified version of these tables. 1. Create a students table that has the following columns: student id, student name, e-mail address, gender, status, GPA, number

modified version of these tables. 1. Create a students table that has the following columns: student id, student name, e-mail address, gender, status, GPA, number of credits. The student id can be an integer between 100 and 999. The name is limited to 10 characters. The e-mail address is limited to 25 characters. Gender is a single letter, either m or f. Status is two characters from the set {Fr, So, Ju, Se}. GPA is a real number with one digit to the right of the decimal place between 0.0 and 4.0 inclusive. Number of credits is an integer between 0 and 128. The student number is the primary key. E-mail is an alternate key. There are no foreign keys. All columns should be not null. 2. Use the alter table statement to set the default for the number of credits and GPA columns to zero and the status column to fr. 3. Create a clubs table that has the following columns: club id, club name, meeting room, number of club members, and contact e-mail. The club id is a string of six characters; all club ids begin with the letter C followed by digits. The club name is limited to 10 characters. The meeting room is a three-digit integer. The number of club members is an integer. The e-mail address is limited to 25 characters. There are no default values. No null values are allowed except for the e-mail and number of members columns. The club id is the primary key. The e-mail column is a foreign key reference to the e-mail column in the students table. 4. The club members table has the following columns: the club id, the student id, and the date joined. The club id has the same type as the club id in the clubs table. The student id column has the same type as the student id in the students table. The date joined column is a date. No null values are allowed in any column. The primary key is all three columns. The club id column is a foreign key reference to the club id column in the clubs table. The student id column is a foreign key reference to the student id column in the students table. 5. Write the insert statement to populate the students table. The data will be provided by the instructor. 6. Write the insert statement to populate the clubs table. The data will be provided by the instructor. 7. Write the insert statement to populate the clubs table. The data will be provided by the instructor. 8. Write the update statements needed to set the number of members column to the correct value for each club. Use a select query to count the number of members the club has from the club members table and assign this value to the number of members column. There should be an update statement for each club. 9. Create a view that produces a list of student names and their GPAs using the student table. Write a select query to display the view. 10. Create a view that shows only clubs that have at least one member. Write a select query to display the view. 11. Create a view that returns the average number of members in the clubs. Write a select Page 2 of 3 query to display the view. 12. Create a view that lists the student names who are members of none of the clubs.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!