Midterm Review. Main Topics ER model Relational model Relational Database Design (Theory)

Slides:



Advertisements
Similar presentations
Review for Final Exam Lecture Week 14. Problems on Functional Dependencies and Normal Forms.
Advertisements

Review for Final Test Indra Budi
CS4432: Database Systems II Query Operator & Algebraic Expressions 1.
1 Relational Algebra & Calculus. 2 Relational Query Languages  Query languages: Allow manipulation and retrieval of data from a database.  Relational.
E-R Diagram for a Banking Enterprise
Relational Algebra – Basis for Relational Query Languages Based on presentation by Juliana Freire.
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.
--The SQL Query Language DML--1 The SQL Query Language DML The SQL Query Language DML (SELECT)
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 6 The Relational Algebra and Relational Calculus.
Introduction to Database Systems 1 Relational Algebra Relational Model: Topic 3.
CS405G: Introduction to Database Systems Final Review.
Relational Algebra.
Midterm 1 Concepts Relational Algebra (DB4) SQL Querying and updating (DB5) Constraints and Triggers (DB11) Unified Modeling Language (DB9) Relational.
©Silberschatz, Korth and Sudarshan4.1Database System Concepts Chapter 4: SQL Basic Structure Set Operations Aggregate Functions Null Values Nested Subqueries.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 3: Introduction.
1 Relational Algebra and Calculus Chapter 4. 2 Relational Query Languages  Query languages: Allow manipulation and retrieval of data from a database.
Relational Algebra Chapter 4 CIS 458 Sungchul Hong.
CSE314 Database Systems The Relational Algebra and Relational Calculus Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson Ed Slide Set.
M Taimoor Khan Course Objectives 1) Basic Concepts 2) Tools 3) Database architecture and design 4) Flow of data (DFDs)
CS 4432query processing1 CS4432: Database Systems II Lecture #11 Professor Elke A. Rundensteiner.
1 Relational Algebra & Calculus Chapter 4, Part A (Relational Algebra)
Relational Algebra.
SE305 Database System Technology 23/10/2014 Quiz-2.
ICS 321 Spring 2011 The Database Language SQL (iii) Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 3/14/20111Lipyeow.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 6 The Relational Algebra and Relational Calculus.
Copyright © 2004 Pearson Education, Inc.. Chapter 6 The Relational Algebra and Relational Calculus.
Select Complex Queries Database Management Fundamentals LESSON 3.1b.
CSE202 Database Management Systems
More SQL: Complex Queries,
Module 2: Intro to Relational Model
Introduction to Relational Model
Relational Model By Dr.S.Sridhar, Ph.D.(JNUD), RACI(Paris, NICE), RMR(USA), RZFM(Germany)
Relational Algebra - Part 1
Chapter 3 Introduction to SQL(3)
Chapter 2: Intro to Relational Model
CS411 Database Systems 08: Midterm Review Kazuhiro Minami 1.
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.
CPSC-310 Database Systems
Relational Algebra and Relational Calculus
Chapter 2: Intro to Relational Model
Chapter 2: Intro to Relational Model
Chapter 2: Intro to Relational Model
Chapter 2: Intro to Relational Model
Database Management Systems (CS 564)
SQL Structured Query Language 11/9/2018 Introduction to Databases.
David M. Kroenke and David J
CS 405G: Introduction to Database Systems
11/12/2018.
CS405G: Introduction to Database Systems
The Relational Algebra and Relational Calculus
376a. Database Design Dept. of Computer Science Vassar College
CS 3630 Database Design and Implementation
Instructor: Mohamed Eltabakh
More SQL: Complex Queries, Triggers, Views, and Schema Modification
The Relational Model Textbook /7/2018.
SQL Fundamentals in Three Hours
CMPT 354: Database System I
Chapter 2: Intro to Relational Model
Lecture 30: Final Review Wednesday, December 6, 2000.
Chapter 2: Intro to Relational Model
CS4433 Database Systems Midterm Review.
Example of a Relation attributes (or columns) tuples (or rows)
Chapter 2: Intro to Relational Model
Chapter 2: Intro to Relational Model
Lecture 30: Final Review Wednesday, December 10, 2003.
Database Dr. Roueida Mohammed.
Relational Model B.Ramamurthy 5/28/2019 B.Ramamurthy.
Review #1 Intro stuff What is a database, 4 parts, 3 users, etc.
Chapter 4 Relational Algebra
Presentation transcript:

Midterm Review

Main Topics ER model Relational model Relational Database Design (Theory)

Symbols of ER Diagram

Symbols of ER Diagram (Cont.)

E-R Diagram of a Bank

Relational Model Relations: schema and instances Attributes: single-valued, domain, keys Set of records: no duplicates, no order Formal query languages: –Relational algebra (RA) –Tuple relational calculus (TRC) Automatic conversion between relational and ER

Relational Algebra Basic operations: –Selection (  ) –Projection (  ) –Cross-product ( x ) –Set difference ( - ) –Union (  ) –Intersection –join Ignore: Aggregate functions, outer, natural and equi-joins (all join conditions will be given)

Tuple Relational Calculus Basic operations: –Tuple Variable –Predicates, for-all, exists, x -> y –Set difference ( - ) –Union (  ) –Intersection

SQL Query Block SELECT select-clause FROM from-clause [WHERE where-clause] [ORDER BY order-by-expression] [GROUP BY group-by-attributes [HAVING condition-for-each-group]] Query blocks may be nested in FROM and WHERE May be connected using UNION, INTERSECT, and EXCEPT Questions will involve 1 level of nesting of subqueries: –Select … From … select … Where … ….AND Select ….. AND …. Select ….. No further Select within these Select statements

SQL Features Duplicates: DISTINCT. Aggregation queries (e.g., max, sum) return a single value, unless there is a group by Group by / Having –Aggregation on an attribute in SELECT returns one value for each group –All non-aggregation attributes in SELECT must appear in GROUP BY If a attribute appears in GROUP BY, it may not necessarily appear in SELECT

Relational Database Design 1NF Functional Dependences –Armstrong’s Axioms –Closure of a set of FD, Closure of an attribute set –Various kinds of keys Decomposition –3NF and BCNF –Lossless Join, FD preserving, etc.