CS157b Fall 2003Practice Midterm 1
The practice midterm is below. Here are some facts about the actual
midterm: (a) The midterm will be in class . (b) It is
closed book, closed notes. Nothing will be permitted on your desk except
your pen (pencil) and test. (c) You should bring photo ID.
(d) There will be more than one version of the test. Each version
will be of comparable difficulty. (e) If your cell-phone or beeper
goes off you will be excused from the test at that point and graded
on what you have done till your excusal. (f) One problem (less typos)
on the actual test will be from the practice test.
[Student created solutions.]
1. Give the Embedded SQL command to create a cursor on the Employee table
for a query that returns the birth date of all employees named Chris. Explain
with code how to use this cursor to retrieve all the rows returned by this
query.
2. Give the SQLJ command needed to change the employee with
SSN=000111222 salary to
50000.
3. Explain how to make a connection to a database using JDBC.
4. Explain what each of the following HTTP responses mean: 200, 400, 404.
5. In an HTTP GET request how might an agent say that it supports GIF images?
6. Write a short DTD for documents that would store business card information.
7. What are the three tiers in three-tiered internet application
architecture?
8. Suppose we have a 100 page sorted file and a disk with avg read time of 10 ms
per page. Suppose each page is 8096 bytes and processing a record takes
30ns. Each
record is 400 bytes and there are no records which span across blocks.
What would
be the expected time to do a search with an equality condition?
9. Define the following disk related terms: block, sector, cylinder.
10. Describe RAID level 2.
|