This preview shows page 1-2 out of 7 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1.204 Quiz 1 Spring 2010 Name ______________________________________________________ Exam guidelines: 1) 80 minutes are allowed to complete the quiz. 2) Open notes; open book. 3) There are 3 questions (100 points) and 6 pages (including this one) in the exam booklet. 4) No laptop computers, calculators, cell phones or messaging devices are allowed. Please turn off any that you have brought. 5) Please write legibly – you are welcome to use both sides of the paper; we can provide additional paper if necessary. 11. Data model (35 points) You are given the following set of business rules for MIT's new subsidiary of the aircraft parts business, the hang glider business: MITGliders, or MITG for short. a. MITG manufactures products. Each product has a product ID and a sales type (wholesale or retail). b. Each sales type has a description. c. Each MITG product has a single sales type. There may be many products of each sales type. d. Each MITG product is one of two types: i. Finished hang glider ii. Hang glider assembly, such as a wing, frame or wire control system e. Each MITG product is either a finished glider or an assembly. A finished glider is a product. An assembly is a product. (Model this as a pair of optional one‐to‐one relationships.) f. Each finished glider has a product ID, a glider description and a glider type (high performance, intermediate or beginner craft) g. Each glider type has a description. h. Each glider has a unique glider type. There may be many gliders for each glider type. i. Each assembly has a product ID and a description. j. MITG buys assemblies from vendors. Each vendor has a vendor ID and a name. k. Each vendor may make one or many assemblies, and each assembly may be made by one or many vendors. l. Each assembly is uniquely identified by the combination of MITG assembly product ID and the vendor ID. m. Each assembly made by a vendor has a vendor assembly ID, vendor assembly price and a vendor assembly description. You must draw a fully normalized data model that corresponds to this set of business rules. Follow these steps. You only need to turn in one drawing that includes all the elements listed in steps a‐e. a. Draw a box for each entity: give each an appropriate name. If there are any many‐to‐many relationships in your model, show the intermediate/associative entity explicitly in your diagram (7 points) b. List the attributes in the box for each entity (7 points) c. Indicate the primary key for each entity by placing the phrase (PK) next to its name. (7 points) d. Draw all relationships between the entities in the model. Indicate foreign keys by placing the phrase (FK) next to attributes that are foreign keys. (7 points) e. Indicate the cardinality of the relationship: many‐many, many‐one or one‐one. Use crows‐foot notation; if you use another notation, define it. (7 points) To repeat: You only need to turn in one drawing that includes all the elements listed in steps a‐e above. 2Drawing on this page: 32. Database/SQL. (30 points) Based on the data model in question 2, you construct a database where the tables, attributes and relationships correspond exactly to the data model structure. You are now asked to write the following SQL queries against your database. a. List the name and vendor ID of all vendors that supply at least one assembly to MITG. List each vendor only once. (10 points) b. List the product ID and glider description of all high performance hang gliders with a wholesale sales type. Assume the code for high performance is "H" and for wholesale is "W" (10 points) c. List the name and vendor ID of all vendors whose average assembly price is above $50. (10 points) 43. Algorithm design. (35 points) Each job in the figure below starts at a time si and finishes at a time fi. Two jobs are compatible if they do not overlap. Find the maximum subset of compatible jobs. Give an algorithm that solves this problem. a. What kind of algorithm is it: divide and conquer, greedy, etc.? (5 points) b. Write the algorithm in pseudocode or Java; comment or explain it so that it is easy to understand. (20 points) 5 TimeA0 1 2 3 4 5 6 7 8 9 10 11BCDEFGHFigure by MIT OpenCourseWare.c. Informally show that your algorithm is correct. (10 points) 6MIT OpenCourseWarehttp://ocw.mit.edu 1.204 Computer Algorithms in Systems Engineering Spring 2010 For information about citing these materials or our Terms of Use, visit:


View Full Document

MIT 1 204 - QUIZ - 1.204

Download QUIZ - 1.204
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view QUIZ - 1.204 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view QUIZ - 1.204 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?