MidReview

MidReview - Fall 2007 Chris Clifton CS541 1 CS 541 Review...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Fall 2007 Chris Clifton - CS541 1 CS 541 Review for Midterm October 18, 2007 Fall 2007 Chris Clifton - CS541 2 Course Outline 1. Course Introduction • Intro / history lesson • Relational Model 1. Data Modeling • Entity-Relationship Data Model • Constraints and Constraint Modeling 1. Relational Theory • Relational Algebra and Calculus • Keys and Dependencies • Normalization 1. Using a Relational Database • Views • Constraints • Triggers 5. Storage mechanisms 6. Putting the Data on Disk 7. Indexing 8. Hashing / Bitmap Indexes 9. Query Processing 10.Query Optimization 11.Handling Failure 12.Concurrency Control 13.Transaction Management 14.Research topics 15.Review Students Entity/Relationship Model Diagrams to represent designs. • Entity like object, = “thing.” • Entity set like class = set of “similar” entities/objects. • Attribute = property of entities in an entity set, similar to fields of a struct. • In diagrams, entity set → rectangle; attribute → oval. ID name phone height Relationships • Connect two or more entity sets. • Represented by diamonds. Students Courses Taking Example: Drinkers Have Favorite Beers name addr license name manf name addr Beers Drinkers Bars Serves Frequents Likes Favorite E/R Subclasses • Assume subclasses form a tree (no multiple inheritance). • isa triangles indicate the subclass relation. name manf Beers Ales color isa Relationship To Weak Entities • Consider a relationship, Ordered, between two entity sets, Buyer and Product • How can we add Shipments to the mix? is wrong. Why? Buyer Product Ordered Qty Buyer Product Ordered Qty Shipment Name UPC Name UPC ID • Solution: make Ordered into a weak entity set. • And then add Shipment . Buyer Product Qty Buyer Product Shipment Name UPC Name UPC ID Ordered OB OB OP OP Qty Ordered Ordered OB OB OP OP Part of Qty Shipped Part-of is many-many and not a weak relationship! Design Principles Setting: client has (possibly vague) idea of what he/she wants. You must design a database that represents these thoughts and only these thoughts. Avoid redundancy = saying the same thing more than once. • Wastes space and encourages inconsistency. Example Good: Beers Manfs ManfBy name addr name • The design schema should enforce as many constraints as possible. – Don't rely on future data to follow assumptions . Example • If registrar wants to associate only one instructor with a course, don't allow sets of instructors and count on departments to enter only one instructor per course. Use Schema to Enforce Constraints Intuitive Rule for E.S. Vs. Attribute Make an entity set only if it either: 1. Is more than a name of something; i.e ., it has nonkey attributes or relationships with a number of different entity sets, or – Manfs deserves to be an E.S. because we record addr , a nonkey attribute....
View Full Document

Page1 / 77

MidReview - Fall 2007 Chris Clifton CS541 1 CS 541 Review...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online