These exercises are intended to serve as a review of the entire book, not just the present chapter. Some are repeats of exercises from earlier chapters. ## Exercise 8-1What exactly is the relational model? State as many differences as you can think of between SQL and the relational model. Why are SQL's departures from the relational model a bad thing? ## Exercise 8-2What's The Information Principle? How might "row IDs" violate it? ## Exercise 8-3What's a predicate? What's the connection between relations and predicates? ## Exercise 8-4Do you believe relations are "flat" or two-dimensional? Justify your answer. ## Exercise 8-5What's a join dependency? If relvar R satisfies the FD A Exercise 8-6 What's the real difference between a domain and a relation? ## Exercise 8-7What's wrong with deferred integrity checking? ## Exercise 8-8What's The Principle of Interchangeability? ## Exercise 8-9What does first normal form really mean? ## Exercise 8-10What's "the final normal form"? In what sense is it final? ## Exercise 8-11What's the difference between a relation and a relvar? ## Exercise 8-12What's The Principle of Orthogonal Design? ## Exercise 8-13Would it make sense to define a relational comparison operator, "/" say, such that r / s gives TRUE if and only if r and s are disjoint (i.e., have no tuples in common)? Justify your answer. ## Exercise 8-14Why is ORDER BY not a relational operator? ## Exercise 8-15The difference between base relvars and views is that the former are physically stored and the latter aren't: true or false? ## Exercise 8-16Why doesn't the relational model permit nulls? Or duplicates? ## Exercise 8-17The relational model prescribes the data types that must be supported: true or false? ## Exercise 8-18What's the difference between a primary key and a candidate key? ## Exercise 8-19What's nonloss decomposition? ## Exercise 8-20Should it ever be necessary to denormalize? ## Exercise 8-21Product is a special case of join: true or false? ## Exercise 8-22What's a type constraint? When are type constraints checked? ## Exercise 8-23Can a relation have an attribute whose values are sets? Or arrays? Or relations? ## Exercise 8-24Why do SQL's updates through a cursor violate the relational model? ## Exercise 8-25Can a relation have no attributes at all? ## Exercise 8-26What does it mean to say that the relational algebra is closed? Why is such closure important? ## Exercise 8-27Any given relation r is identically equal to a certain restriction of r and a certain projection of r. Explain these observations. ## Exercise 8-28Why is "materialized view" a contradiction in terms? ## Exercise 8-29What's the difference between the relational model and an implementation thereof? ## Exercise 8-30What's the crucial logical difference between a relational database and any other kind of database? (Hint: Remember The Information Principle.) ## Exercise 8-31What's the difference between a true object/relational DBMS and a true relational DBMS? ## Exercise 8-32Does restrict distribute over union? Over minus? ## Exercise 8-33Does project distribute over union? Over minus? ## Exercise 8-34How does XML fit with the relational model? ## Exercise 8-35If you summarize an empty relation, what do you get? ## Exercise 8-36What's the Closed World Assumption? ## Exercise 8-37Define the operators semijoin and semiminus. ## Exercise 8-38Define (a) BCNF, (b) 5NF, and (c) 6NF. Did it ever occur to you that the last two--4NF too, come to that are misnamed? ## Exercise 8-39Is join commutative? Associative? Idempotent? ## Exercise 8-40Every binary relvar is in BCNF: true or false? ## Exercise 8-41What's the identity with respect to join? ## Exercise 8-42What does it mean, formally or informally, to say an FD or JD is trivial? ## Exercise 8-43Does a key that involves no attributes at all make any sense? What about a foreign key? ## Exercise 8-44If a 3NF relvar has no keys that involve two or more attributes, that relvar is in 5NF: true or false? ## Exercise 8-45Give at least three reasons why the result of a SELECT statement in SQL isn't a relation, in general. You can assume we're talking about an interactive environment, meaning we're not limited to "singleton SELECTs" (that is, SELECTs that retrieve at most one row). ## Exercise 8-46Intersect is a special case of join: true or false? ## Exercise 8-47Suppose relation r is of degree three. How many distinct projections does r have? ## Exercise 8-48Suppose relvar R is of degree three. What's the maximum number of keys R can possibly have? What about FDs? ## Exercise 8-49Are (relational) cartesian product and (relational) division inverse operations? Subsidiary question: Why did I say, specifically, relational cartesian product? ## Exercise 8-50What's the join of n relations for n = 3? What about n = 1? And what about n = 0? ## Exercise 8-51How can we do relational comparisons in SQL? ## Exercise 8-52Does it make sense to declare keys for a view? ## Exercise 8-53(a) Let the FD A R. A and B are sets of attributes, of course; so what happens if either of those sets is empty? (b) Let K be a key for some relvar R. K is a set of attributes; so what happens if that set is empty? ## Exercise 8-54Which of the following identities are valid? a. r INTERSECT s r MINUS s ) b. r UNION ( r INTERSECT s ) r INTERSECT ( r UNION s ) r MATCHING r Exercise 8-55 |

Database in Depth: Relational Theory for Practitioners

ISBN: 0596100124

EAN: 2147483647

EAN: 2147483647

Year: 2006

Pages: 127

Pages: 127

Authors: C.J. Date

Similar book on Amazon

- Key #1: Delight Your Customers with Speed and Quality
- Key #3: Work Together for Maximum Gain
- Beyond the Basics: The Five Laws of Lean Six Sigma
- Making Improvements That Last: An Illustrated Guide to DMAIC and the Lean Six Sigma Toolkit
- The Experience of Making Improvements: What Its Like to Work on Lean Six Sigma Projects

flylib.com © 2008-2017.

If you may any questions please contact us: flylib@qtcs.net

If you may any questions please contact us: flylib@qtcs.net