Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

table: user user_id email name 1 cam@umich.edu cam 2 ted@umich.edu edward 3 ali@

ID: 674186 • Letter: T

Question

table: user

user_id email                                             name

1 cam@umich.edu                         cam

2                  ted@umich.edu                           edward  

3                   ali@umich.edu                            allison

table: membership

member_id              user_id          role       code           title

1                                           1                  1       CS502        Network Computing

2                                    3                  1         CS539          Webpage Design

3                                    2                  2          CS301        Network Systems

4                                    1                  1         CS664         Database

5                                    3                  2          CS301       Network Systems

1.) Write a SQL select statement with a join caluse and a where clause that shows who is the instructor for each class. Output look as follows

Code        Name

CS301     Cam

CS539        Allison

CS 664       Cam

2.) Write a Select Statement that would ONLY show the rows of the User table for student named Ted

3.) Write a SQL statement to delete “cam@umich.edu

4.) Are these two tables normalized? If not, which column(s) in which tables(s) violate the rules of database normalization? What table would we have to create in order to properly normalize this data?

Explanation / Answer

Solution :

1) SELECT * FROM UserTable WHERE name,code =

2) SELECT * FROM UserTable WHERE Student = "Ted" ORDER BY row list;

3) DELETE FROM UserTable WHERE email='cam@umich.edu';

4) Yes, the two tables are normalized but not fully a normalized.