Computer Science Assignments 6 & 8
Assignment #8
1. Using the Employees table of Figure 14.6, what is the result of the following SQL query?
SELECT *
FROM Employees
WHERE HoursWorked < 100;
2. Write an SQL query that retrieves first and last names and pay rate, ordered by PayRate, from the Employees table of Figure 14.6.
3. Using the Employees table of Figure 14.6 and the Insur-ancePolicies table of Figure 14.7, what is the result of the following SQL query? (The # marks allow the date to be treated numerically.)
SELECT ID, PlanType
FROM Employees, InsurancePolicies
WHERE Birthdate > #1/01/1960# AND ID = EmployeelD;
Table 14.6
ID LastName FirstName BirthDate PayRate HoursWorked
116 | Kay | Janet | 3/29/1956 | $16.60 | 94 |
123 | Perreira | Francine | 8/15/1987 | 38.50 | 185 |
149 | Takasano | Frederick | 5/23/1966 | $12.35 | 250 |
171 | Kay | John | 11/17/1954 | $17.80 | 245 |
165 | Honou | Morris | 6/9/1988 | $6.70 | 53 |
Table 14.7
EmployeeID PlanType DateIssued
171 | B2 | 10/18/1974 |
171 | C1 | 6/21/1982 |
149 | B2 | 8/16/1990 |
149 | A1 | 5/23/1995 |
149 | C2 | 12/18/1999 |
Assignment #6
1. Discuss some situations where a sequential storage device such as tape could be a useful form of mass storage and why?
2. Assuming a square two-dimensional memory organization, what are the dimensions of a memory containing 1 MB (2^20) bytes of storage?
How large would the MAR be?
How many bits are sent to the row and column decoders?
How many output lines would these decoders have?
3. Consider the following structure of the Instruction Register:
OPCODE Address 1 Address 2
6 bits 18 bits 18 bits
a. What is the maximum number of distinct operation codes that can be recognized and executed by the processor on this machine?
b. What is the maximum memory size on this machine?
c. How many bytes are required to store each complete instruction?