Question: Objectives Demonstrate all you have learned in the class, by creating a database schema to satisfy a set of requirements. Background Expanding upon the success
Objectives
Demonstrate all you have learned in the class, by creating a database schema to satisfy a set of requirements.
Background
Expanding upon the success of Project we will expand our research subject database to include users, projects, and user's access to projects. In the research world, many research projects may exist in a database, but employees are only allowed to access for some of those projects. You will need to create a schema to allow user access control to projects.
The Assignment
Expand your research database by creating the following tables. Create columns with appropriate datatypes, and make sure each table has a primary key. The userproject table will link the users and projects; each userid will have multiple rows with the projectids they have access to
a users stores user information like email address, name, password, etc
b projects stores project information like name, startdate, enddate
c userproject stores information about which projects users have access to
Create users and projects. Give each user access to at least one project, and give other users access to more projects, just to demonstrate that your schema works.
a There is already an enrollment table which has a projectid column with data filled in Make sure your projects table has projectid values that match some of the existing projectids in the enrollment table.
Perform the following queries and get the row counts if it was a select statement:
a insert users and projects
b insert the userproject permissions
c select the total number of mrseries that user has access to
d select the total number of mrseries that user DOES NOT have access to
e Add an index on the mrseries table for the seriesdesc column
f A fun select query of your choice
What to submit
A document containing the following:
The SQL used to create the new tables
The SQL statements and row counts for each of the queries
The SQL for the added index
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
