CS122B Project 4: DBA - User Management & Performance Tuning)

Due May 20th, Tuesday, 11:45 pm

References

Requirement 1: User Management Interface

The goal of Requirement 1 is to build a User Management Interface (as a GUI) for managing user accounts in MySQL. Your GUI should allow granting and/or revoking privileges to existing and/or new users for various "resources" in MySQL. We care the following types of resources: Here is a sample JDBC program that connects to MySQL, gets all the database names, and acquires information about different tables and columns within "moviedb" database. (don't forget to add the mysql JDBC jar file to your classpath at the time of compiling. You'll also need to change the root password in the DriverManager.getConnection() line to before compiling).

The set of privileges that are allowed to be granted/revoked on resources using your GUI is at your discretion. However, there are some implicit restrictions. For instance, privileges such as select, insert, update make sense at the database, table as well as column level, but cannot be associated with stored procedures. Similarly, a user can be granted execute privilege on a stored procedure, but not on a database, table or column. You should keep such restrictions in mind when designing your GUI and deciding how you want the user of your GUI (we'll call him the DBA) to be able grant/revoke privileges.

You will need to demonstrate that privileges were correctly added/revoked by using your GUI. To do so, you'll need to issue SQL queries at the command prompt in a separate window that are relevant to the changes you made through your GUI. For example, if using the GUI, the DBA grants a user by the name joe select privilege on the "stars" table in the moviedb database, you should be able to log in through a terminal using joe's credentials and successfully execute a query such as select * from moviedb.stars Similarly, if your GUI shows that there are certain privileges that joe does not have, the corresponding sql queries should fail.

The exact look and feel of the User Management Interface is up to you. As a guideline, you can refer Fig 6.8, which is part of one of the chapters of the MySQL commercial workbench reference While the figure shows 3 tabs with "roles" , "objects" and "privileges", you can have something like "users" instead of "roles" and "resources" instead of "objects". Again, this is only one of several possible ways of designing your interface, and you should feel free to implement an original idea that you find intuitive and user-friendly.

Here are a few more suggestions that should help you.

Some Technical Details

The default superuser in MySQL 5.1 is "root". The "root" account is created at the time of installation. The password for this account should be the password you provided at the time of installation of MySQL. For unfettered access to adding and/or revoking different privileges, you can assume that the DBA is logged in as root.

All privilege information is maintained in the MySQL grant tables (Explained in detail in the reference section on MySQL privilege management). In particular, the 4 main grant tables in MySQL are:

Do not directly change the information in these grant tables using your back-end program. Instead, call upon GRANT, REVOKE, ALTER, CREATE and DROP as appropriate; these commands will update the grant tables as necessary.


Requirement 2: Performance Tuning

As FabFlix inventory is added to the FabFlix database, customer browsing and searching times may increase to unacceptable levels. So, here we create a large test database, reflective of how big the FabFlix database is likely to become, and determine if indexing certain database tables is warranted.


Deliverables

Turn in one ZIP file, labeled with your team name, that contains your updated employee access system and your tuning report; make sure the file's extension is ZIP.
Turn in the ZIP file via EEE.
Your ZIP file is due no later than May 20th, 11:45 pm

Demonstration

Plan how you want to demonstrate the capabilities of your GUI. Try and cover different types of functionalities and carefully choose the sql queries that demonstrate that the corresponding functionality works. What order you do things in is up to you. Additionally, you might also want to show us that the changes were indeed made to the necessary grant tables in the mysql database. Remember that for database specific privileges assigned to a user, you'll have entries in the Db table as well as the the user table. For example, if you assign a SELECT and INSERT privilege on all tables in the moviedb database to joe, then you'll have an entry for joe in the user table as well as an entry in the Db table, tying joe's privileges to the moviedb database.

We will also ask you to briefly explain the results of your tuning tests and your recommendations regarding indexing of the database.

Written Chen Li as "Project 4" for ICS185 Fall 2005.
Revised by Norman Jacobson for the Spring 2005 offering of ICS185, May 2005.
Revised by Norman Jacobson with assistance from Michael Sirivianos, for the Winter 2006 offering of ICS185, to include FabFlix user groups, and to reflect the use of postgres 8.1, including the use of "roles," February 2006. Revised by Chaitanya Desai and Chen Li in Spring'08.