lab 10
Competencies:
- Creation and Design of MySQL Schema Objects
- Creating and modifying views
-
- List the benefits of using views
- Create a view
- Alter or drop a view
- Select and update database information using a view
- Understand user privileges in SQL
- Create, rename and drop users
- Grant view and revoke user privileges
- Query for data
- Backup your database
Requirements:
- Identify the types of users that would be using your database by job type. For example, you might have a sales clerk entering sales information and an hr rep entering personnel information. You should have at least 3 different categories of users for your system.
- For each user category determine which tables they would need access to and the type of access they would need (select, update, insert, delete, grant)
- Identify at least one view for each user category that would help them easily retrieve the data that they need access to. One of the views should be an updatable view.
- Create the views and save the commands in a script file.
- For each user category, identify and write 5 queries that they would need to use on a regular basis. You should have 15 queries, including the following:
- At least 2 queries that join tables
- At least 1 insert query, 1 update query and 1 delete query
- At least 1 queries that uses a view
- At least 1 query that includes a calculation or an aggregate function.
- Save your queries in a .sql file.
- Create one user for each role and grant them the privileges they need to do their job. Save the commands in a .sql file
- Describe to me the role of each user, the access needed, the views created and why. This may be in a text file or typed into the comments for the assignment.
- Perform a full backup of your database using the Export function in the workbench.
- Attach all sql queries (views, queries, users and privileges) as well as the database export file to this assignment.
Grading Rubric:
| Criteria | Points |
|---|---|
|
Identify 3 categories of users and the access required |
5 points |
| Create 3 views – 1 for each category. |
15 points |
| Create 1 user for each category and grant them access to the tables and views required. |
15 points |
| Describe the roles of each user, access needed, views created and why. | 15 points |
|
Create 15 queries, including:
|
15 points |
| Full database backup | 10 points |
| Attach a file with the scripts and database export | 5 points |
|
Total |
80 points |


0 comments