An Introduction to Relational Databases Prof. Yin-Fu Huang CSIE, NYUST Chapter 3.

Slides:



Advertisements
Similar presentations
Introduction to Relational Database Systems 1 Lecture 4.
Advertisements

The Relational Model and Relational Algebra Nothing is so practical as a good theory Kurt Lewin, 1945.
Chapter 3 An Introduction to Relational Databases.
The Relational Database Model
Introduction to Structured Query Language (SQL)
Database Design Presented to Molecular Biology Bioinformatics Meeting by Norbert Kremer April 29, 2002.
Chapter 6 Methodology Conceptual Databases Design Transparencies © Pearson Education Limited 1995, 2005.
Fundamentals, Design, and Implementation, 9/e Chapter 11 Managing Databases with SQL Server 2000.
Concepts of Database Management, 4th Edition, Pratt & Adamski
Chapter 3 An Introduction to Relational Databases.
Chapter 3. 2 Chapter 3 - Objectives Terminology of relational model. Terminology of relational model. How tables are used to represent data. How tables.
1 A Closer Look Chapter 2. 2 Underlying Concepts of Databases and Transaction Processing.
Concepts of Database Management Sixth Edition
Chapter 14 & 15 Conceptual & Logical Database Design Methodology
Relational Model & Relational Algebra. 2 Relational Model u Terminology of relational model. u How tables are used to represent data. u Connection between.
Chapter 3 The Relational Model Transparencies Last Updated: Pebruari 2011 By M. Arief
Project Implementation for COSC 5050 Distributed Database Applications Lab2.
Chapters 17 & 18 Physical Database Design Methodology.
Chapter 3 An Introduction to Relational Databases.
Database Technical Session By: Prof. Adarsh Patel.
Methodology - Conceptual Database Design Transparencies
Chapter One (Introduction) Objectives Introduction to Database Management Systems (DBMS) Relational Databases Model Restrictions of RD Database Life Cycle.
CODD’s 12 RULES OF RELATIONAL DATABASE
Instructor: Churee Techawut Basic Concepts of Relational Database Chapter 5 CS (204)321 Database System I.
Page 1 Topic 4 Relational Databases CPS510 Database Systems Abdolreza Abhari School of Computer Science Ryerson University.
DBSQL 3-1 Copyright © Genetic Computer School 2009 Chapter 3 Relational Database Model.
Module 3: The Relational Model.  Overview Terminology Relational Data Structure Mathematical Relations Database Relations Relational Keys Relational.
Oracle Database Administration Lecture 3  Transactions  SQL Language: Additional information  SQL Language: Analytic Functions.
Copyright © Curt Hill The Relational Model of Database Basic organization and terms.
Methodology - Conceptual Database Design. 2 Design Methodology u Structured approach that uses procedures, techniques, tools, and documentation aids to.
7 1 Chapter 7 Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Lecture2: Database Environment Prepared by L. Nouf Almujally 1 Ref. Chapter2 Lecture2.
Methodology - Conceptual Database Design
An Introduction to SQL Prof. Yin-Fu Huang CSIE, NYUST Chapter 4.
DAT602 Database Application Development Lecture 2 Review of Relational Database.
D R. E.F.C ODD ’ S R ULES FOR RDBMS Dr. E.F.Codd is an IBM researcher who first developed the relational data model in 1970.Dr. Codd published a list.
Database System Architecture Prof. Yin-Fu Huang CSIE, NYUST Chapter 2.
DATABASE MANAGEMENT SYSTEM By: YAMINI TRIPATHI. INTRODUCTION Consists - Collection of interrelated data - Set of programs to access those data Definition.
CSC271 Database Systems Lecture # 7. Summary: Previous Lecture  Relational keys  Integrity constraints  Views.
Session 1 Module 1: Introduction to Data Integrity
Relational Algebra Prof. Yin-Fu Huang CSIE, NYUST Chapter 7.
1 Intro stored procedures Declaring parameters Using in a sproc Intro to transactions Concurrency control & recovery States of transactions Desirable.
Relations Prof. Yin-Fu Huang CSIE, NYUST Chapter 6.
Types Prof. Yin-Fu Huang CSIE, NYUST Chapter 5. Advanced Database SystemYin-Fu Huang Relation, tuple, cardinality, attribute, degree, domain, primary.
10 1 Chapter 10 - A Transaction Management Database Systems: Design, Implementation, and Management, Rob and Coronel.
Integrity Prof. Yin-Fu Huang CSIE, NYUST Chapter 9.
Chapter 3: Relational Databases
Views Prof. Yin-Fu Huang CSIE, NYUST Chapter 10. Advanced Database System Yin-Fu Huang 10.1Introduction Example: Var Good_Supplier View (S Where Status.
Advanced Database System
Databases Introduction - concepts. Concepts of Relational Databases.
Chapter 1: Introduction. 1.2 Database Management System (DBMS) DBMS contains information about a particular enterprise Collection of interrelated data.
Chapter 4 The Relational Model Pearson Education © 2009.
1 Database Fundamentals Introduction to SQL. 2 SQL Overview Structured Query Language The standard for relational database management systems (RDBMS)
LECTURE TWO Introduction to Databases: Data models Relational database concepts Introduction to DDL & DML.
SQL Basics Review Reviewing what we’ve learned so far…….
Chapter 3 An Introduction to Relational Databases.
1 Section 1 - Introduction to SQL u SQL is an abbreviation for Structured Query Language. u It is generally pronounced “Sequel” u SQL is a unified language.
Chapter 2 The Big Picture. Copyright © 2005 Pearson Addison-Wesley. All rights reserved. 2-2 Databases We are particularly interested in relational databases.
Introduction to DBMS Purpose of Database Systems View of Data
Lecture 2 The Relational Model
STRUCTURE OF PRESENTATION :
Databases and Information Management
Chapter 3 The Relational Database Model
Introduction to Database Systems
Data Model.
Databases and Information Management
Introduction to DBMS Purpose of Database Systems View of Data
Chapter 11 Managing Databases with SQL Server 2000
Presentation transcript:

An Introduction to Relational Databases Prof. Yin-Fu Huang CSIE, NYUST Chapter 3

Advanced Database SystemYin-Fu Huang 3.2An Informal Look at the Relational Model Structural aspect Integrity aspect Manipulative aspect Example (See Fig. 3.1 & 3.2)  Primary key  Foreign key

Advanced Database SystemYin-Fu Huang Points from Fig. 3.2: a. the closure property of relational systems b. set-at-a-time Example (Fig. 3.2)

Advanced Database SystemYin-Fu Huang Points from Fig. 3.1: a. Tables are the logical structure, not the physical structure. b. The entire information content of the database is represented in one and only one way, namely as explicit values. Example (Fig. 3.1)

Advanced Database SystemYin-Fu Huang 3.3Relations and Relvars Relation ? ⇒ a mathematical term for a table (set theory and predicate logic) Relation model ⇒ E. F. Codd ( ) Delete Emp Where Emp#=‘E4’ (See Fig. 3.3) A relation variable vs. a relation per se

Advanced Database SystemYin-Fu Huang 3.4What Relations Mean Two parts: the heading & the body (See Fig. 3.4) Thinking about relations: a. predicate b. true proposition

Advanced Database SystemYin-Fu Huang 3.5Optimization Relational languages are often said to be nonprocedural, on the grounds that users specify what, not how. Procedurality and nonprocedurality are not absolute. Optimizer: automatic navigation (See Fig. 3.5) ⇒ an efficient way  Example: Result:=(Emp Where Emp#=‘E4’) {Salary}; a. a physical sequential scan of relvar Emp b. an index on the Emp#

Advanced Database SystemYin-Fu Huang Automatic vs. manual navigation (Fig. 3.5)

Advanced Database SystemYin-Fu Huang 3.5Optimization (Cont.) The considerations: a. Which relvars are referenced in the request b. How big those relvars currently are c. What indexes exist d. How selective those indexes are e. How the data is physically clustered on the disk f. What relational operations are involved Automatic navigation ⇒ data independence

Advanced Database SystemYin-Fu Huang 3.6The Catalog Users can interrogate the catalog in exactly the same way they interrogate their own data. Example (See Fig. 3.6) (Column Where Tabname=‘Dept’) {Colname}

Advanced Database SystemYin-Fu Huang Base relvars vs. derived relvars A view can be thought of, loosely, as a derived relvar. Example: Create View TopEmp As (Emp Where Salary > 33K) {Emp#, Ename, Salary}; The view defining expression is not evaluated but is merely “remembered” by the system in some way. ⇒ a virtual relvar A window into the base relvar Any changes: view ⇔ base relvars  Example: (TopEmp Where Salary < 42K) {Emp#, Salary} (Emp Where Salary > 33K And Salary < 42K) {Emp#, Salary} 3.7Base Relvars and Views

Advanced Database SystemYin-Fu Huang 3.8Transactions A transaction is a logical unit of work. Operations: Begin Transaction, Commit, Rollback Points arising: a. atomic b. durable c. isolated d. serializable

Advanced Database SystemYin-Fu Huang 3.9The Suppliers and Parts Database Example (See Fig. 3.8 & 3.9) Entity and Relationship (a special case of an entity)

Advanced Database SystemYin-Fu Huang The suppliers and parts database (Fig. 3.9)

Advanced Database SystemYin-Fu Huang The End.