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.

Slides:



Advertisements
Similar presentations
What is a Database By: Cristian Dubon.
Advertisements

Relational Algebra, Join and QBE Yong Choi School of Business CSUB, Bakersfield.
Review Indra Budi Fakultas Ilmu Komputer UI 2 Database Introduction Database vs File Processing Main purpose of database Database Actors.
Review for Final Test Indra Budi
Foundations of Relational Implementation n Defining Relational Data n Relational Data Manipulation n Relational Algebra.
Review Session ER and Relational –ER  Relational –Constraints, Weak Entities, Aggregation, ISA Relational Algebra  Relational Calculus –Selections/Projections/Joins/Division.
Introduction to Database Systems 1 SQL: The Query Language Relation Model : Topic 4.
1 Lecture 11: Basic SQL, Integrity constraints
SQL: Queries, Constraints, Triggers
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 SQL: Queries, Constraints, Triggers Chapter 5.
Database Management Systems 1 Raghu Ramakrishnan SQL: Queries, Programming, Triggers Chpt 5.
Database Management Systems, R. Ramakrishnan and J. Gehrke1 SQL: Queries, Programming, Triggers Chapter 5.
By relieving the brain of all unnecessary work, a good notation sets it free to concentrate on more advanced problems, and, in effect, increases the mental.
By relieving the brain of all unnecessary work, a good notation sets it free to concentrate on more advanced problems, and, in effect, increases the mental.
1 SQL: Structured Query Language (‘Sequel’) Chapter 5.
SQL 2 – The Sequel R&G, Chapter 5 Lecture 10. Administrivia Homework 2 assignment now available –Due a week from Sunday Midterm exam will be evening of.
FALL 2004CENG 351 File Structures and Data Management1 SQL: Structured Query Language Chapter 5.
Rutgers University SQL: Queries, Constraints, Triggers 198:541 Rutgers University.
ACS-4902 Ron McFadyen Chapter 15 Algorithms for Query Processing and Optimization.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 SQL: Queries, Constraints, Triggers Chapter 5.
Relational Algebra Chapter 4 - part I. 2 Relational Query Languages  Query languages: Allow manipulation and retrieval of data from a database.  Relational.
CS405G: Introduction to Database Systems Final Review.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
By relieving the brain of all unnecessary work, a good notation sets it free to concentrate on more advanced problems, and, in effect, increases the mental.
...Looking back Why use a DBMS? How to design a database? How to query a database? How does a DBMS work?
CSC343 – Introduction to Databases - A. Vaisman1 SQL: Queries, Programming, Triggers.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
1 Relational Algebra and Calculus Chapter 4. 2 Relational Query Languages  Query languages: Allow manipulation and retrieval of data from a database.
CS609 Introduction. Databases Current state? Future?
Database Technical Session By: Prof. Adarsh Patel.
Physical Database Design Chapter 6. Physical Design and implementation 1.Translate global logical data model for target DBMS  1.1Design base relations.
CSC 411/511: DBMS Design Dr. Nan WangCSC411_L6_SQL(1) 1 SQL: Queries, Constraints, Triggers Chapter 5 – Part 1.
Lecture 05 Structured Query Language. 2 Father of Relational Model Edgar F. Codd ( ) PhD from U. of Michigan, Ann Arbor Received Turing Award.
1 Relational Algebra. 2 Relational Query Languages v Query languages: Allow manipulation and retrieval of data from a database. v Relational model supports.
Unit 5/COMP3300/ SQL: Queries, Programming, Triggers Chapter 5.
SQL: Queries, Programming, Triggers. Example Instances We will use these instances of the Sailors and Reserves relations in our examples. If the key for.
FEN Introduction to the database field:  The Relational Model Seminar: Introduction to relational databases.
1.1 CAS CS 460/660 Introduction to Database Systems Relational Algebra.
Introduction to SQL ; Christoph F. Eick & R. Ramakrishnan and J. Gehrke 1 Using SQL as a Query Language COSC 6340.
Database Management Systems, R. Ramakrishnan1 Relational Algebra Module 3, Lecture 1.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 SQL: Queries, Constraints, Triggers Chapter 5.
Physical Database Design Purpose- translate the logical description of data into the technical specifications for storing and retrieving data Goal - create.
CMPT 258 Database Systems Relational Algebra (Chapter 4)
1 SQL: Queries, Constraints, Triggers Chapter 5. 2 Overview: Features of SQL  Data definition language: used to create, destroy, and modify tables and.
1 Databases II (Fall 2009) Professor: Iluju Kiringa SITE 5072.
Mining real world data RDBMS and SQL. Index RDBMS introduction SQL (Structured Query language)
Relational Algebra p BIT DBMS II.
1 SQL: The Query Language (Part II). 2 Expressions and Strings v Illustrates use of arithmetic expressions and string pattern matching: Find triples (of.
1 SQL: Structured Query Language (‘Sequel’) Chapter 5.
Query Processing – Implementing Set Operations and Joins Chap. 19.
SQL: The Query Language Part 1 R &G - Chapter 5 The important thing is not to stop questioning. Albert Einstein.
1 SQL: The Query Language. 2 Example Instances R1 S1 S2 v We will use these instances of the Sailors and Reserves relations in our examples. v If the.
Chapter 3: Relational Databases
Alon Levy 1 Relational Operations v We will consider how to implement: – Selection ( ) Selects a subset of rows from relation. – Projection ( ) Deletes.
SQL CS 186, Spring 2007, Lecture 7 R&G, Chapter 5 Mary Roth   The important thing is not to stop questioning. Albert Einstein Life is just a bowl of.
SQL: The Query Language Part 1 R&G - Chapter 5 1.
1 CS122A: Introduction to Data Management Lecture 9 SQL II: Nested Queries, Aggregation, Grouping Instructor: Chen Li.
COP Introduction to Database Structures
Query-by-Example (QBE)
Introduction to Query Optimization
Relational Algebra Chapter 4, Part A
Database Applications (15-415) SQL-Part II Lecture 9, February 04, 2018 Mohammad Hammoud.
Relational Operations
Physical Database Design
SQL: The Query Language Part 1
Relational Algebra Chapter 4, Sections 4.1 – 4.2
Database systems Lecture 3 – SQL + CRUD
Data Model.
Evaluation of Relational Operations: Other Techniques
Presentation transcript:

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 Calculus 7.SQL 8.Sorting & Joining 9.Optimizing Queries 10.SQL II 11.The ER Model 12.ER -> Relational 13.Functional Dependencies 14.Normalization

By Topic Introduction – what are databases for? (1) Relational Topics –The Relational Model – basic SQL, Keys, ICs (1) –Relational Algebra (1) –Relational Calculus (1) –SQL (2) –The ER Model (2) –Functional Dependenciesand Normalization (2) Database Internals –Storing Data: Disks and Files (1) –File Organization and Indexes (1) –External Sorting and Join Algorithms (1) –Query Optimization (1)

Introduction – what are databases for? (1) Definitions of database, DBMS Useful properties of database systems –A.C.I.D. –Data Modelling –Querying –Levels of Abstraction Comparing Database Systems to... –WWW –File Systems –Data Processing Programs

The Relational Model (1) Tables: Rows and Columns Basic SQL Keys ICs Referential Integrity

Relational Algebra (1) Somewhat Procedural Query Language Basic Ops: –Selection (  ) Selects a subset of rows from relation (horizontal). –Projection (  ) Retains only wanted columns from relation (vertical). –Cross-product (  ) Allows us to combine two relations. –Set-difference ( — ) Tuples in r1, but not in r2. –Union (  ) Tuples in r1 and/or in r2. Other ops: Intersection (  ) Join ( ) – merge 2 tables based on common columns Division ( / ) – used in “for all” queries

Relational Calculus (1) Formal logic as declarative Query Language {S | S  Sailors  S.rating > 7   R(R  Reserves  R.sid = S.sid  R.bid = 103)} Concentrated on Tuple Relational Calculus Also talked about Domain Relational Calculus

SQL (2) Data Definition Language (DDL) Data Manipulation Language (DML) –Range variables in Select clause –Expressions in Select, Where clauses –Set operators between queries: Union, Intersect, Except/Minus –Set operators in nested queries: In, Exists, Unique, Any, All –Aggregates: Count, Sum, Avg, Min, Max –Group By –Group By/Having Other Features Insert Delete Update Null Values – Outer Joins Views Order By Access Control Integrity Constraints

The ER Model (2) A Visual Language for Modelling the Real World Entities, Relationships, Attributes

Functional Dependencies and Normalization (2) We’ve just talked about this

Storing Data: Disks and Files (1) Laying out fields in records in pages in files Buffer Management

File Organization and Indexes (1) Heap File vs Sorted File vs B-Tree Index vs Hash Index What are advantages, disadvantages of each?

External Sorting and Join Algorithms (1) External Sorting –Sort a file of any size using only 3 pages of memory –Understand optimizations with more memory Join Algorithms –Nested Loops –Indexed Nested Loops –Sort-Merge Join –Hash Join –What are tradeoffs for different algorithms

Query Optimization Query Plans – trees of operations How to change plan to find more efficient one