Cse 344 May 7th – Exam Review.

Slides:



Advertisements
Similar presentations
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
Advertisements

Query Optimization CS634 Lecture 12, Mar 12, 2014 Slides based on “Database Management Systems” 3 rd ed, Ramakrishnan and Gehrke.
Query Execution, Concluded Zachary G. Ives University of Pennsylvania CIS 550 – Database & Information Systems November 18, 2003 Some slide content may.
Query Optimization Goal: Declarative SQL query
Midterm Review Lecture 14b. 14 Lectures So Far 1.Introduction 2.The Relational Model 3.Disks and Files 4.Relational Algebra 5.File Org, Indexes 6.Relational.
CS263 Lecture 19 Query Optimisation.  Motivation for Query Optimisation  Phases of Query Processing  Query Trees  RA Transformation Rules  Heuristic.
Physical Database Monitoring and Tuning the Operational System.
Query Optimization 3 Cost Estimation R&G, Chapters 12, 13, 14 Lecture 15.
1 © Prentice Hall, 2002 Physical Database Design Dr. Bijoy Bordoloi.
TM 7-1 Copyright © 1999 Addison Wesley Longman, Inc. Physical Database Design.
Physical Database Design Chapter 6. Physical Design and implementation 1.Translate global logical data model for target DBMS  1.1Design base relations.
Chapter 6 1 © Prentice Hall, 2002 The Physical Design Stage of SDLC (figures 2.4, 2.5 revisited) Project Identification and Selection Project Initiation.
Querying Large Databases Rukmini Kaushik. Purpose Research for efficient algorithms and software architectures of query engines.
Chapter 16 Practical Database Design and Tuning Copyright © 2004 Pearson Education, Inc.
1 Final Review Tuesday, March 6, The Final Date: Tuesday, March 13, 2007 Time: 6:30 - 8:30 Room: EE 037 You must come to campus Open book exam.
Physical Database Design Purpose- translate the logical description of data into the technical specifications for storing and retrieving data Goal - create.
Lec 7 Practical Database Design and Tuning Copyright © 2004 Pearson Education, Inc.
Lecture 15: Query Optimization. Very Big Picture Usually, there are many possible query execution plans. The optimizer is trying to chose a good one.
Data Integrity & Indexes / Session 1/ 1 of 37 Session 1 Module 1: Introduction to Data Integrity Module 2: Introduction to Indexes.
CHAPTER 19 Query Optimization. CHAPTER 19 Query Optimization.
Database Applications (15-415) DBMS Internals- Part VIII Lecture 17, Oct 30, 2016 Mohammad Hammoud.
Practical Database Design and Tuning
CS 540 Database Management Systems
Record Storage, File Organization, and Indexes
CS 540 Database Management Systems
CS 440 Database Management Systems
Parallel Databases.
Indexing ? Why ? Need to locate the actual records on disk without having to read the entire table into memory.
Quiz Questions Q.1 An entity set that does not have sufficient attributes to form a primary key is a (A) strong entity set. (B) weak entity set. (C) simple.
ITD1312 Database Principles Chapter 5: Physical Database Design
Methodology – Physical Database Design for Relational Databases
Lecture 16: Relational Operators
Relational Algebra Chapter 4, Part A
CHAPTER 5: PHYSICAL DATABASE DESIGN AND PERFORMANCE
Chapter 15 QUERY EXECUTION.
Database Management Systems (CS 564)
Evaluation of Relational Operations: Other Operations
Examples of Physical Query Plan Alternatives
April 30th – Scheduling / parallel
1 Demand of your DB is changing Presented By: Ashwani Kumar
國立臺北科技大學 課程:資料庫系統 fall Chapter 18
February 7th – Exam Review
Database management concepts
Cse 344 May 2nd – Map/reduce.
Lecture 12 Lecture 12: Indexing.
Physical Database Design
Database Query Execution
Cse 344 APRIL 23RD – Indexing.
Practical Database Design and Tuning
Database Applications (15-415) DBMS Internals- Part IX Lecture 21, April 1, 2018 Mohammad Hammoud.
Introduction to Database Systems CSE 444 Lecture 23: Final Review
The Physical Design Stage of SDLC (figures 2.4, 2.5 revisited)
Cse 344 June 1st – Final Review.
Database management concepts
Lecture 30: Final Review Wednesday, December 6, 2000.
Relational Algebra Friday, 11/14/2003.
Relational Database Design
Chapter 8 Advanced SQL.
Relational Query Optimization
CS222P: Principles of Data Management Notes #13 Set operations, Aggregation, Query Plans Instructor: Chen Li.
Evaluation of Relational Operations: Other Techniques
Lecture 24: Final Review Friday, March 10, 2006.
Lecture 30: Final Review Wednesday, December 10, 2003.
Query Optimization.
CPSC-608 Database Systems
Introduction to Database Systems CSE 444 Lecture 23: Final Review
Final Review Friday, December 8, 2006.
Evaluation of Relational Operations: Other Techniques
Lecture 29: Final Review Wednesday, December 11, 2002.
Lecture 20: Query Execution
Presentation transcript:

Cse 344 May 7th – Exam Review

Examination Stations Exam Wednesday 9:30-10:20 One sheet of notes, front and back Practice solutions out after class Good luck!

Exam Length Production v. Verification Practice exam Short answer Simplest answer possible Problems not necessarily in order of difficulty

General Topics Databases Motivations and definitions Relational Databases SQL Relational Algebra Datalog Semi-structured Data

General Topics Internals Indexes Physical plans/Cost Estimation Disk I/o Parallel Shared Nothing Map Reduce

Databases Motivations Collections of related files Databases vs. DBMS What is stored? What is the DBMS’ responsibility?

Databases Motivations Collections of related files Databases vs. DBMS What is stored? What is the DBMS’ responsibility? Data storage and manipulation Black box thought Physical data independence

Relational Databases Motivations Breaking away from singular flat files Why/how do we break up data? Data model Schemas and keys Records and attributes Attribute types/typing

Relational Databases Primary keys What are the constraints? When do we select keys? Multiple keys Foreign keys Constraints vs. Joining Keys across different data

SQl Structure Flat tables First normal form Crosswalks and joins Breaking up data into multiple relations

SQl Code Create statements Key declarations Type declarations Insert/Delete statements Update statements Drop table

SQl Code Select From Where Group by Having Order by

SQl Code Distinct (and relation to group by) Inner vs. Outer Joining Left/Right/Full Nested loop semantics Cross join with selection Self joins Produce companies that produce gadgets and cameras

SQl Code Aggregation Count,sum,min,max,avg Null values IS NOT null Count(null) Where vs. Having

SQl Code Constructing Queries FWGHOS Subqueries In Select (Single attribute projection) In From (subquery AS, WITH AS) In Where (EXISTS, IN, ANY) Correlated vs. Non-correlated Un-nesting Finding the Witness

SQl Code Negation in subqueries Monotonicity Definitions Example Difficulties and necessity of subqueries

Relational ALgebra Set vs. Bag semantics Why bag? Query plans and RA expressions Operations (on relations, some with conditions) Union, difference Selection Projection Joins

Relational ALgebra Operations (on relations, some with conditions) Union, difference Selection Projection Joins Duplicate elimination Grouping Sorting

Relational ALgebra Operations (on relations, some with conditions) Union, difference Selection Projection Joins (remember your conditions) Duplicate elimination Grouping Sorting

Relational ALgebra How do we know SQL and RA are equally expressive? Translating one to the other Multiple RA expressions possible for same query DBMS optimization

Relational ALgebra Producing RA expressions/trees From queries Visa-versa Bag vs. Set RA Datalog is set semantic

Datalog Queries which cannot be defined in RA Recursive queries Expressing RA expressions in datalog Set semantics (procedural) “Simple, concise, elegant” Fixed point semantics Recursion builds from basecase Left/right/non-linear

Datalog Logical framework Explicitly defined intermediate results Terminology Facts and Rules Extensional vs. Intensional Predicates Head and body Head vs. Existential Variables Unsafe rules

Datalog Writing Rules Safety Base cases Aggregation and negation Variable scope Simple recursive queries Converting from RA

Semistructured Data Motivations Transactional vs. Analytical Data Data distribution Consistency Partition vs. Replication Key-value storage -> Document Storage

jSON Gives structure to data Objects and collections Self described Separate and less constrained than SQL++ Nested structure (non-first normal form)

Asterix DB Document-based NoSQL Semi-structured Over JSON objects Constraints (types, no duplicates) SQL++ Description vs. Manipulation

Asterix DB Dataverse Database – set of data currently working with Types UUID – auto generated Null vs. Missing Nested collections Open v. Closed Required v. Optional fields

Asterix DB Datasets Relations Defined over a type Must have a key Indexes Over particular attributes Speeds up 1-d selection (BTREE), 2-d selection (RTREE) and substring selection (KEYWORD)

Asterix DB SQL++ Heterogeneity Unnesting Nesting/Aggregation and non-first normal Multi-value join Supports one to many Can often be represented in SQL

Semistructured Distributed systems Short-term analysis Lower set-up costs Higher query costs (often)

Internals Physical Plans Operators Pipelining (selection, projection) Joins Hash Merge Index Nested Loop

Internals Physical Plans Operators Not discussed Grouping/aggregation

Internals Physical Plans Indexes Clustered v. Unclustered Hash v. B-Tree Single v. Compound When to apply Benefit?

Internals Physical Plans Cost estimation Tuple estimation Disk I/Os Blocks and Tuples Formulae (good for your notesheet) Tuple estimation Selectivity factor Disk Scheduling Starvation Motivations

Parallel DB Can’t store all on one DB High throughput Motivations Can’t store all on one DB High throughput Speedup v. Scaleup Definitions Replication and Partitioning Shared-memory, shared-disk, shared-nothing Inter-query, inter-operator, intra-operator Block, hash, range partitioning

Parallel DB Startup costs Skew Distributed join v. Broadcast join Applications Startup costs Skew Distributed join v. Broadcast join Reshuffling Map/Reduce Framework/Model When to apply What is programmed v. handled by framework No code

Questions That’s the material Things that will be on the exam Short answer SQL Subquery Datalog Relational Algebra Cost Estimation

Questions Smaller question material Parallel DB Semi-structured data SQL++ Disk I/O DB Design

Advice Look through the exam first Try and do easiest questions first Short answer questions are worth equal amounts, varying difficulty Long exam, get easy points first Always be sure you understand the question

Advice Go through previous exams Good judgement for questions Go through HW,OQ assignments If I’ve asked you something before, I am certain that you should know how to do it Think about how null values/your assumptions impact the interpretation of the data