Presentation is loading. Please wait.

Presentation is loading. Please wait.

Dr. Alexandra I. Cristea CS 319: Theory of Databases: Exam preparation.

Similar presentations


Presentation on theme: "Dr. Alexandra I. Cristea CS 319: Theory of Databases: Exam preparation."— Presentation transcript:

1 Dr. Alexandra I. Cristea http://www.dcs.warwick.ac.uk/~acristea/ CS 319: Theory of Databases: Exam preparation

2 Structure 3 hours, 100% of module mark You will answer FOUR questions out of six. This year’s exam format is here.year’s exam format is here Read carefully *all* text of a question. look at: the exams given previously. (the uni doesn’t have them anymore!)exams given previously

3 Books See also Database System Concepts (DSC), 5 th Edition, Silbershatz, Korth, Sudarshan –Or 6 th edition equivalent –chapters mentioned in the following See also: Hugh's book based on CS252, a free download from BookBoon.comHugh's book based on CS252, a free download from BookBoon.com

4 Topics 1.Database generalities, Functional Dependencies, (Non-)Redundancy, Closure, Cover 2.Armstrong Axioms, Decompositions 3.Relational Algebra, query optimization 4.Tuple calculus, Domain calculus, Query equivalence 5.SQL and the relational model, How not to Use NULLs 6.Temporal Databases

5 1. Database generalities, Functional Dependencies, (Non- )Redundancy, Closure, Cover What do I need to know?

6 Database generalities : –Introduction – AIC; see also DSC Chapter 1: IntroductionIntroduction – AIC Functional Dependencies : –Proving FD - AIC; see also DSC Chapter 7: Relational Database DesignProving FD - AIC (Non-)Redundancy, Closure, Cover: –Proving (Non)Redundancy; Closure, Cover – AIC; see also DSC Chapter 7: Relational Database DesignProving (Non)Redundancy; Closure, Cover – AIC

7 2. Armstrong Axioms, Decompositions What do I need to know?

8 Armstrong Axioms –Armstrong - CompleteSound – AIC ; see also DSC Chapter 7: Relational Database DesignArmstrong - CompleteSound – AIC –See also other examplesother examples Decompositions –Decompositions: Dependency Preserving, Lossless Join ; see also DSC Chapter 7: Relational Database DesignDecompositions: Dependency Preserving, Lossless Join –See all NF simple descriptionall NF simple description –See also a paper on the subjectpaper on the subject

9 3. Relational Algebra, query optimization What do I need to know?

10 Relational Algebra: –RA-AIC; see also DSC Chapter 2: Relational ModelRA-AIC Query Optimisation: –Query Optimization- AIC; see also DSC Chapter 14: Query OptimizationQuery Optimization- AIC

11 4. Tuple calculus, Domain calculus What do I need to know?

12 Tuple Calculus –Tuple Calculus – AICTuple Calculus – AIC Domain Calculus –Domain Calculus – AICDomain Calculus – AIC Query equivalence –Query equivalence - AICQuery equivalence - AIC

13 5. SQL and the relational model, How not to Use NULLs What do I need to know?

14 SQL and the relational model –The Askew Wall (SQL and The Relational Model) pay attention to the international standard!The Askew Wall (SQL and The Relational Model –SlidesSlides –NotesNotes How not to Use NULLs –How to Handle Missing Information Without Using NULLHow to Handle Missing Information Without Using NULL –SlidesSlides –NotesNotes

15 See also: Hints regarding exam questions on Hugh's lectures Hints regarding exam questions on Hugh's lectures See also: Past exam questionsPast exam questions

16 6. Temporal Databases What do I need to know?

17 Temporal Data –Temporal Data and The Relational ModelTemporal Data and The Relational Model –SlidesSlides –NotesNotes –Pay attention to the 2011 temporal extension to SQL

18 See also: Hints regarding exam questions on Hugh's lectures Hints regarding exam questions on Hugh's lectures See also: Past exam questionsPast exam questions See also: Exercises on Temporal DataExercises on Temporal Data

19 19 Questions?

20 Q&A Will each topic contain questions from all subjects mentioned in the title? –No. They represent the pool of information from which questions are asked. See also last year’s exam. How long should I spend on one topic? –Max around 45 min (45*4=180min = 3 hours) Why are there differences in structure to previous year? –Regulations. Also due to the overlap with CS253, less emphasis is put on the overlapping topics. ‘See Also’: what do I do with them? –Make sure you read them at least once. There will be no questions directly related to those parts (unless definitions are given specifically), but it helps contextualise the information. 20

21 Beer database serves(k,b): bar k serves beer b likes(d,b) : drinker d likes beer b visits(d,k) : drinker d visits bar k

22 Beer question (tupel calculus) Give all beers that are served in bars where none of the visitors like any other beer (than the ones served in that bar). Is this a correct answer?

23 A faulty answer Consider Or after a rewrite Suppose there are 2 beers a, b, 1 bar k, 2 drinkers x, y; everyone serves/visits/likes everything Then the correct answer should result in {a, b}. The tupel calculus expression does not contain a, because every visitor of k also likes b.

24 Beer question (RA) Give all beers that are served in bars where none of the visitors like any other beer (than the ones served in that bar).  b (S  (  k (S) -  k ( V  L - V  L  S))) This is not so easy to translate to the earlier TC expression

25 Common tupel calculus mistakes Explain what is wrong in the following queries:

26 4 5 6 7 8

27 9 10 11 12 13 14

28 15 16 17 18


Download ppt "Dr. Alexandra I. Cristea CS 319: Theory of Databases: Exam preparation."

Similar presentations


Ads by Google