Heysem KAYA / Boğaziçi University. On Relations A binary relation from A to B: α is subset of A x B Let A 1, A 2, …, A n be sets. An n-ary relation on.

Slides:



Advertisements
Similar presentations
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification.
Advertisements

XML: Extensible Markup Language
Copyright © 2004 Pearson Education, Inc.. Chapter 15 Algorithms for Query Processing and Optimization.
Chapter 3 : Relational Model
D ATABASE S YSTEMS I R ELATIONAL A LGEBRA. 22 R ELATIONAL Q UERY L ANGUAGES Query languages (QL): Allow manipulation and retrieval of data from a database.
Relational Schemas and Predicate Logic: Notation.
Foundations of Relational Implementation n Defining Relational Data n Relational Data Manipulation n Relational Algebra.
Relational Algebra 1 Chapter 5.1 V3.0 Napier University Dr Gordon Russell.
CMPT 354, Simon Fraser University, Fall 2008, Martin Ester 28 Database Systems I The Relational Data Model.
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.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3 The Basic (Flat) Relational Model.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 8 The Enhanced Entity- Relationship (EER) Model.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Conceptual Data Modeling Using Entities and Relationships.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 6 The Relational Algebra and Relational Calculus.
Sunday, June 28, Entity-Relationship and Enhanced Entity-Relationship Conceptual Data Models (Chapters 6 & Section 7.1)
Copyright © 2004 Pearson Education, Inc.. Chapter 8 SQL-99: Schema Definition, Basic Constraints, and Queries.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Overview of Database Languages and Architectures.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 8 The Enhanced Entity- Relationship (EER) Model.
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 8: Relations Relations(8.1) n-any Relations &
Concepts of Database Management, Fifth Edition
Information storage: Introduction of database 10/7/2004 Xiangming Mu.
The Relational Model. Review Why use a DBMS? OS provides RAM and disk.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3 The Relational Data Model and Relational Database Constraints.
Chapter 21 B Mapping to ODL Copyright © 2004 Pearson Education, Inc.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
April 10, 2002Applied Discrete Mathematics Week 10: Relations 1 Counting Relations Example: How many different reflexive relations can be defined on a.
DBSQL 3-1 Copyright © Genetic Computer School 2009 Chapter 3 Relational Database Model.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 6 The Relational Algebra and Calculus.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 6 The Relational Algebra.
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)
1 Chapter 1 Introduction. 2 Introduction n Definition A database management system (DBMS) is a general-purpose software system that facilitates the process.
1.1 CAS CS 460/660 Relational Model. 1.2 Review E/R Model: Entities, relationships, attributes Cardinalities: 1:1, 1:n, m:1, m:n Keys: superkeys, candidate.
Database Concepts. Data :Collection of facts in raw form. Information : Organized and Processed data is information. Database : A Collection of data files.
Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
ICS 321 Fall 2011 The Relational Model of Data (i) Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 8/29/20111Lipyeow.
Chapter 7: Relations Relations(7.1) Relations(7.1) n-any Relations & their Applications (7.2) n-any Relations & their Applications (7.2)
Copyright © 2004 Pearson Education, Inc.. Chapter 21 Object Database Standards, Languages, and Design.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Chapter 9 Databases Objectives Understand a DBMS and define its components. Understand the architecture of a DBMS and its levels. Distinguish between.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture Presented & Modified.
Chapter 6 The Relational Algebra Copyright © 2004 Ramez Elmasri and Shamkant Navathe.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 6- 1.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 6 Part a The Relational Algebra and Relational Calculus Hours 1,2.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 6 The Relational Algebra and Relational Calculus.
Al-Maarefa College for Science and Technology INFO 232: Database systems Chapter 3 “part 2” The Relational Algebra and Calculus Instructor Ms. Arwa Binsaleh.
CSE314 Database Systems Lecture 3 The Relational Data Model and Relational Database Constraints Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson.
Presented By: Miss N. Nembhard. Relation Algebra Relational Algebra is : the formal description of how a relational database operates the mathematics.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Copyright © 2004 Pearson Education, Inc.. Chapter 6 The Relational Algebra and Relational Calculus.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Chapter 12 Outline Overview of Object Database Concepts Object-Relational Features Object Database.
LECTURE TWO Introduction to Databases: Data models Relational database concepts Introduction to DDL & DML.
1 The Relational Data Model David J. Stucki. Relational Model Concepts 2 Fundamental concept: the relation  The Relational Model represents an entire.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 6 The Relational Algebra and Relational Calculus تنبيه : شرائح العرض.
Chapter 10 Functional Dependencies and Normalization for Relational Databases Copyright © 2004 Pearson Education, Inc.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3 The Relational Data Model and Relational Database Constraints تنبيه.
Fundamental of Database Systems
CSE202 Database Management Systems
Entity- Relationship (ER) Model
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
Discrete Structures for Computer Science
DATABASE SYSTEM.
Databases.
Data Model.
Relational Model B.Ramamurthy 5/28/2019 B.Ramamurthy.
Unit Relational Algebra 1
Presentation transcript:

Heysem KAYA / Boğaziçi University

On Relations A binary relation from A to B: α is subset of A x B Let A 1, A 2, …, A n be sets. An n-ary relation on these sets is a subset of A 1 x A 2 x … x A n where the sets are called the domains and n is called its degree / arity. Relational Data Model utilizes relational algebra and relational calculus Relational Algebra defines basic definitions for relational model. The results of these operations are always a relation. Relational Calculus provides a higher level declarative notation for specifying relational queries.

On Databases A database (DB) is a large set of interrelated data. A DBMS is a system software used in accessing the DB in a secure, efficient and convinient manner. Data Model is a collection of concepts used in describing the structure of a database (+ operations) Other than Relational Data Model we have Network, Hierarchical, Object Oriented, and XML Models. Basic DB Operations are insertion, deletion, modification and retrieval. DB model is abstraction used in interpreting data

More on DB Entity represents real world objects such as student, teacher, project, course etc. Referred as tuple in RM. An attribute is a property of interest that further describes an entity, such as student’s name or GPA. Relationship is an association among two or more entities. Ex. student enrollment in a course. This also corresponds to a tuple in RM. Due to its representation a relation is also referred as a table in RM.

Relation Examples St_IDNameAgeDep A21CMPE B22CMPE D21CET A21CMPE C_IDNameDep CMPE150Introduction to Programming CMPE MATH101Calculus IMATH CMPE220Discrete Comp. Structures CMPE St_IDC_IDSem CMPE / CMPE / MATH /2 Student Relation Student Course Enrollment Relation An attribute Course Relation A tuple

Basic Relational Operations Projection: projects a relation of arity n to arity m by selection specified attributes Denoted: Π (R), Ex: Π (Student) Selection: Selects tuples from R which makes well formed formula f true Denoted: σ f (R), Ex: σ (Student) Union, Intersection, Set Difference and Certesian Product the same definition as in sets Join : R |X| S = σ (R x S) Condition is a comparison operator (=, etc) between an attribute in R and an attribute in S

That’s all for now Thanks for your attention! İlginiz için teşekkürler! References Kenneth H. Rosen. Discrete Mathematics and Its Applicatons. McGraw-Hill, 6 th edition, Ramez Elmasri, Shamkant B. Navathe. Fundemantals of Database Systems, Pearson, 5 th edition, 2007