|
CSCI A114 / INFO I111
Lab Notes Fourteen
First semester 2000-2001
|
- PROJECT NINE:
- ADMINISTERING A DATABASE SYSTEM
The management of Bavant Marine Services is so pleased with the work that you have done for them that
they have decided to put you in charge of administering their database system and have asked you to determine
precisely what this would entail.
You found many activities that the individual in charge of administering the database must perform. These
include:
- analyzing tables for possible duplication
- analyzing performance to see where improvements could be made, and
- producing complete system documentation
You also determined that the administrator should specify necessary integrity constraints to make sure the
data is valid.
Security is another issue for the administrator, who should consider the use both passwords and encryption
to protect the database from unauthorized use.
Bavant wants more users to have remote access to the database, so administration would include the creation
of both data access pages and replicas.
You also learned how important the language called SQL has become in a database environment and determined
that the administrator should be familiar with the language and how it can be used.
In this lab you will work with two databases:
Download them and save them on the desktop.
Then, open Bavant Marine Services database (BMS14) on your desktop.
1. Converting a Database to an Earlier Version.
- Click Tools, Database Utilities, Convert Database, To Prior Access Database Version.
- Save as "Bavant Access 97 Version", on the Desktop.
2. Using the Table Analyzer.
- Click Tools, Analyze, Table, Next.
- Click Next again. Click Marina, then Next again.
- Make sure "Yes, let the wizard decide button" is selected, then click Next.
- Because the type of duplication identified by the analyzer does not pose a problem click Cancel.
The structure is not changed.
3. Using the Performance Analyzer.
- Click Tools, Analyze, Performance.
- Click Tables, Select All. Click Queries, Select All, OK, Close.
Do not make any changes.
4. Using the Documenter.
- Click Tools, Analyze, Documenter, Tables, the Marina check box, OK.
- Close window by clicking its Close button.
5. Using an Input Mask.
- Click the Tables object, right-click Marina, Design View. Maximize the window.
- With the Marina Number field selected, click the Input Mask property and then type
>LL99 as the value.
- Close window, save changes.
6. Specifying Referential Integrity Options.
- Click Relationships. (If the Relationships window displays a table named
Category_1, right-click the line joining Category_1 and Open Workorders and click
Delete on the shortcut menu. Click Yes to permanently delete the relationship from
the database. Right-click the Category_1 table and then click Hide Table on the
shortcut menu.) Right-click the line joining the Marina and Open Workorders tables
and then point to Edit Relationship on the shortcut menu.
- Click Edit Relationship, then Cascade Delete Related Records check box, then OK.
- Right-click line joining Category and Open Workorders tables, Edit Relationship.
- Check Cascade Update Related check box, then click OK.
- Close the Relationships window, save changes.
7. Updating a Table with Cascade Options.
- Open Category table, change category number on the first record to 11.
- Close Category table, open Open Workorders table. Check modification. Then close it.
- Open Marina table and click record selector for marina EL25, then press DELETE, Yes.
- Close Marina table, open Open Workorders table. The record for El25 has been deleted. Close table.
8. Setting Startup Options.
- Click Tools, then Startup, Display Form/Page box arrow, choose Technician Master Form.
- Click OK, then close and open the database. Close the form.
Now close Bavant (BMS) but keep Access open. Click File, Open, locate Holton Clinic.
Then click the Open button arrow. Select Open Exclusive.
9. Setting a Password.
- Click Tools, Security, Set Database Password.
- Type your password twice, then click OK. Close. Start again, type password.
10. Encrypting a Database.
- Close database, click Tools, Security, Encrypt/Decrypt.
- Select Holton Clinic, type password, click OK, type
HoltonEncrypted as the file name.
11. Removing a Password.
- Open Holton Clinic in exclusive mode, enter password when requested.
- Click Tools, Security, Unset Database Password. Close, open, verify.
12. Creating a Grouped Data Access Page.
- Open BMS14, when the Technician Master Form appears, close it.
- Click Pages, maximize window, double-click Create data access page by using wizard.
- Click Tables/Queries box arrow, then Open Workorders. Add the following fields:
- Marina Number
- Location
- Category Number
- Total Hours (est)
- Hours Spent
- Next Service Date
- Click Next twice. Click the first sort box, select Location. Then click Next.
- Type
Open Workorders as the title for the page, then click Finish.
- If Field List box displays, close it. Type title:
Open Workorders by Marina.
- Close, save as "Open Workorders by Marina".
13. Previewing the Data Access Page.
- Click Pages, right-click Open Workorders by Marina, Web Page Preview.
- Click the GroupOfOpen Workorders-Marina Number button.
- Click Next button to see next order of AD57. Close browser, close Access.
14.1 Creating the Replica.
- Drag Holton Clinic to My Briefcase.
- Answer Yes when asked if you want to continue, then No when asked about a backup.
- When the message asking if you want to be able to make design changes in the original
copy or the Briefcase copy displays, be sure that Original Copy is selected, then click OK.
- Close any open window.
14.2 Using the Replica.
- Open Holton Clinic from The Briefcase. Right click Patient, then click Open.
- Add a New Record:
ML21, Lewis, Michelle, 472 Berkshire, Perry, MI, 47626, $0.00, $0.00, 22
- Click first name of patient number JM25, type
Martin as the new name. Close.
15. Synchronizing the Design Master and the Replica.
- Close Holton Clinic replica. Open Holton Clinic on the desktop in Open Exclusive.
- Click Tools, Replication, Synchronize Now, then Directly with Replica, then OK.
- When a message displays indicating that Access must close the database in order to
perform the synchronization, click the Yes button.
16. To Create a New SQL Query.
- Close Holton Clinic, open BMS14, close form.
- Click Queries, New, Design View, OK. Close Show Table dialog box.
- Click View, SQL.
17. Including Only Certain Fields.
- Type
SELECT [MARINA Number], [Warranty], [Non-Warranty]
FROM [Marina];
- Click Run.
18. Preparing to Enter a New Sql Command.
- Click View, SQL.
19. Including All Files.
- Type
SELECT *
FROM [Marina];
- Click Run.
20. Using a Criterion Involving a Numeric Field.
- Delete previous command.
- Type
SELECT [Marina Number], [Name]
FROM [Marina]
WHERE [Non-Warranty] = 0;
- Click Run.
21. Using a Criterion Involving a Text Field.
- Delete previous command.
- Type
SELECT [Marina Number]
FROM [Marina]
WHERE [City] = 'Burton';
- Click Run.
22. Using Compound Criteria.
- Delete previous command.
- Type
SELECT [Name]
FROM [Marina]
WHERE [City] = 'Burton' AND [Non-Warranty] = 0;
- Click Run.
23. Using NOT in a Criterion.
- Delete previous command.
- Type
SELECT [Name]
FROM [Marina]
WHERE NOT [City] = 'Burton';
- Click Run.
24. Using a Computed Field.
- Delete previous command.
- Type
SELECT [Marina Number], [Name], [Warranty]+[Non-Warranty] AS [Total Amount]
FROM [Marina]
WHERE [Non-Warranty] > 0;
- Click Run.
25. Sorting the Results.
- Delete previous command.
- Type
SELECT [Marina Number], [Name], [Warranty], [Non-Warranty], [Tech Number]
FROM [Marina]
ORDER BY [Tech Number], [Warranty];
- Click Run.
26. Using a Built-In Function.
- Delete previous command.
- Type
SELECT COUNT(*)
FROM [Marina]
WHERE [Tech Number] = '23';
- Click Run.
27. Using Multiple Functions in the Same Command.
- Delete previous command.
- Type
SELECT COUNT(*), SUM([Warranty])
FROM [Marina];
- Click Run.
28. Using Grouping.
- Delete previous command.
- Type
SELECT [Marina Number], SUM([Total Hours (est)]), SUM([Hours Spent])
FROM [Open Workorders]
GROUP BY [Marina Number]
ORDER BY [Marina Number];
- Click Run.
29. Restricting the Groups that Display.
- Delete previous command.
- Type
SELECT [Marina Number], SUM([Total Hours (est)]), SUM([Hours Spent])
FROM [Open Workorders]
GROUP BY [Marina Number]
HAVING SUM([Total Hours (est)]) > 6
ORDER BY [Marina Number];
- Click Run.
30. Joining Tables.
- Delete previous command.
- Type
SELECT [Open Workorders].[Marina Number], [Name], [Location],
[Category Number], [Total Hours (est)], [Hours Spent]
FROM [Open Workorders], [Marina]
WHERE [Open Workorders].[Marina Number] = [Marina].[Marina Number]
- Click Run.
31. Restricting the Records in a Join.
- Delete previous command.
- Type
SELECT [Open Workorders].[Marina Number], [Name], [Location],
[Category Number], [Total Hours (est)], [Hours Spent]
FROM [Open Workorders], [Marina]
WHERE [Open Workorders].[Marina Number] = [Marina].[Marina Number]
AND [Hours Spent] > 0;
- Click Run.
32. Joining Multiple Tables.
- Delete previous command.
- Type
SELECT [Open Workorders].[Marina Number], [Name], [Location],
[Category].[Category Number], [Category Description],
[Total Hours (est)], [Hours Spent]
FROM [Open Workorders], [Marina], [Category]
WHERE [Open Workorders].[Marina Number] = [Marina].[Marina Number]
AND [Open Workorders].[Category Number] = [Category].[Category Number]
AND [Hours Spent] > 0;
- Click Run.
Last updated: October 16, 2000 by Adrian German for A114/I111