The Relational Model
|
|
- Brett Rodgers
- 6 years ago
- Views:
Transcription
1 The Relational Model T. M. Murali August 26, 2009
2 Course Outline Weeks 1 5, 13: Query/Manipulation Languages The relational model Relational Algebra SQL Data definition Programming with SQL Weeks 6 8: Data Modelling Weeks 9 13: Relational Design Week 14 15: Students choice
3 What is a Data Model? Data model: notation for describing data or information.
4 What is a Data Model? Data model: notation for describing data or information. Structure of the data: models in databases are conceptual as opposed to physical. Operations on the data: databases data models allow limited set of queries and modifications. Constraints on the data: database data models support specifications of constraints on the data.
5 What is a Data Model? Data model: notation for describing data or information. Structure of the data: models in databases are conceptual as opposed to physical. Operations on the data: databases data models allow limited set of queries and modifications. Constraints on the data: database data models support specifications of constraints on the data. Examples of Data Models: 1. Relational data model. 2. Semi-structured data model (e.g., XML). 3. Object-relational models.
6 The Relational Model CoursesTaken Student Course Grade Hermione Grainger Potions A- Draco Malfoy Potions B Harry Potter Potions A Ron Weasley Potions C Structure: Table (like an array of structs) Operations: Relational algebra (selection, projection, conditions, etc.) Constraints: E.g., grades can be from a fixed list.
7
8 The Semi-structured Model <CoursesTaken> <Student>Hermione Grainger</Student> <Course>Potions</Course> <Grade>A-</Grade> <Student>Draco Malfoy</Student> <Course>Potions</Course> <Grade>B</Grade>... </CoursesTaken> Structure: Trees or graphs, tags define role played by different pieces of data. Operations: Follow paths in the implied tree from one element to another. Constraints: Can express limitations on data types.
9 Comparison of Models Flexibility:
10 Comparison of Models Flexibility: XML models can represent graphs.
11 Comparison of Models Flexibility: XML models can represent graphs. Limitations of relational model: 1. Simple, limited approach to structuring data. 2. Limited but useful set of operations on the data.
12 Comparison of Models Flexibility: XML models can represent graphs. Limitations of relational model: 1. Simple, limited approach to structuring data. 2. Limited but useful set of operations on the data. Ease of use: SQL enables programmer to express wishes at high level.
13 Comparison of Models Flexibility: XML models can represent graphs. Limitations of relational model: 1. Simple, limited approach to structuring data. 2. Limited but useful set of operations on the data. Ease of use: SQL enables programmer to express wishes at high level. Efficiency of access/modifications: Dramatic query optimisations possible.
14 What is the Relational Model? Built around a single concept for modelling data: the relation or table. Supports high-level programming language (SQL). Has an elegant mathematical design theory. Most current DBMS are relational.
15 The Relation A relation is a two-dimensional table: Relation table. Attribute column name. Tuple row (not the header row). Database collection of relations. CoursesTaken Student Course Grade Hermione Grainger Potions A- Draco Malfoy Potions B Harry Potter Potions A Ron Weasley Potions C
16 The Schema CoursesTaken Student Course Grade Hermione Grainger Potions A- Draco Malfoy Potions B Harry Potter Potions A Ron Weasley Potions C The schema of a relation is the name of the relation followed by a paranthetised list of attributes. CoursesTaken(Student, Course, Grade) A design in a relational model consists of a set of schemas. Such a set of schemas is called a relational database schema.
17 Equivalent Representations of a Relation CoursesTaken Student Course Grade Hermione Grainger Potions A- Draco Malfoy Potions B Harry Potter Potions A Ron Weasley Potions C A relation is a set of tuples and not a list of tuples. Order in which we present the tuples does not matter. The attributes in a schema are a set (not a list). Schema is the same irrespective of order of attributes. We specify a standard order when we introduce a schema. If we reorder attributes, we must also reorder tuples.
18 Equivalent Representations of a Relation CoursesTaken Student Course Grade Hermione Grainger Potions A- Draco Malfoy Potions B Harry Potter Potions A Ron Weasley Potions C A relation is a set of tuples and not a list of tuples. Order in which we present the tuples does not matter. The attributes in a schema are a set (not a list). Schema is the same irrespective of order of attributes. We specify a standard order when we introduce a schema. If we reorder attributes, we must also reorder tuples. How many equivalent representations are there for a relation with m attributes and n tuples?
19 Equivalent Representations of a Relation CoursesTaken Student Course Grade Hermione Grainger Potions A- Draco Malfoy Potions B Harry Potter Potions A Ron Weasley Potions C A relation is a set of tuples and not a list of tuples. Order in which we present the tuples does not matter. The attributes in a schema are a set (not a list). Schema is the same irrespective of order of attributes. We specify a standard order when we introduce a schema. If we reorder attributes, we must also reorder tuples. How many equivalent representations are there for a relation with m attributes and n tuples? m!n!.
20 Schema vs. Instance CoursesTaken Student Course Grade Hermione Grainger Potions A- Draco Malfoy Potions B Harry Potter Potions A Ron Weasley Potions C Schema of a relation rarely changes. Instance of a relation is the set of tuples in it. Relation instances can and are expected to change over time. A conventional database maintains the current instances of the relations in it.
21 Keys of Relations A set of attributes forms a key if we forbid any pair of tuples in an instance from having the same values for the attributes in the key. Indicate the attributes in the key by underlining them. CoursesTaken Student Course Grade Hermione Grainger Potions A- Draco Malfoy Potions B Harry Potter Potions A Ron Weasley Potions C
22 Keys of Relations A set of attributes forms a key if we forbid any pair of tuples in an instance from having the same values for the attributes in the key. Indicate the attributes in the key by underlining them. What is the key for CoursesTaken? CoursesTaken Student Course Grade Hermione Grainger Potions A- Draco Malfoy Potions B Harry Potter Potions A Ron Weasley Potions C
23 Keys of Relations A set of attributes forms a key if we forbid any pair of tuples in an instance from having the same values for the attributes in the key. Indicate the attributes in the key by underlining them. What is the key for CoursesTaken? Just Student if the relation stores information for only one course. CoursesTaken Student Course Grade Hermione Grainger Potions A- Draco Malfoy Potions B Harry Potter Potions A Ron Weasley Potions C
24 Keys of Relations A set of attributes forms a key if we forbid any pair of tuples in an instance from having the same values for the attributes in the key. Indicate the attributes in the key by underlining them. What is the key for CoursesTaken? Just Student if the relation stores information for only one course. The pair (Student, Course) if the relation stores information for many courses. CoursesTaken Student Course Grade Hermione Grainger Potions A- Draco Malfoy Potions B Harry Potter Potions A Ron Weasley Potions C
25 Keys of Relations A set of attributes forms a key if we forbid any pair of tuples in an instance from having the same values for the attributes in the key. Indicate the attributes in the key by underlining them. What is the key for CoursesTaken? Just Student if the relation stores information for only one course. The pair (Student, Course) if the relation stores information for many courses. If a student can take the same course many times, CoursesTaken Student Course Grade Hermione Grainger Potions A- Draco Malfoy Potions B Harry Potter Potions A Ron Weasley Potions C
26 Keys of Relations A set of attributes forms a key if we forbid any pair of tuples in an instance from having the same values for the attributes in the key. Indicate the attributes in the key by underlining them. What is the key for CoursesTaken? Just Student if the relation stores information for only one course. The pair (Student, Course) if the relation stores information for many courses. If a student can take the same course many times, add Semester and Year as attributes of the relation and include both in the key. CoursesTaken Student Course Grade Hermione Grainger Potions A- Draco Malfoy Potions B Harry Potter Potions A Ron Weasley Potions C
27 Example: Class Enrollments in a Single Semester 1. Student: a name, a unique PID, and an address. 2. Professor: a name, a unique PID, and belongs to a department. Also record the age and office of the professor. 3. Course: a name, a number, an offering department, a classroom, and an enrollment. (No CRNs.) Each department offers only one course with each number. 4. Department: a unique name, 1 chairperson. Each chairperson can be the head of at most one department. 5. At most one professor teaches each course. Each student receives a grade in each course. Each student evaluates the professor teaching the course. 6. Each course can have 0 pre-requisites, excluding itself. A student enrolled in a course must have enrolled in all its pre-requisites.
28 Relational Design for the Example Students(PID: string, Name: string, Address: string) Professors(PID: string, Name: string, Office: string, Age: integer, DepartmentName: string) Courses(Number: integer, DeptName: string, CourseName: string, Classroom: string, Enrollment: integer) Departments(Name: string, ChairmanPID: string) Take(StudentPID: string, Number: integer, DeptName: string, Grade: string, ProfessorEvaluation: integer) Teach(ProfessorPID: string, Number: string) integer, DeptName: PreReq(Number: integer, DeptName: string, PreReqNumber: integer, PreReqDeptName: string)
29 Relational Design for the Example What should the keys be? Students(PID: string, Name: string, Address: string) Professors(PID: string, Name: string, Office: string, Age: integer, DepartmentName: string) Courses(Number: integer, DeptName: string, CourseName: string, Classroom: string, Enrollment: integer) Departments(Name: string, ChairmanPID: string) Take(StudentPID: string, Number: integer, DeptName: string, Grade: string, ProfessorEvaluation: integer) Teach(ProfessorPID: string, Number: string) integer, DeptName: PreReq(Number: integer, DeptName: string, PreReqNumber: integer, PreReqDeptName: string)
30 Relational Design for the Example What should the keys be? Students(PID: string, Name: string, Address: string) Professors(PID: string, Name: string, Office: string, Age: integer, DepartmentName: string) Courses(Number: integer, DeptName: string, CourseName: string, Classroom: string, Enrollment: integer) Departments(Name: string, ChairmanPID: string) Take(StudentPID: string, Number: integer, DeptName: string, Grade: string, ProfessorEvaluation: integer) Teach(ProfessorPID: string, Number: integer, DeptName: string) PreReq(Number: integer, DeptName: string, PreReqNumber: integer, PreReqDeptName: string)
31 Issues to Consider in the Design Can we merge Courses and Teach since each course is taught by at most one professor? Do we need a separate relation to store evaluations? How can we handle pre-requisites that are or s, e.g., you can take CS 4604 if you have taken either CS 2604 or CS 2606? What should we do if more than one professor can teach the same course? How do we handle the situation when a student is allowed to re-take a course? How do we generalise this schema to handle data over more than one semester? What modifications does the schema need if more than one professor can teach a course?
CS 4604: Introduction to Database Management Systems. B. Aditya Prakash Lecture #2: The Relational Model and Relational Algebra
CS 4604: Introduction to Database Management Systems B. Aditya Prakash Lecture #2: The Relational Model and Relational Algebra Course Outline Weeks 1 4: Query/ Manipulation Languages and Data Modeling
More informationCS 5614: (Big) Data Management Systems. B. Aditya Prakash Lecture #2: The Rela0onal Model, and SQL/Rela0onal Algebra
CS 5614: (Big) Data Management Systems B. Aditya Prakash Lecture #2: The Rela0onal Model, and SQL/Rela0onal Algebra Data Model A Data Model is a nota0on for describing data or informa0on. Structure of
More informationStandard stuff. Class webpage: cs.rhodes.edu/db Textbook: get it somewhere; used is fine. Prerequisite: CS 241 Coursework:
Databases Standard stuff Class webpage: cs.rhodes.edu/db Textbook: get it somewhere; used is fine Stay up with reading! Prerequisite: CS 241 Coursework: Homework, group project, midterm, final Be prepared
More informationThe Relational Model
The Relational Model CS 317, Fall 2007 Course outline Weeks 1 7: Relational Data Models E/R models. Weeks 1 3. The relational model. Next 4 weeks. Convert E/R to relational schemas. Functional and multi
More informationIntroduction to CS 4604
Introduction to CS 4604 T. M. Murali August 23, 2010 Course Information Instructor T. M. Murali, 2160B Torgerson, 231-8534, murali@cs.vt.edu Office Hours: 9:30am 11:30am Mondays and Wednesdays Teaching
More informationRelational Model, Key Constraints
Relational Model, Key Constraints PDBM 6.1 Dr. Chris Mayfield Department of Computer Science James Madison University Jan 23, 2019 What is a data model? Notation for describing data or information Structure
More informationSQL Subqueries. T. M. Murali. September 2, T. M. Murali September 2, 2009 CS 4604: SQL Subqueries
SQL Subqueries T. M. Murali September 2, 2009 Linear Notation for Relational Algebra Relational algebra expressions can become very long. Use linear notation to store results of intemediate expressions.
More informationCS 4604: Introduction to Database Management Systems. B. Aditya Prakash Lecture #5: Entity/Relational Models---Part 1
CS 4604: Introduction to Database Management Systems B. Aditya Prakash Lecture #5: Entity/Relational Models---Part 1 E/R: NOT IN BOOK! IMPORTANT: Follow only lecture slides for this topic! Differences
More informationCS 4604: Introduc0on to Database Management Systems. B. Aditya Prakash Lecture #7: En-ty/Rela-onal Model---Part 3
CS 4604: Introduc0on to Database Management Systems B. Aditya Prakash Lecture #7: En-ty/Rela-onal Model---Part 3 Purpose of E/R Model The E/R model allows us to sketch the design of a database informally.
More informationEntity-Relationship Models: Good Design and Constraints
Entity-Relationship Models: Good Design and T. M. Murali September 29, 2010 T. M. Murali September 29, 2010 CS 4604: E/R Design and Guidelines Be faithful to the specification of the application. Avoid
More informationCS 4604: Introduc0on to Database Management Systems. B. Aditya Prakash Lecture #4: SQL---Part 2
CS 4604: Introduc0on to Database Management Systems B. Aditya Prakash Lecture #4: SQL---Part 2 Overview - detailed - SQL DML other parts: views modifications joins DDL constraints Prakash 2016 VT CS 4604
More informationCS 4604: Introduction to Database Management Systems. B. Aditya Prakash Lecture #1: Introduction
CS 4604: Introduction to Database Management Systems B. Aditya Prakash Lecture #1: Introduction Course Information Instructor B. Aditya Prakash, Torg 3160 F, badityap@cs.vt.edu Office Hours: 12noon-1pm
More informationCS 4604: Introduc0on to Database Management Systems. B. Aditya Prakash Lecture #4: Subqueries in SQL
CS 4604: Introduc0on to Database Management Systems B. Aditya Prakash Lecture #4: Subqueries in SQL Announcements Project assignment 1 due today Homework 1 released today due next Friday 2/8 SQL and RelaEonal
More informationChapter 2 Introduction to Relational Models
CMSC 461, Database Management Systems Spring 2018 Chapter 2 Introduction to Relational Models These slides are based on Database System Concepts book and slides, 6th edition, and the 2009 CMSC 461 slides
More informationText University of Bolton.
Text University of Bolton. The screen shots used in this workbook are from copyrighted licensed works and the copyright for them is most likely owned by the publishers of the content. It is believed that
More informationCS425 Fall 2016 Boris Glavic Chapter 2: Intro to Relational Model
CS425 Fall 2016 Boris Glavic Chapter 2: Intro to Relational Model Modifies from: Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Textbook: Chapter 2 2.2 Example of a Relation
More information1/24/2012. Chapter 7 Outline. Chapter 7 Outline (cont d.) CS 440: Database Management Systems
CS 440: Database Management Systems Chapter 7 Outline Using High-Level Conceptual Data Models for Database Design A Sample Database Application Entity Types, Entity Sets, Attributes, and Keys Relationship
More informationDatabase Management Systems MIT Introduction By S. Sabraz Nawaz
Database Management Systems MIT 22033 Introduction By S. Sabraz Nawaz Recommended Reading Database Management Systems 3 rd Edition, Ramakrishnan, Gehrke Murach s SQL Server 2008 for Developers Any book
More informationCS 348 Introduction to Database Management Assignment 2
CS 348 Introduction to Database Management Assignment 2 Due: 30 October 2012 9:00AM Returned: 8 November 2012 Appeal deadline: One week after return Lead TA: Jiewen Wu Submission Instructions: By the indicated
More informationAdvance Database Management System
Advance Database Management System Conceptual Design Lecture- A simplified database design process Database Requirements UoD Requirements Collection and Analysis Functional Requirements A simplified database
More informationThe Relational Model Constraints and SQL DDL
The Relational Model Constraints and SQL DDL Week 2-3 Weeks 2-3 MIE253-Consens 1 Schedule Week Date Lecture Topic 1 Jan 9 Introduction to Data Management 2 Jan 16 The Relational Model 3 Jan. 23 Constraints
More informationDatabase System Concepts and Architecture
Database System Concepts and Architecture Different Database Models: The relational database model is the most widespread and used of all the database models. In relational databases, data is stored in
More informationCS 4604: Introduc0on to Database Management Systems
CS 4604: Introduc0on to Database Management Systems B. Aditya Prakash Lecture #1: Introduc/on Based on material by Profs. T. M. Murali and Christos Faloutsos Course Informa0on Instructor B. Aditya Prakash,
More informationCS 146 Database Systems
DBMS CS 146 Database Systems Entity-Relationship (ER) Model CS 146 1 CS 146 2 A little history Progression of Database Systems In DBMS: single instance of data maintained and accessed by different users
More informationLAB 2 Notes. Conceptual Design ER. Logical DB Design (relational) Schema Refinement. Physical DD
LAB 2 Notes For students that were not present in the first lab TA Web page updated : http://www.cs.ucr.edu/~cs166/ Mailing list Signup: http://www.cs.ucr.edu/mailman/listinfo/cs166 The general idea of
More informationIntroduction to Databases, Fall 2005 IT University of Copenhagen. Lecture 2: Relations and SQL. September 5, Lecturer: Rasmus Pagh
Introduction to Databases, Fall 2005 IT University of Copenhagen Lecture 2: Relations and SQL September 5, 2005 Lecturer: Rasmus Pagh Today s lecture What, exactly, is the relational data model? What are
More informationCSIT5300: Advanced Database Systems
CSIT5300: Advanced Database Systems E11: Exercises Physical Database Design Dr. Kenneth LEUNG Department of Computer Science and Engineering The Hong Kong University of Science and Technology Hong Kong
More informationScore. 1 (10) 2 (10) 3 (8) 4 (13) 5 (9) Total (50)
Student number: Signature: UNIVERSITY OF VICTORIA Faculty of Engineering Department of Computer Science CSC 370 (Database Systems) Instructor: Daniel M. German Midterm 18 June 2003 Duration: 75 minutes
More informationCOURSE OUTLINE. School of Engineering Technology and Applied Science
COURSE OUTLINE SCHOOL: School of Engineering Technology and Applied Science DEPARTMENT: PROGRAM: COURSE TITLE: Information and Communication Engineering Technology (ICET) Computer and Communication Networking
More informationOverview of the Class and Introduction to DB schemas and queries. Lois Delcambre
Overview of the Class and Introduction to DB schemas and queries Lois Delcambre 1 CS 386/586 Introduction to Databases Instructor: Lois Delcambre lmd@cs.pdx.edu 503 725-2405 TA: TBA Office Hours: Immediately
More informationThe Relational Model. Week 2
The Relational Model Week 2 1 Relations A relation is a more concrete construction, of something we have seen before, the ER diagram. name S.S.N students street city A relation is (just!) a table! We will
More informationMichael Kifer, Arthur Bernstein, Philip M. Lewis. Solutions Manual
Michael Kifer, Arthur Bernstein, Philip M. Lewis Solutions Manual Copyright (C) 2006 by Pearson Education, Inc. For information on obtaining permission for use of material in this work, please submit a
More informationSQL DDL. CS3 Database Systems Weeks 4-5 SQL DDL Database design. Key Constraints. Inclusion Constraints
SQL DDL CS3 Database Systems Weeks 4-5 SQL DDL Database design In its simplest use, SQL s Data Definition Language (DDL) provides a name and a type for each column of a table. CREATE TABLE Hikers ( HId
More informationAnnouncements. PS 3 is out (see the usual place on the course web) Be sure to read my notes carefully Also read. Take a break around 10:15am
Announcements PS 3 is out (see the usual place on the course web) Be sure to read my notes carefully Also read SQL tutorial: http://www.w3schools.com/sql/default.asp Take a break around 10:15am 1 Databases
More informationDatabase Applications (15-415)
Database Applications (15-415) The Relational Model Lecture 3, January 18, 2015 Mohammad Hammoud Today Last Session: The entity relationship (ER) model Today s Session: ER model (Cont d): conceptual design
More information1. (a) Briefly explain the Database Design process. (b) Define these terms: Entity, Entity set, Attribute, Key. [7+8] FIRSTRANKER
Code No: R09220502 R09 Set No. 2 1. (a) Briefly explain the Database Design process. (b) Define these terms: Entity, Entity set, Attribute, Key. [7+8] 2. Explain schema refinement in Database Design? [15]
More informationSWEN-220 Mathematical Models of Software. Conceptual to Relational Mapping
SWEN-220 Mathematical Models of Software Conceptual to Relational Mapping 1 Relational (Logical) Design Logical design is where a conceptual design is mapped to a relational schema. Entry = Conceptual
More informationDatabase Management Systems,
Database Management Systems Database Design (2) 1 Topics Data Base Design Logical Design (Review) Physical Design Entity Relationship (ER) Model to Relational Model Entity Relationship Attributes Normalization
More informationCOWLEY COLLEGE & Area Vocational Technical School
COWLEY COLLEGE & Area Vocational Technical School COURSE PROCEDURE FOR Student Level: This course is open to students on the college level in either the freshman or sophomore year. Catalog Description:
More informationRelational Algebra. Mr. Prasad Sawant. MACS College. Mr.Prasad Sawant MACS College Pune
Relational Algebra Mr. Prasad Sawant MACS College Pune MACS College Relational Algebra Tuple - a collection of attributes which describe some real world entity. Attribute - a real world role played by
More informationCMPT 354: Database System I. Lecture 2. Relational Model
CMPT 354: Database System I Lecture 2. Relational Model 1 Outline An overview of data models Basics of the Relational Model Define a relational schema in SQL 2 Outline An overview of data models Basics
More information1 (10) 2 (8) 3 (12) 4 (14) 5 (6) Total (50)
Student number: Signature: UNIVERSITY OF VICTORIA Faculty of Engineering Department of Computer Science CSC 370 (Database Systems) Instructor: Daniel M. German Midterm Oct 21, 2004 Duration: 60 minutes
More informationCS 377 Database Systems
CS 377 Database Systems Relational Data Model Li Xiong Department of Mathematics and Computer Science Emory University 1 Outline Relational Model Concepts Relational Model Constraints Relational Database
More informationLAB 3 Notes. Codd proposed the relational model in 70 Main advantage of Relational Model : Simple representation (relationstables(row,
LAB 3 Notes The Relational Model Chapter 3 In the previous lab we discussed the Conceptual Database Design Phase and the ER Diagram. Today we will mainly discuss how to convert an ER model into the Relational
More informationRelational Algebra Homework 0 Due Tonight, 5pm! R & G, Chapter 4 Room Swap for Tuesday Discussion Section Homework 1 will be posted Tomorrow
Relational Algebra R & G, Chapter 4 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 power of
More informationCOMP 401 COURSE OVERVIEW
COMP 401 COURSE OVERVIEW Instructor: Prasun Dewan (FB 150, help401@cs.unc.edu) Course page: http://www.cs.unc.edu/~dewan/comp401/current/ COURSE PAGE Linked from my home page (google my name to find it)
More informationCS 582 Database Management Systems II
Review of SQL Basics SQL overview Several parts Data-definition language (DDL): insert, delete, modify schemas Data-manipulation language (DML): insert, delete, modify tuples Integrity View definition
More informationChapter 13: Query Optimization
Chapter 13: Query Optimization Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Chapter 13: Query Optimization Introduction Transformation of Relational Expressions Catalog
More informationCS 5614: (Big) Data Management Systems. B. Aditya Prakash Lecture #4: Constraints, Storing and Indexes
CS 5614: (Big) Data Management Systems B. Aditya Prakash Lecture #4: Constraints, Storing and Indexes Constraints in Rela;onal Algebra and SQL Maintaining Integrity of Data Data is dirty. How does an applica>on
More informationThe Relational Model. Suan Lee
The Relational Model Suan Lee Database Management System (DBMS) Used by all major commercial database systems Very simple model Query with high-level languages: simple yet expressive Efficient implementations
More informationSQL Retrieving Data from Multiple Tables
The Islamic University of Gaza Faculty of Engineering Dept. of Computer Engineering Database Lab (ECOM 4113) Lab 5 SQL Retrieving Data from Multiple Tables Eng. Ibraheem Lubbad An SQL JOIN clause is used
More informationRelational Database: The Relational Data Model; Operations on Database Relations
Relational Database: The Relational Data Model; Operations on Database Relations Greg Plaxton Theory in Programming Practice, Spring 2005 Department of Computer Science University of Texas at Austin Overview
More informationFunctional Dependencies
Functional Dependencies Meaning of FD s Keys and Superkeys Inferring FD s 1 Motivation Consider the relation: Students(Id, Name, AdvisorId, AdvisorName, FavouriteAdvisorId) 2 1 Motivation (2) If you know
More informationDatabases - Relations in Databases. (N Spadaccini 2010) Relations in Databases 1 / 16
Databases - Relations in Databases (N Spadaccini 2010) Relations in Databases 1 / 16 Re-capping - data model A data model is a precise, conceptual description of the data stored in a database. The relational
More informationMIT Database Management Systems Lesson 01: Introduction
MIT 22033 Database Management Systems Lesson 01: Introduction By S. Sabraz Nawaz Senior Lecturer in MIT, FMC, SEUSL Learning Outcomes At the end of the module the student will be able to: Describe the
More informationChapter 1: Introduction
Chapter 1: Introduction Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Outline The Need for Databases Data Models Relational Databases Database Design Storage Manager Query
More informationThe Relational Model. csc343, Introduction to Databases Diane Horton Fall 2014
The Relational Model csc343, Introduction to Databases Diane Horton Fall 2014 Recap The relational model is based on the concept of a relation or table. Two example relations: Teams Name Home Field Coach
More informationCS 2451 Database Systems: Relational Data Model
CS 2451 Database Systems: Relational Data Model http://www.seas.gwu.edu/~bhagiweb/cs2541 Spring 2018 Instructor: Dr. Bhagi Narahari Lead TA: Roxana Leontie TA/Grader: Malik Undergrad TA: Victoria Zheng
More informationCS 5614: (Big) Data Management Systems. B. Aditya Prakash Lecture #4: Constraints, Storing and Indexes
CS 5614: (Big) Data Management Systems B. Aditya Prakash Lecture #4: Constraints, Storing and Indexes Constraints in Rela;onal Algebra and SQL Maintaining Integrity of Data Data is dirty. How does an applica>on
More informationCS348: INTRODUCTION TO DATABASE MANAGEMENT (Winter, 2011) FINAL EXAMINATION
CS348: INTRODUCTION TO DATABASE MANAGEMENT (Winter, 2011) FINAL EXAMINATION INSTRUCTOR: Grant Weddell TIME: 150 minutes WRITE YOUR NAME AND ID HERE: NOTE 1: This is a closed book examination. For example,
More informationDatabase Design. Goal: specification of database schema Methodology:
Database Design Goal: specification of database schema Methodology: Use E-R model to get a high-level graphical view of essential components of the model and how they are related Convert E-R diagram to
More informationCS3DB3/SE4DB3/SE6M03 TUTORIAL
CS3DB3/SE4DB3/SE6M03 TUTORIAL Mei Jiang Feb 13/15, 2013 Outline Relational Algebra SQL and Relational Algebra Examples Relational Algebra Basic Operators Select: C (R) where C is a list of conditions Project:
More informationCS425 Midterm Exam Summer C 2012
Q1) List five responsibilities of a database-management system. Q2) Fill in the terms in the right hand side of the table that match the description from the list below: Instance SQL Integrity constraints
More informationCSCB20 Week 2. Introduction to Database and Web Application Programming. Anna Bretscher Winter 2017
CSCB20 Week 2 Introduction to Database and Web Application Programming Anna Bretscher Winter 2017 This Week Quick Review of terminology Relational Model Continued Relational diagrams Relational operations
More informationRelational Algebra. Spring 2012 Instructor: Hassan Khosravi
Relational Algebra Spring 2012 Instructor: Hassan Khosravi Querying relational databases Lecture given by Dr. Widom on querying Relational Models 2.2 2.1 An Overview of Data Models 2.1.1 What is a Data
More informationCS425 Fall 2016 Boris Glavic Chapter 1: Introduction
CS425 Fall 2016 Boris Glavic Chapter 1: Introduction Modified from: Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Textbook: Chapter 1 1.2 Database Management System (DBMS)
More informationThe Relational Data Model. Data Model
The Relational Data Model Davood Rafiei *Disclaimer: The slides used in the course may contain some of the slides provided by the authors of the adopted textbook (present and past) and those used in previous
More informationIntroduction to Data Management. Lecture #1 (The Course Trailer )
Introduction to Data Management Lecture #1 (The Course Trailer ) Instructor: Mike Carey mjcarey@ics.uci.edu Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Today s Topics v Welcome to
More informationCS40 Exam #2 November 14, 2001
CS40 Exam #2 November 14, 2001 Name: Except where explicitly noted, all of the questions on this exam refer to the database defined by the relational schemas given on the last page of this exam. 1. Suppose
More informationVIEW OTHER QUESTION PAPERS
VIEW OTHER QUESTION PAPERS E B4E0562 Reg No.: Name: Total Pages: 2 APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY FOURTH SEMESTER B.TECH DEGREE EXAMINATION, JULY 2017 Course Code: CS208 Course Name: PRINCIPLES
More informationAnnouncements. Relational Model & Algebra. Example. Relational data model. Example. Schema versus instance. Lecture notes
Announcements Relational Model & Algebra CPS 216 Advanced Database Systems Lecture notes Notes version (incomplete) available in the morning on the day of lecture Slides version (complete) available after
More informationInformatics 1: Data & Analysis
Informatics 1: Data & Analysis Lecture 4: From ER Diagrams to Relational Models Ian Stark School of Informatics The University of Edinburgh Friday 24 January 2014 Semester 2 Week 2 http://www.inf.ed.ac.uk/teaching/courses/inf1/da
More informationTITLE OF COURSE SYLLABUS, SEMESTER, YEAR
TITLE OF COURSE SYLLABUS, SEMESTER, YEAR Instructor Contact Information Jennifer Weller Jweller2@uncc.edu Office Hours Time/Location of Course Mon 9-11am MW 8-9:15am, BINF 105 Textbooks Needed: none required,
More informationConceptual Database Design. COSC 304 Introduction to Database Systems. Entity-Relationship Modeling. Entity-Relationship Modeling
COSC 304 Introduction to Database Systems Entity-Relationship Modeling Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca Conceptual Database Design Conceptual database design
More informationFile Operations. Working with files in Python. Files are persistent data storage. File Extensions. CS111 Computer Programming
File Operations Files are persistent data storage titanicdata.txt in PS06 Persistent vs. volatile memory. The bit as the unit of information. Persistent = data that is not dependent on a program (exists
More informationSEE THE FOLLOWING SCREEN SHOTS FOR FURTHER DATA ENTRY DETAILS. UNLESS NOTED, FIELDS SHOULD REMAIN BLANK.
Course Section Information Tab 1. From the Banner Main Menu, type SSASECT and Enter. 2. In the Key Block, enter the term [i.e. 220191 for Spring 2019] and tab. The logic for the term is number 2 (2 nd
More informationRelational Model and Relational Algebra
Relational Model and Relational Algebra CMPSCI 445 Database Systems Fall 2008 Some slide content courtesy of Zack Ives, Ramakrishnan & Gehrke, Dan Suciu, Ullman & Widom Next lectures: Querying relational
More informationMIS Database Systems Entity-Relationship Model.
MIS 335 - Database Systems Entity-Relationship Model http://www.mis.boun.edu.tr/durahim/ Ahmet Onur Durahim Learning Objectives Database Design Main concepts in the ER model? ER Diagrams Database Design
More informationCS 4604: Introduc0on to Database Management Systems. B. Aditya Prakash Lecture #1: Introduc/on
CS 4604: Introduc0on to Database Management Systems B. Aditya Prakash Lecture #1: Introduc/on Course Informa0on Instructor B. Aditya Prakash, Torg 3160 F, badityap@cs.vt.edu Office Hours: 2:30-3:30pm Mondays
More informationConceptual Modeling in ER and UML
Courses B0B36DBS, A7B36DBS: Database Systems Practical Classes 01 and 02: Conceptual Modeling in ER and UML Martin Svoboda 21. and 28. 2. 2017 Faculty of Electrical Engineering, Czech Technical University
More informationcourse 3 Levels of Database Design CSCI 403 Database Management Mines Courses ERD Attributes Entities title 9/26/2018
3 Levels of Database Design CSCI 403 Database Management 13 Database Modeling with Entity-Relationship Diagrams Conceptual (this lecture) Understand data entities & relationships between them Communication
More informationThe DBMS accepts requests for data from the application program and instructs the operating system to transfer the appropriate data.
Managing Data Data storage tool must provide the following features: Data definition (data structuring) Data entry (to add new data) Data editing (to change existing data) Querying (a means of extracting
More informationIntroduction to Database Systems
Introduction to Database Systems UVic C SC 370 Daniel M German Introduction to Database Systems (1.2.0) CSC 370 4/5/2005 14:51 p.1/27 Overview What is a DBMS? what is a relational DBMS? Why do we need
More informationComputer Science Engineering Sample Papers
See fro more Material www.computetech-dovari.blogspot.com Computer Science Engineering Sample Papers 1 The order of an internal node in a B+ tree index is the maximum number of children it can have. Suppose
More informationWhat s a database system? Review of Basic Database Concepts. Entity-relationship (E/R) diagram. Two important questions. Physical data independence
What s a database system? Review of Basic Database Concepts CPS 296.1 Topics in Database Systems According to Oxford Dictionary Database: an organized body of related information Database system, DataBase
More informationChapter 6 Formal Relational Query Languages
CMSC 461, Database Management Systems Spring 2018 Chapter 6 Formal Relational Query Languages These slides are based on Database System Concepts book and slides, 6th edition, and the 2009/2012 CMSC 461
More informationCS127 Homework #3. Due: October 11th, :59 P.M. Consider the following set of functional dependencies, F, for the schema R(A, B, C, D, E)
CS127 Homework #3 Warmup #1 Consider the following set of functional dependencies, F, for the schema R(A, B, C, D, E) 1. Find the candidate keys for the schema R. AB, C, D, and EA 2. Compute the closure,
More informationCOGS 121 HCI Programming Studio. Week 03 - Tech Lecture
COGS 121 HCI Programming Studio Week 03 - Tech Lecture Housekeeping Assignment #1 extended to Monday night 11:59pm Assignment #2 to be released on Tuesday during lecture Database Management Systems and
More informationLecture 8. Database Management and Queries
Lecture 8 Database Management and Queries Lecture 8: Outline I. Database Components II. Database Structures A. Conceptual, Logical, and Physical Components III. Non-Relational Databases A. Flat File B.
More informationInformatics 1: Data & Analysis
Informatics 1: Data & Analysis Lecture 4: From ER Diagrams to Relational Models Ian Stark School of Informatics The University of Edinburgh Friday 26 January 2018 Semester 2 Week 2 https://blog.inf.ed.ac.uk/da18
More informationWeb Science & Technologies University of Koblenz Landau, Germany. Relational Data Model
Web Science & Technologies University of Koblenz Landau, Germany Relational Data Model Overview Relational data model; Tuples and relations; Schemas and instances; Named vs. unnamed perspective; Relational
More informationDatabase Applications (15-415)
Database Applications (15-415) ER to Relational & Relational Algebra Lecture 4, January 20, 2015 Mohammad Hammoud Today Last Session: The relational model Today s Session: ER to relational Relational algebra
More informationReview The Big Picture
CS445 - Introduction to Database Management Systems Fall Semester 2015 LECTURE 6 The Entity-Relationship Model Introduction TEXTBOOK REFERENCE: CHAPTERS 2,3 R&G 1 Review The Big Picture Data Modeling Relational
More informationCS 405G: Introduction to Database Systems
CS 405G: Introduction to Database Systems Entity Relationship Model Jinze Liu 9/11/2014 1 CS685 : Special The UNIVERSITY Topics in Data of Mining, KENTUCKY UKY Review A database is a large collection of
More informationWhere Are We? Next Few Lectures. Integrity Constraints Motivation. Constraints in E/R Diagrams. Keys in E/R Diagrams
Where Are We? Introduction to Data Management CSE 344 Lecture 15: Constraints We know quite a bit about using a DBMS Start with real-world problem, design ER diagram From ER diagram to relations -> conceptual
More informationLIS 2680: Database Design and Applications
School of Information Sciences - University of Pittsburgh LIS 2680: Database Design and Applications Summer 2012 Instructor: Zhen Yue School of Information Sciences, University of Pittsburgh E-mail: zhy18@pitt.edu
More informationRelational Algebra. Relational Query Languages
Relational Algebra Davood Rafiei 1 Relational Query Languages Languages for describing queries on a relational database Three variants Relational Algebra Relational Calculus SQL Query languages v.s. programming
More informationRelational Algebra for sets Introduction to relational algebra for bags
Relational Algebra for sets Introduction to relational algebra for bags Thursday, September 27, 2012 1 1 Terminology for Relational Databases Slide repeated from Lecture 1... Account Number Owner Balance
More informationGUJARAT TECHNOLOGICAL UNIVERSITY
Seat No.: Enrolment No. GUJARAT TECHNOLOGICAL UNIVERSITY BE - SEMESTER III (NEW) - EXAMINATION SUMMER 2017 Subject Code: 21303 Date: 02/06/2017 Subject Name: Database Management Systems Time: 10:30 AM
More informationConceptual Design with ER Model
Conceptual Design with ER Model Lecture #2 1/24/2012 Jeff Ballard CS564, Spring 2014, Database Management Systems 1 See the Moodle page Due February 7 Groups of 2-3 people Pick a team name Homework 1 is
More information