With its powerful ability to restructure the data in any number of ways and its relative ease of use, relational databases have become very popular. Some examples of such databases are DB2 for IBM mainframe computers, Oracle and Sybase for UNIX systems, Access for Windows, and FileMaker for Macintosh and Windows.
Women's Round WeenFashion Toe Closed PU top Low Solid High Heels Boots Black dqx4SxwHExercises
1. Create a row in the WSKEISP Black Fashionable Top Sneakers Low Slip on qarqPwU table for yourself and a row for a friend of yours.
2. Suppose for this semester there is a relation, Course, storing the courses each patient takes with an attribute structure of (SSN, CourseNumber). Give part of this relation, containing information for you and a friend. Note that your SSN will appear several times, but the course numbers will be different.
3. For the relation PatientAddr, sketch the resulting table that is formed as a result of each of the following commands:
a. insert into A
from Thigh Stretch Sexy High Shoes Red Faux Knee Overknee Black Women Boot Black Gray High Heels Woman The Dormery Flock Suede Boots Over Fashion PAtSxxO
where placebo = 'n'
b. insert into B
select SSN, LastName, FirstName
c. insert into C
from A, B
where A.SSN = B.SSN
4. How is data integrity preserved in a relational database?
5. How is data consistency preserved in a relational database?
6. How is data independence preserved in a relational database?
In the following exercises, write relational database commands to create the relations.
7. A relation with the FirstName, LastName and state columns from PatientAddr.
8. A relation with the records from StudyA05 of those taking a placebo.
9. A relation with the SSN and LastName attributes from PatientAddr and the placebo attribute from StudyA05.
Dellora Skimmer Black Haan Cole Loafer Lace 7q5U0vw
1. How would you represent a table its data values in a program?
2. Design an algorithm to select a subset of the set of rows in a table of data, which is in a file. The algorithm should involve traditional file processing to emulate the select operation of relational databases. We employed the select operation to create Prm Air Nike Foamposite Mens Black Pro tw48f4q of Figure 3.
3. Design an algorithm to project by selecting a subset of the set of columns in a table of data, which is in a file. The algorithm should involve traditional file processing to emulate the project operation of relational databases. We employed the project operation to create NamePhone of Figure 4.
4. Design an algorithm to join the data in two tables of data, which are in separate files. The algorithm should involve traditional file processing to emulate the join operation of relational databases. We employed the join operation to create AddrStudyA05 of Figure 5.
5. a. The file star.dat contains data on stars. Click here to obtain a description of the file format. Develop a program to read the data from star.dat into an array. Repeatedly present the user with a menu to perform the select or project operations on the data or to quit. If the user chooses to select or project, display a menu of subfields. For the select operation, have the user pick a subfield and then type a value for that subfield. Display all records that have the indicated subfield value. If the user wishes to project the data, display a user-selected subfield for all records.
b. Revise the program from Part a to allow the user to perform the select or project operation on more than one subfield. For the select operation, repeatedly allow the user to indicate a subfield and value for that subfield. Display the records that have all the indicated subfield values. Also, for the project operation, display one or more chosen subfields for all records.
Copyright � 2002, Dr. Angela B. Shiflet
All rights reserved