0% found this document useful (0 votes)
23 views5 pages

Hard Fought Battle-Lincoln Heaven

The document provides information about tables, data types, primary keys, foreign keys, and relationships in a sample database. It includes: 1) A table describing the primary keys, foreign keys, and other attributes for 5 tables: Employees, Dependents, Departments, Supervisors, and Wages. 2) Instructions to create relationships between the tables based on their primary and foreign keys. 3) Multiple queries to extract information from the tables based on different criteria, such as employees in certain locations or pay types. 4) Multiple choice and fill in the blank questions about database concepts like data types, primary keys, and relationships.

Uploaded by

K Kgfdf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views5 pages

Hard Fought Battle-Lincoln Heaven

The document provides information about tables, data types, primary keys, foreign keys, and relationships in a sample database. It includes: 1) A table describing the primary keys, foreign keys, and other attributes for 5 tables: Employees, Dependents, Departments, Supervisors, and Wages. 2) Instructions to create relationships between the tables based on their primary and foreign keys. 3) Multiple queries to extract information from the tables based on different criteria, such as employees in certain locations or pay types. 4) Multiple choice and fill in the blank questions about database concepts like data types, primary keys, and relationships.

Uploaded by

K Kgfdf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

TABLES & SAMPLE DATA

TABLE DESIGN & DATA TYPES


NB. No Primary Keys have been set. No Relationships have been set.

Name: _Lincoln Heaven____________ Class: _____11E1________ Date: ___________________________

1. For each table find/determine the following by filling in the field names [10 Marks]

Table Primary Key(s) Foreign Key(s) Candidate Key(s) Composite Key(s)


Name
Employees TRN, Emp ID Department TRN
Dependents Emp Id and Fname Emp ID Emp Id and Fname
Departments Dept ID Dept ID Dept ID
Supervisors Emp ID, Sup ID Emp ID Emp ID
Wages Emp Id Emp Id Emp Id

2. After looking at the tables, their data and data types & determining Primary Keys and such, you are now
required to create relationships between the tables. [10 Marks]

Table 1 Table 1 Field Table 2 Table 2 Field Relationship Type


Employee Emp ID Departments Emp ID One to one
Departments Dept ID Supervisors Dept ID One to many
Supervisors Dept ID Employees Department One to many
Employees Emp ID Wages Emp ID One to one
Employees Emp ID Supervisors Emp ID One to many

Using the given tables and data, create the following queries by filling in field names, table names, criteria and such

Design a query that will display all employees living in Kingston, St. Andrew or St. Catherine. [3 Marks]

Field Fname Lname Parish Emp ID


Table Employees Employees Employees Employees
Sort
Show ✘ ✘ ✘ ✘ ✘

Criteria Kingston,St.Andrew
OR St.Catherine

Design a query that will display all employees who are not staff. [3 Marks]

Field Emp ID Fname Lname Worker


Type
Table Employees Employees Employees Employees
Sort
Show ✘ ✘ ✘ ✘

Criteria Part-Time
OR Contract

Use a query to show employees who have been with the company less than 5 years [3 Marks]

Field Emp ID Fname Lname Hire Date


Table Employees Employees Employees Employees
Sort
Show ✘ ✘ ✘ ✘

Criteria >
DateAdd("2024",
-5, Date())
OR

Create a query to show all employees living in Kingston with dependents. [3 Marks]

Field Fname Lname Parish


Table Employees Employees Employees
Sort
Show ✘ ✘ ✘

Criteria Miller Kingston


OR Taylor

Display all employees whose last name end with the letter R [3 Marks]

Field Fname Lname


Table Employees Employees
Sort
Show ✘ ✘

Criteria *R
OR

Design a query that will display employees who are Staff, Monthly Paid, make no O/T and earn between $80000 and
$90000 [4 Marks]

Field Fname Lname Worker Pay Cycle O/T Amount


Type
Table Employees Employees Employees Wages Wages Wages
Sort
Show ✘ ✘ ✘ ✘ ✘ ✘

Criteria Staff Monthly NO Between


80000 and
90000
OR
Create a query that will display all weekly paid employees, their weekly income, monthly income and yearly income
assuming there are 4 weeks in every month and 52 weeks in a year. [6 Marks]

Field Fname Lname Pay Cycle Amount Monthly Yearly


Income Income
Table Employees Employees Wages Wages
Sort
Show ✘ ✘ ✘ ✘ ✘ ✘

Criteria Weekly Amount*4 Amount*4


OR
MULTIPLE CHOICE [10 Marks]

1. Which of the following is NOT a data type in 3. A unique identifier made of multiple fields from
Microsoft Access? a record
a. Hyperlink a. Primary key
b. Calculated b. Secondary key
c. Attachment c. Composite key
d. Numeric d. Candidate key

2. An appropriate field size for EMPID in the 4. A field that can be used to ALSO uniquely
EMPLOYEES TABLE? identify a record
a. 4 a. Primary Key
b. 5 b. Secondary key
c. 6 c. Composite Key
d. 7 d. Candidate key

5. In Microsoft Access this data type is alpha


numeric in nature 8. A report has __ different VIEWS
a. Hyperlink a. 2
b. Attachment b. 3
c. Short text c. 4
d. Number d. 5

6. A table has __ different VIEWS 9. A report has __ different VIEWS


a. 2 e. 2
b. 3 f. 3
c. 4 g. 4
d. 5 h. 5

7. A query has __ different VIEWS 10. A field in a table that appears as the primary key
a. 2 in another table
b. 3 a. Foreign key
c. 4 b. Candidate key
d. 5 c. Secondary key
d. Composite key

Fill in The Blanks

A relational database is composed of the following 4 objects, that all work together with the same data.

Tables Form Queries Report Criteria


Complete each of the sentences below using the most appropriate term from the list above. (A term may be
used more than once). [5 Marks]

A relational database stores data in a number of related files, more commonly referred to as ____Tables_______.
______Queries______ are used to ask detailed questions of the database when searching for records that satisfy
particular conditions.
____Reports________ display fields extracted from ___Tables__________ in a particular order.
______Form______ use a graphical representation to allow users to enter, modify, delete and view records in the
database.

You might also like