CS370 Web Programming - TEST #1
September 21, 2000
I have not violated the Honor Code in completing this test.
Signed: ___________________________________________
READ THESE NOTES
Sign the pledge and initial each sheet. SHOW ALL YOUR WORK.
Do as many questions as you are able.
DO NOT spend an excessive amount of time on any one question since all questions count the same.
You may OMIT any ONE question.
You MUST indicate which question is to be omitted by circling its number and writing the word OMIT next to it.
- Describe how in ACCESS one may create an alternate key that contains more than one field?
- What TCP protocol does a web browser and web server use to communicate with each other?
- What is the purpose of a DNS server?
- For each of the following terms give an equivalent term in Relational Database terminololgy.
- Entity ____________
- Record _________
- Field ___________
-
What is the reason for declaring a field to be a key (alternate or primary)?
- Which of the following is FALSE about the primary key. _____
A) The primary key must uniquely identify a record.
B) The primary may consist of more than one field.
C) The primary key should not be null.
D) The primary key may be numeric or string data.
E) The primary key may not also be a foreign key.
- Identify the primary key of the following table by underlining one or more fields.
ALUMNI_DONATION
- AlumID
- DateOfDonation
- AmountOfDonation
- RecorderOfDonation
- Restricted (Y/N)
- Comment
- A _______ is ordinarily used as a user-friendly, data entry device.
A) Form
B) Report
C) Query
D) Module
E) Relationship
- A Domain is _______
A) the same as a field.
B) the allowable values a column (or attribute) can have.
C) a link to another table.
D) a derived class.
E) always a 1 - 1 relationship.
- When creating relationships in Access, a key field in one table is connected to a related field in another table. For example, the State Code field of the STUDENT table is connected to the State Code field (primary key) of the STATE table.
The State Code field of the STUDENT table is a ______ of the STUDENT table.
A) primary key
B) candidate key
C) foreign key
D) alternate key
E) minor key
- The relationship between the STUDENT table and the STATE table in the College database is ______.
A) one to one
B) one to many
C) many to one
D) many to many
E) invalid
- COURSES
- DeptID (text - 4 chars)
- DeptName (text - 32 chars)
- CourseNumber (text - 6 chars)
- CourseName (text - 40 chars)
- CreditHours (integer from 0 to 10)
- Prerequisites (boolean)
Describe concisely and accurately how the COURSES table schema could lead to data redundancy and data inconsistency.
- Give an example of an entity that has subtype entities and name the subtype entities.
- For each of the following tables determine if each contains a violation of a normal form. If so, state which normal form and identify the violation by underlining the fields causing the violation.
STUDENT
- StudentID
- StudentName
- PrimaryAdvisor
- CampusClub1
- CampusClub2
- CampusClub3
STUDENT
- StudentID
- StudentName
- Major
- PrimaryAdvisor
- For each of the following tables determine if each contains a violation of a normal form. If so, state which normal form and identify the violation.
Note: Business Rules
1) A room's seating capacity must be between 1 and 100
2) A course section may not be scheduled in a classroom whose seating capacity is less than the enrollment limit for the course.
COURSE
- DepartmentID
- CourseNumber
- DepartmentName
- CourseName
ROOM
- BldgID
- RoomNumber
- SeatingCapacity
- ProjectionSystem(Y/N)
COURSESECTION
- DepartmentID
- CourseNumber
- Section
- Year
- Semester
- BuildingID
- BuildingName
- Room#
- EnrollmentLimit
- InstructorID
- Consider the following schema for a table called Employee that is part of the Business database.
- Employee SSN
- Employee ID
- Employee Name (ex. Joe Smith)
- email address
- Hire Date
- Number of Dependents
Identify each candidate key above by circling each.
- Which of the fields in the Employee table above should be defined as an alternate key?
The EmployeeWorkRecord Table (also part of the Business database) is as follows
EmployeeWorkRecord.
- Employee SSN - primary key - (ex. 1234546789)
- Date/Time - primary key - (ex. 1998/09/23 08:00)
- CustomerID
- Hours Worked (ex. 6.8)
Complete the Business database -
- Identify any additional tables that are necessary. For each table, identify the primary and alternate keys. List all attributes for each table and briefly describe the domain of each.
- Identify all foreign keys and label the cardinality of each relationship (i.e., draw a relationship diagram). Enforce the business rule that says employees may only perform work for registered customers.