Workshop

Team-Fly    

 
Sams Teach Yourself SQL in 24 Hours, Third Edition
By Ronald R. Plew, Ryan K. Stephens
Table of Contents
Hour  4.  The Normalization Process


The following workshop is composed of a series of quiz questions and practical exercises. The quiz questions are designed to test your overall understanding of the current material. The practical exercises are intended to afford you the opportunity to apply the concepts discussed during the current hour, as well as build upon the knowledge acquired in previous hours of study. Please take time to complete the quiz questions and exercises before continuing. Refer to Appendix C,"Answers to Quizzes and Exercises," for answers.

Quiz

1:

True or false: Normalization is the process of grouping data into logical related groups.

2:

True or false: Having no duplicate or redundant data in a database, and having everything in the database normalized, is always the best way to go.

3:

True or false: If data is in the third normal form, it is automatically in the first and second normal forms.

4:

What is a major advantage of a denormalized database versus a normalized database?

5:

What are some major disadvantages of denormalization?

Exercises

1:

You are developing a new database for a small company. Take the following data and normalize it. Keep in mind that there would be many more items for a small company than you are given here.

Employees:

Angela Smith, secretary, 317-545-6789, RR 1 Box 73, Greensburg, Indiana, 47890, $9.50 hour, date started January 22, 1996, SSN is 323149669.

Jack Lee Nelson, salesman , 3334 N Main St, Brownsburg, IN, 45687, 317-852-9901, salary of $35,000.00 year, SSN is 312567342, date started 10/28/95.

Customers:

Robert's Games and Things, 5612 Lafayette Rd, Indianapolis, IN, 46224, 317-291-7888, customer ID is 432A.

Reed's Dairy Bar, 4556 W 10th St, Indianapolis, IN, 46245, 317-271-9823, customer ID is 117A.

Customer Orders:

Customer ID is 117A, date of last order is December 20, 1999, product ordered was napkins and the product ID is 661.

2:

Navigate to the folder on your computer where you installed MySQL, and then to the bin folder. Double-click on the mysql.exe executable to invoke MySQL. Then type the following at the command prompt to use your database:

  use learnsql;  
3:

At the mysql> prompt, enter CREATE TABLE statements based on the tables you defined in Exercise 1.


Team-Fly    
Top
 


Sams Teach Yourself SQL in 24 Hours
Sams Teach Yourself SQL in 24 Hours (5th Edition) (Sams Teach Yourself -- Hours)
ISBN: 0672335417
EAN: 2147483647
Year: 2002
Pages: 275

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net