csce520-index - CSCE520 Test2Info Indexing andJeffUllman 1...

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

View Full Document Right Arrow Icon
1 CSCE 520  Test 2 Info Indexing Modified from slides of Hector Garcia-Molina  and Jeff Ullman
Background image of page 1

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

View Full DocumentRight Arrow Icon
Test 2 Book chapters:   Normalization: Chapters 3.4, 3.5, 3.6 SQL: Chapter 6 Constraints and triggers: Chapter 7 2
Background image of page 2
Normalization  Boyce-Codd Normal Form Third Normal Form Fourth Normal Form 3
Background image of page 3

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

View Full DocumentRight Arrow Icon
4 Farkas CSCE 520  Boyce-Codd Normal Form A relation is in Boyce-Codd Normal Form if for all  FDs X   A in S+ over R at least one of the  followings hold:  A is a trivial FD if X   A is a nontrivial FD then X is a superkey for  schema R Example:  R(Name,Breed,Date, Kennel) FD: Name,Breed,Date   Kennel R is in BCNF
Background image of page 4
5 Farkas CSCE 520  3NF Conditions A relation is in 3NF if for all FDs X   A in  S +  over R at least one of the followings  hold:  A is a trivial FD if X   A is a nontrivial FD then X is a  superkey for schema R Each attribute B in A-X is contained in a  candidate key for R
Background image of page 5

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

View Full DocumentRight Arrow Icon
6 Definition of MVD multivalued dependency   (MVD) on  R X  ->-> Y   , says that if two tuples of  R    agree on all the attributes of  X , then  their components in  Y   may be  swapped, and the result will be two  tuples that are also in the relation. i.e., for each value of  X , the values of  Y    are independent of the values of  R - X - Y .
Background image of page 6
7 Picture of MVD  ->-> Y X Y    others Equal  exchange
Background image of page 7

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

View Full DocumentRight Arrow Icon
8 4NF Definition A relation   is in  4NF   if: whenever         ->-> Y   is a nontrivial MVD, then  X    is a superkey. Nontrivial   MVD   means that: 1. Y   is not a subset of  X , and 2. X   and   are not, together, all the attributes. Note that the definition of “superkey” still  depends on FD’s only.
Background image of page 8
9 Properties Property 3NF BCNF 4NF Eliminates redundancy  due to FDs No Yes Yes Eliminates redundancy  due to MVDs No No Yes Preserves FDs Yes No No Preserves MVDs No No No
Background image of page 9

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

View Full DocumentRight Arrow Icon
10 10 SQL Why SQL  Select-From-Where Statements Multirelation Queries Subqueries
Background image of page 10
11 Meaning of Single-Relation Query Begin with the relation in the FROM  clause. Apply the selection indicated by the  WHERE clause. Apply the extended projection indicated  by the SELECT clause.
Background image of page 11

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

View Full DocumentRight Arrow Icon
12 Operational Semantics Check if Anheuser-Busch name manf Bud Anheuser-Busch Include t.name in the result, if so Tuple-variable t loops over all tuples
Background image of page 12
13 Comparing NULL’s to Values The logic of conditions in SQL is really 3- valued logic: TRUE, FALSE, UNKNOWN. Comparing any value (including NULL 
Background image of page 13

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

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

This note was uploaded on 12/13/2011 for the course CSCE 520 taught by Professor Farkas during the Spring '11 term at South Carolina.

Page1 / 77

csce520-index - CSCE520 Test2Info Indexing andJeffUllman 1...

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

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