N-ary Relations & Their Applications. 2 n-ary Relations 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.

Slides:



Advertisements
Similar presentations
IS698: Database Management Min Song IS NJIT. The Relational Data Model.
Advertisements

Relational Model Table = relation. Column headers = attributes. Row = tuple Beers Relation schema = name(attributes) + other structure info., e.g., keys,
Chapter 3 : Relational Model
Relational Algebra Dashiell Fryer. What is Relational Algebra? Relational algebra is a procedural query language. Relational algebra is a procedural query.
CS2210(22C:19) Discrete Structures Relations Spring 2015 Sukumar Ghosh.
Relations The Relational Data Model John Sieg, UMass Lowell.
Information Resources Management February 13, 2001.
Module #1 - Logic 1 Based on Rosen, Discrete Mathematics & Its Applications. Prepared by (c) , Michael P. Frank and Modified By Mingwu Chen Relations.
Database Architecture The Relational Database Model.
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 8: Relations Relations(8.1) n-any Relations &
Relational Model & Relational Algebra. 2 Relational Model u Terminology of relational model. u How tables are used to represent data. u Connection between.
Chapter 4 The Relational Model Pearson Education © 2014.
Relational Model Session 6 Course Name: Database System Year : 2012.
Chapter 3 The Relational Model Transparencies Last Updated: Pebruari 2011 By M. Arief
8.2 n-ary Relations and Their Applications
April 10, 2002Applied Discrete Mathematics Week 10: Relations 1 Counting Relations Example: How many different reflexive relations can be defined on a.
RELATIONAL ALGEBRA Relational Database Handout - 3.
DBSQL 3-1 Copyright © Genetic Computer School 2009 Chapter 3 Relational Database Model.
Chapter 2 Adapted from Silberschatz, et al. CHECK SLIDE 16.
Discrete Maths Objective to introduce relations, show their connection to sets, and their use in databases , Semester 2, Relations.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 6 The Relational Algebra.
ICOM 6005 – Database Management Systems Design Dr. Manuel Rodríguez Martínez Electrical and Computer Engineering Department Lecture 2 – Relational Model.
MIS 3053 Database Design & Applications The University of Tulsa Professor: Akhilesh Bajaj RM/SQL Lecture 1 ©Akhilesh Bajaj, 2000, 2002, 2003, All.
ICOM 5016 – Introduction to Database Systems Lecture 5b Dr. Manuel Rodriguez Department of Electrical and Computer Engineering University of Puerto Rico,
CIS552Relational Model1 Structure of Relational Database Relational Algebra Extended Relational-Algebra-Operations Modification of the Database.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com ICOM 5016 – Introduction.
Database Concepts. Data :Collection of facts in raw form. Information : Organized and Processed data is information. Database : A Collection of data files.
03 May 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
Chapter 7: Relations Relations(7.1) Relations(7.1) n-any Relations & their Applications (7.2) n-any Relations & their Applications (7.2)
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 2: Intro to Relational.
Computing & Information Sciences Kansas State University Friday, 26 Jan 2008CIS 560: Database System Concepts Lecture 2 of 42 Friday, 29 August 2008 William.
Announcements Reading for Monday –4.6 Homework 3 – Due 9/29.
Chapter 2 Introduction to Relational Model. Example of a Relation attributes (or columns) tuples (or rows) Introduction to Relational Model 2.
Chapter 2: Intro to Relational Model. 2.2 Example of a Relation attributes (or columns) tuples (or rows)
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 2: Introduction.
Relations. Important Definitions We covered all of these definitions on the board on Monday, November 7 th. Definition 1 Definition 2 Definition 3 Definition.
Copyright, Harris Corporation & Ophir Frieder, Relational Definitions.
Presented By: Miss N. Nembhard. Relation Algebra Relational Algebra is : the formal description of how a relational database operates the mathematics.
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Relations, Functions.
Jennifer Widom Relational Databases The Relational Model.
Howard Paul. Sequential Access Index Files and Data File Random Access.
The Relational Model © Pearson Education Limited 1995, 2005 Bayu Adhi Tama, M.T.I.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 2: Intro to Relational.
Chapter 3 The Relational Model. Objectives u Terminology of relational model. u How tables are used to represent data. u Connection between mathematical.
INFORMATION TECHNOLOGY DATABASE MANAGEMENT. A database is a collection of information organized to provide efficient retrieval. The collected information.
IT 5433 LM3 Relational Data Model. Learning Objectives: List the 5 properties of relations List the properties of a candidate key, primary key and foreign.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 2: Intro to Relational.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts - 6 th Edition Chapter 8: Relational Algebra.
Module 2: Intro to Relational Model
Relational Model By Dr.S.Sridhar, Ph.D.(JNUD), RACI(Paris, NICE), RMR(USA), RZFM(Germany)
Chapter 2: Relational Model
Chapter 2: Intro to Relational Model
CSE 504 Discrete Structures & Foundations of Computer Science
Chapter 3: Intro to Relational Model
Chapter 2: Intro to Relational Model
Chapter 2: Intro to Relational Model
Chapter 2: Intro to Relational Model
Chapter 2: Intro to Relational Model
Discrete Math (2) Haiming Chen Associate Professor, PhD
Discrete Structures for Computer Science
Data Base System Lecture 6: Relational Model
Relational Databases The Relational Model.
Relational Databases The Relational Model.
Chapter 2: Intro to Relational Model
Chapter 2: Intro to Relational Model
Chapter 2: Intro to Relational Model
Example of a Relation attributes (or columns) tuples (or rows)
Chapter 2: Intro to Relational Model
Chapter 2: Intro to Relational Model
Database.
Presentation transcript:

n-ary Relations & Their Applications

2 n-ary Relations 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. The A i are called the relation’s domains.

3 Example: Teaching Assignments ProfessorDepartmentCourse Number CruzZoology335 CruzZoology412 FarberPsychology501 FarberPsychology617 GrammarPhysics544 GrammarPhysics551 RosenComputer Science 518 RosenMathematics575

4 Relational Databases A relational database models a database as a relation. The relation’s domains are called its attributes. The relation’s primary key is an attribute whose value uniquely determines an element in the relation. –It is the domain of a function whose co-domain is the Cartesian product of the other domains. –In general, a primary key may consist of > 1 attribute. –What single attribute could serve as the primary key in the Teaching Assignment table?

5 Operations on n-ary Relations A selection operator defines a subset of R whose elements satisfy some the truth set of a predicate function Let the universe be the set of rows in the Teaching Assignment table (relation). Let –P( x ) mean “the professor = x” –D( x ) mean “the department = x” The Select statement below returns a set of rows or tuples { rows | P( Rosen)  D( Zoology ) }: Select Professor = “Rosen” or Department = “Zoology” selects 4 elements from Teaching Assignments.

6 To be continued