CSE594: REVIEW.

Slides:



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

CS 540 Database Management Systems
1 Supplemental Notes: Practical Aspects of Transactions THIS MATERIAL IS OPTIONAL.
Manajemen Basis Data Pertemuan 7 Matakuliah: M0264/Manajemen Basis Data Tahun: 2008.
1 Physical Database Design and Tuning Module 5, Lecture 3.
1 Review #1 l Intro stuff –What is a database, 4 parts, 3 users, etc. l Architecture –Data independence –Three levels, two mappings –Jobs of the DBA.
...Looking back Why use a DBMS? How to design a database? How to query a database? How does a DBMS work?
Practical Database Design and Tuning. Outline  Practical Database Design and Tuning Physical Database Design in Relational Databases An Overview of Database.
Physical Database Design Chapter 6. Physical Design and implementation 1.Translate global logical data model for target DBMS  1.1Design base relations.
Query Processing. Steps in Query Processing Validate and translate the query –Good syntax. –All referenced relations exist. –Translate the SQL to relational.
1 CS 430 Database Theory Winter 2005 Lecture 16: Inside a DBMS.
Introduction.  Administration  Simple DBMS  CMPT 454 Topics John Edgar2.
1 CSE444: REVIEW. 2 CSE444 in one slide v Logical : E/R diagram  normalized relations v Physical : files, buffering, and indexes v Logical : Relational.
File Processing : Query Processing 2008, Spring Pusan National University Ki-Joune Li.
Database Applications (15-415) DBMS Internals- Part IX Lecture 20, March 31, 2016 Mohammad Hammoud.
1 CS122A: Introduction to Data Management Lecture #15: Physical DB Design Instructor: Chen Li.
CS222: Principles of Data Management Lecture #4 Catalogs, Buffer Manager, File Organizations Instructor: Chen Li.
Practical Database Design and Tuning
Diskusi-08 Jelaskan dan berikan contoh penggunaan theta join, equijoin, natural join, outer join, dan semijoin The slides for this text are organized into.
Introduction to the database systems (1)
Record Storage, File Organization, and Indexes
CS 540 Database Management Systems
DBMS Questions and Answers.
Crash Recovery The slides for this text are organized into chapters. This lecture covers Chapter 20. Chapter 1: Introduction to Database Systems Chapter.
CS422 Principles of Database Systems Course Overview
Database Management System
MODELS OF DATABASE AND DATABASE DESIGN
Tree-Structured Indexes
Storage and Indexes Chapter 8 & 9
Indexing ? Why ? Need to locate the actual records on disk without having to read the entire table into memory.
Database Applications (15-415) DBMS Internals- Part XIII Lecture 22, November 15, 2016 Mohammad Hammoud.
DBMS QUESTIONS AND ANSWERS
Concurrency Control More !
Introduction to Query Optimization
The Entity-Relationship Model
Transaction Management
Translation of ER-diagram into Relational Schema
Evaluation of Relational Operations: Other Operations
Examples of Physical Query Plan Alternatives
The Entity-Relationship Model
File Processing : Query Processing
Crash Recovery The slides for this text are organized into chapters. This lecture covers Chapter 20. Chapter 1: Introduction to Database Systems Chapter.
Database management concepts
Lecture 12 Lecture 12: Indexing.
Faloutsos/Pavlo C. Faloutsos – A. Pavlo Lecture#27: Final Review
Crash Recovery, Part 2 R&G - Chapter 18
Transaction Management
Cse 344 APRIL 23RD – Indexing.
B+-Trees and Static Hashing
File Organizations and Indexing
File Organizations and Indexing
Practical Database Design and Tuning
Crash Recovery The slides for this text are organized into chapters. This lecture covers Chapter 20. Chapter 1: Introduction to Database Systems Chapter.
Selected Topics: External Sorting, Join Algorithms, …
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
B+Trees The slides for this text are organized into chapters. This lecture covers Chapter 9. Chapter 1: Introduction to Database Systems Chapter 2: The.
Final Review Topics Chapter 4 SQL,
Physical Design and Tuning Example
Final Review Datalog (Ch 10) Rules and queries
Database management concepts
Evaluation of Relational Operations: Other Techniques
Database Systems (資料庫系統)
Tree-Structured Indexes
Introduction to Database Systems CSE 444 Lecture 23: Final Review
Final Review Friday, December 8, 2006.
Review #1 Intro stuff What is a database, 4 parts, 3 users, etc.
Evaluation of Relational Operations: Other Techniques
Physical Database Design
File Organizations and Indexing
Presentation transcript:

CSE594: REVIEW

CSE594 in one slide Logical: E/R diagramnormalized relations Physical: files, buffering, and indexes Logical: Relational algebra and SQL Physical: join methods, optimization Logical and physical: DBA designs, tunes CC/R choices affect correctness, performance Object Databases extend, improve relations … OODBMS, ORDBMS are converging? … OQL, SQL3 are converging?

The E/R model Entities vs. relationships Attributes for entities and relationships Keys and weak entities Cardinality constraints Participation (key) constraints Translation to relations: Entity becomes relation Relationship becomes relation iff it is many-many Other relationships: key of “parent” goes with “child”

FDs and Normal Forms Determine Candidate Keys (CKs) A field is prime iff it is in some CK 1NF: All relations are in 1NF 2NF: No FDs XA where X  some CK and A is non-prime 3NF: For each FD XA: X is a superkey OR A is prime OR A X (trivial) BCNF: For each FD XA: X is a superkey OR A X (trivial) Normalize by decomposing R (ABC) to R1(AB) and R2 (BC), where BC violates a NF

Physical DB Design File organizations: heapfile, sorted file, hashed file Disks: speed and physical characteristics Buffer pool can vary in size; frame holds page Replacement policy choice is important Indexes can speed up data access: Clustered vs. unclustered Primary vs. secondary Dense vs. sparse B+ Trees are the most common: log(N) searches

Queries: Logical Aspects Relational Algebra , , , ,  Joins kind of important too!!! General join Equijoin Natural join Transformations for optimization SQL Declarative Relational calculus + algebra + grouping, etc. Computationally incomplete Query execution: relational algebra operations

Queries: Physical Aspects Implementation of relational algebra File scan vs. index lookup vs. binary search Exact-match vs. range queries Impact of clustered vs. non-clustered indices Join methods: Tuple-oriented nested loops (dumb idea) Page-oriented nested loops (decent idea) Block-oriented nested loops (better idea, if buffers avail.) Query optimization: cost estimates hard!!! Large space of physical, logical alternatives Prune space by considering only left-deep plans Enables pipelined execution

Tuning Ongoing task of DBA: Monitor performance Adjust physical schema as necessary (indices, clusters, etc.) Physical data independence is preserved!! Adjust logical schema as necessary Hide changes using views Maintain integrity constraints using triggers, etc. Logical data independence is preserved!!

Concurrency Control and Recovery ACID transactions enforce CC&R Strict 2PL guarantees serializability (C, I) Deadlocks possible (detect and abort a XACT) Phantom tuples possible (fix with index locking) ARIES guarantees XACTS are A, D Write-ahead logging Log UNDO actions to allow complete replaying of history Recovery phases: Analyze (rebuild main memory) REDO (rebuild disks) UNDO (abort incomplete XACTS)

Object Databases ORDBMS (e.g. Oracle 8i) vs. OODBMS (e.g. O2) Structural aspects Collection-valued fields OIDs Freely composable type constructors Behavioral aspects (methods) Adds new dimensions to RDBMS problems SQL3, OQL standards are emerging