In mathematical terms, the relation itself can be expressed simply in terms of the attributes it contains:
|
|
- Magnus Walsh
- 6 years ago
- Views:
Transcription
1 The Relational Model The relational data model organises data as 2-dimensional tables or relations. An example of one such relation would be STUDENT shown below. As we have seen in the wine list example, tables (relations) hold information in rows that can be updated, added to or deleted. RELATION: STUDENT ID Surname Sex Birth_Place Date_of_Birth P1 Smith Male Dublin P2 Jones Female Galway P3 Malone Male Mayo Terminology In everyday terms, the table STUDENT contains five columns and three rows (or entries). However, in relational theory, the terminology has been formalised and is based on the relation s mathematical structure. Therefore, the rows of a relation are known as tuples while the columns are the attributes of the relation. Each tuple of a relation holds individual pieces of information for each of the attributes specified. For example, the value of the Surname attribute in the first tuple is Smith. In mathematical terms, the relation itself can be expressed simply in terms of the attributes it contains: STUDENT (ID, Surname, Sex, Birth_Place, Date_of_Birth) We call a relation with specific sample data, for example the table above, an instance of the relation. Note that different terminology can be used in books for attributes, tuples and relations (as table below). We will use the mathematical terminology in these notes. Mathematical terminology In database manuals In some books Relation Table Table Attribute Field Column Tuple Record Row Database Systems (EE221) - Page 10
2 A database can be made up of more than one relation. In order to be able to locate information in the database, each relation must have a unique name (to differentiate between relations); as must each attribute of a relation (no two attributes may have the same name within one relation but there is no restriction on having the same attribute name in two different relations). Domains Let us now consider the characteristics of an attribute s values. Such values come from domains, and the domain for an attribute defines the valid values of that attribute. Domains are a more abstract concept than types or sorts in programming languages - two sets of values can be of the same type but of a different domain. For example, in the STUDENT relation, Surname and Birth_Place are both character strings, but they come from different domains, because they signify different things - Surname is from the domain of all valid surnames, while Birth_Place comes from the domain of all valid locations. Note that, it is permitted for multiple attributes within a relation to hold values from the same domain. For example, if we wished to add an attribute to STUDENT with the name of the next-of-kin, this attribute could also come from the NAME domain. It is also possible for attribute values themselves to be relations, in which case, the attribute domains are instances of that relation. In the relation LIVED-IN, the attribute Residence is in itself, a relation. The attributes of Residence are City and Date-Moved-In. The domain of the attribute Residence is a combination of the domains of its attributes. However, we will see later that using such multi-valued attributes is considered bad practice, and in fact disallowed in most relational theories. RELATION: LIVED-IN Person Residence Martha City Date-Moved-In New York Boston Jack City Date-Moved-In Boston Philadelphia Database Systems (EE221) - Page 11
3 Summary of Properties of Relational Tables Relational tables have the following properties: 1. Different relations (tables) must have unique names 2. Each tuple (row) in a relation is unique 3. Each attribute (column) in a relation must have a unique name 4. The order of attributes in a relation is not significant 5. The order of tuples in a relational table is not significant 6. All values of an attribute are from the same domain 7. Values of attributes are atomic (for most relational theories) Keys of Relations The notion of a key is fundamental to relational theory. A key of a relation is a set of one or more attributes that uniquely identify tuples in the relation. That is, given any possible value of the key, at most there will be one tuple in the relation with a matching value of the key attributes. This property is called the uniqueness property of relation keys. For example, in the STUDENT relation, ID is a key to the relation. STUDENT (ID, Surname, Sex, Birth_Place, Date_of_Birth) Note that a relation can (and normally does) have more than one key. Some more terminology A key, as we have defined it above, is normally termed a superkey defined as: a set of attributes whose values identify a unique tuple in a relation. A superkey can include any subset of the relation s attributes that possesses this uniqueness property. For example, in the relation STUDENT, the ID attribute is a superkey, as it uniquely defines a tuple of the relation. Taken together, the attributes ID and SURNAME is also a superkey, because again only one tuple in the relation can have a given value of these attributes. In fact, all the attributes of a relation taken together also form a superkey! This is implied by property 2 above. Note also that a key can never have a null (blank) value. Database Systems (EE221) - Page 12
4 Relational theory also calls for a more restricted type of key where the number of attributes in a superkey to a minimum (excludes any unnecessary ones). Such keys are called relation keys. A relation key may be formally defined as a set of one or more attributes of a relation such that the following two properties hold for all time for any instance of the relation: Uniqueness: the set of attributes has a unique value for each tuple in the relation. Nonredundancy: if an attribute is removed from the set of attributes in the relation key, then the remaining attributes will not possess the uniqueness property. A relation may also have more than one relation key. If a relation has more than one, it is a good idea to choose one relation key to be the primary key of the relation. This is the key which will be principally used to retrieve a particular tuple (row) from a relation. Note that whether or not a set of attributes forms a relation key is a matter of interpretation for the database designer when creating a data model. Consider the following relation: LECTURER (ID, Name, Telephone_Number, Office_Number) All DCU employees have a unique ID number and these numbers are never reused or changed so the attribute ID will form a relation key. It is possible that two lecturers share an office or telephone, and that lectures can move rooms or phone numbers, so neither of these attributes will form a relation key. However, in an institute where every lecturer always has their own office then Office_Number will also be a relation key. It requires analysis of the particular application to determine these facts and to ensure the database schema correctly mirrors the real world being modelled. Analysis and data modelling is an important part of database design which will be touched on in the next section. Database Systems (EE221) - Page 13
5 Foreign Keys Another important concept in relational theory is that of a foreign key. A foreign key in the relation R2 is a set of one or more attributes of R2 (not necessarily a part of a relation key of R2) which form a relation key in another relation R1. The foreign key in R2 must come from the same domain as the relation key in R1. As an example, suppose we have two relations in a database used to keep track of which student has been assigned which final year project: STUDENT PROJECT (ID, Surname, Forename, Programme, Date_of_Birth) (Proj-ID, Project-Title, Student-ID, Year) STUDENT just has one relation key, {ID}. Each year the project numbers are reused but the database will store project information over many years, so the relation key of PROJECT is: {Proj-ID, Year} In our example, the attribute Student-ID of PROJECT is designated a foreign key, as it reflects the attribute ID which is the relation key of STUDENT. This example illustrates that the foreign key does not necessarily have to have the same name as the primary key it reflects; however, they must both have the same domain. Foreign keys are important concepts which model the relationships between different entities. For example the existence of the foreign key Student-ID indicates that there is a relationship between the entities STUDENT and PROJECT, that is, each project is assigned to a student. This relationship allows us to navigate between tables when retrieving data and helps to enforce integrity rules in a database. We will see in the next section that these relationships between entities can be expressed graphically using Entity-Relationship (E-R) diagrams. Foreign key ownership Note that it is considered that a foreign key in a relation R1 is owned by the relation who s relation key it reflects. For example, because Student-ID in PROJECT is a foreign key it may only take on an existing value of ID in STUDENT. Otherwise we could loose referential integrity e.g. we could assign a project to a non-existent student (bad). This is why the term foreign is used the attribute or attributes in the foreign key are really just visiting from another relation the value of the foreign key is determined by their home relation. Database Systems (EE221) - Page 14
6 Prime and Non-Prime Attributes The final piece of terminology to be introduced refers to prime and nonprime attributes. A prime attribute is an attribute which is part of at least one relation key. A non-prime attribute is an attribute that is not part of any relation key. Examples of prime attributes in PROJECT are Proj-ID and Year, while nonprime attributes are Project-Title and Student-ID. Database Integrity Rules There are two rules relating to database integrity which must be obeyed at all times to ensure that data can be maintained and retrieved successfully. To understand their significance, imagine what would happen if one of the attributes of a primary key were left blank when a tuple was inserted into a relation it would be impossible to ever retrieve that tuple. Similarly, a problem will exist if a foreign key of a relation contains a value which is not reflected in the relation where this attribute is a primary key. For example, if a particular Student-ID in the PROJECT relation did not have a corresponding value of ID in the STUDENT relation, then there would be confusion in the logic of the database, i.e. the project would be assigned to a non-existent student. The two database integrity rules are: 1. Entity Integrity: No attribute participating in the primary key of a relation is allowed to accept null values. The primary key is the unique identifier in a relation - lack of information in the primary key would result in tuples which have no identity. This cannot be permitted. 2. Referential Integrity: If a relation R2 contains a foreign key (i.e. one or more attributes which form a primary key in another relation R1), then every value of the foreign key must either correspond to values in R1, or be wholly null. This ensures that if some tuple t2 references another tuple tl, then tl must exist, therefore ensuring no conflicting information in the data. Database Systems (EE221) - Page 15
7 Exercise 1 Given the group of four relations and the additional information listed below: (1) Identify all relation keys for each relation. (2) Identify a suitable primary key for each relation. (3) Identify any foreign keys in the set of relations. (4) Identify the non-prime attributes in each relation. In each case, state any assumptions you make about your interpretation of the relationships between the attributes. STUDENT (Student_ID, First_Name, Last_Name, Address, ) REGISTER (Student_ID, Module_ID, Semester) LECTURER (Lecturer_ID, First_Name, Last_Name, , Office_Number) MODULE (Module_ID, Module_Name, Faculty, Lecturer_ID) The following information is also known: Each student and lecturer has their own unique address. More than one student may live at the same address. A student may register for a module more than once (e.g. to repeat it), but only once in any given semester. (Note: the values of Semester include a year code e.g is Semester 2 in 2007, etc.). Lecturers may share an office but, if they do, they will not have the same last name. Two faculties may happen to use the same module name for two distinct modules. Exercise 2 In each of the following groups of relations, identify the relation keys, stating any assumptions. Are there any likely foreign keys? Qualify your answer. List the prime and the non-prime attributes in each relation. (i) RESIDENCE (House-Number, Street-Name, City, Country, Date-moved-in) LIVED-IN (Person-ID, Residence-ID) (ii) CITIES (Map-Reference, City-Name, Population) ROADS (Road-Name, Start-City-Name, End-City-Name) Database Systems (EE221) - Page 16
Chapter 4. The Relational Model
Chapter 4 The Relational Model Chapter 4 - Objectives Terminology of relational model. How tables are used to represent data. Connection between mathematical relations and relations in the relational model.
More informationIntroduction to Relational Databases. Introduction to Relational Databases cont: Introduction to Relational Databases cont: Relational Data structure
Databases databases Terminology of relational model Properties of database relations. Relational Keys. Meaning of entity integrity and referential integrity. Purpose and advantages of views. The relational
More informationEE221 Databases Practicals Manual
EE221 Databases Practicals Manual Lab 1 An Introduction to SQL Lab 2 Database Creation and Querying using SQL Assignment Data Analysis, Database Design, Implementation and Relation Normalisation School
More informationLecture 03. Spring 2018 Borough of Manhattan Community College
Lecture 03 Spring 2018 Borough of Manhattan Community College 1 2 Outline 1. Brief History of the Relational Model 2. Terminology 3. Integrity Constraints 4. Views 3 History of the Relational Model The
More informationA database can be modeled as: + a collection of entities, + a set of relationships among entities.
The Relational Model Lecture 2 The Entity-Relationship Model and its Translation to the Relational Model Entity-Relationship (ER) Model + Entity Sets + Relationship Sets + Database Design Issues + Mapping
More informationThe Basic (Flat) Relational Model. Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
The Basic (Flat) Relational Model Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3 Outline The Relational Data Model and Relational Database Constraints Relational
More informationRelational Model. Rab Nawaz Jadoon DCS. Assistant Professor. Department of Computer Science. COMSATS IIT, Abbottabad Pakistan
Relational Model DCS COMSATS Institute of Information Technology Rab Nawaz Jadoon Assistant Professor COMSATS IIT, Abbottabad Pakistan Management Information Systems (MIS) Relational Model Relational Data
More informationKing Fahd University of Petroleum and Minerals
1 King Fahd University of Petroleum and Minerals Information and Computer Science Department ICS 334: Database Systems Semester 041 Major Exam 1 18% ID: Name: Section: Grades Section Max Scored A 5 B 25
More informationRelational Model Concepts
Relational Model Relational Model Concepts The relational model of data is based on the concept of a Relation. A relation is a mathematical concept based on the idea of sets. Relational Model The model
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 informationCS211 Lecture: Database Design
CS211 Lecture: Database Design Objectives: last revised November 21, 2006 1. To introduce the anomalies that result from redundant storage of data 2. To introduce the notion of functional dependencies
More informationII. Review/Expansion of Definitions - Ask class for definitions
CS352 Lecture - The Entity-Relationship Model last revised July 25, 2008 Objectives: 1. To discuss using an ER model to think about a database at the conceptual design level. 2. To show how to convert
More informationDatabase Technologies. Madalina CROITORU IUT Montpellier
Database Technologies Madalina CROITORU croitoru@lirmm.fr IUT Montpellier Course practicalities 2 x 2h per week (14 weeks) Basics of database theory relational model, relational algebra, SQL and database
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 informationACS-3902 Fall Ron McFadyen 3D21 Slides are based on chapter 5 (7 th edition) (chapter 3 in 6 th edition)
ACS-3902 Fall 2016 Ron McFadyen 3D21 ron.mcfadyen@acs.uwinnipeg.ca Slides are based on chapter 5 (7 th edition) (chapter 3 in 6 th edition) 1 The Relational Data Model and Relational Database Constraints
More informationLecture 03. Fall 2017 Borough of Manhattan Community College
Lecture 03 Fall 2017 Borough of Manhattan Community College 1 2 Outline 1 Brief History of the Relational Model 2 Terminology 3 Integrity Constraints 4 Views 3 History of the Relational Model The Relational
More informationThe University of Nottingham
The University of Nottingham SCHOOL OF COMPUTER SCIENCE AND INFORMATION TECHNOLOGY A LEVEL 1 MODULE, SPRING SEMESTER 2006-2007 DATABASE SYSTEMS Time allowed TWO hours Candidates must NOT start writing
More informationITCS 3160 DATA BASE DESIGN AND IMPLEMENTATION
ITCS 3160 DATA BASE DESIGN AND IMPLEMENTATION JING YANG 2010 FALL Class 3: The Relational Data Model and Relational Database Constraints Outline 2 The Relational Data Model and Relational Database Constraints
More informationTHE RELATIONAL DATA MODEL CHAPTER 3 (6/E) CHAPTER 5 (5/E)
1 THE RELATIONAL DATA MODEL CHAPTER 3 (6/E) CHAPTER 5 (5/E) 2 LECTURE OUTLINE Relational Model Concepts Relational Database Schemas Update Operations Brief History of Database Applications (from Section
More informationRelational Database design. Slides By: Shree Jaswal
Relational Database design Slides By: Shree Jaswal Topics: Design guidelines for relational schema, Functional Dependencies, Definition of Normal Forms- 1NF, 2NF, 3NF, BCNF, Converting Relational Schema
More informationChapter 2: Relational Model
Chapter 2: Relational Model Database System Concepts, 5 th Ed. See www.db-book.com for conditions on re-use Chapter 2: Relational Model Structure of Relational Databases Fundamental Relational-Algebra-Operations
More informationLet s briefly review important EER inheritance concepts
Let s briefly review important EER inheritance concepts 1 is-a relationship Copyright (c) 2011 Pearson Education 2 Basic Constraints Partial / Disjoint: Single line / d in circle Each entity can be an
More informationRelational Data Model
Relational Data Model 1. Relational data model Information models try to put the real-world information complexity in a framework that can be easily understood. Data models must capture data structure
More informationEntity-Relationship Modelling. Entities Attributes Relationships Mapping Cardinality Keys Reduction of an E-R Diagram to Tables
Entity-Relationship Modelling Entities Attributes Relationships Mapping Cardinality Keys Reduction of an E-R Diagram to Tables 1 Entity Sets A enterprise can be modeled as a collection of: entities, and
More informationModule Contact: Dr Beatriz de la Iglesia, CMP Copyright of the University of East Anglia Version 1
UNIVERSITY OF EAST ANGLIA School of Computing Sciences Main Series UG Examination 2015-16 DATABASE SYSTEMS CMP-4010B / CMP-5038B Time allowed: 3 hours Answer THREE questions out of FIVE. All questions
More informationApplied Databases. Sebastian Maneth. Lecture 5 ER Model, normal forms. University of Edinburgh - January 25 th, 2016
Applied Databases Lecture 5 ER Model, normal forms Sebastian Maneth University of Edinburgh - January 25 th, 2016 Outline 2 1. Entity Relationship Model 2. Normal Forms Keys and Superkeys 3 Superkey =
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 informationDatabase Systems Relational Model. A.R. Hurson 323 CS Building
Relational Model A.R. Hurson 323 CS Building Relational data model Database is represented by a set of tables (relations), in which a row (tuple) represents an entity (object, record) and a column corresponds
More informationDBMS. Relational Model. Module Title?
Relational Model Why Study the Relational Model? Most widely used model currently. DB2,, MySQL, Oracle, PostgreSQL, SQLServer, Note: some Legacy systems use older models e.g., IBM s IMS Object-oriented
More informationApplied Databases. Sebastian Maneth. Lecture 5 ER Model, Normal Forms. University of Edinburgh - January 30 th, 2017
Applied Databases Lecture 5 ER Model, Normal Forms Sebastian Maneth University of Edinburgh - January 30 th, 2017 Outline 2 1. Entity Relationship Model 2. Normal Forms From Last Lecture 3 the Lecturer
More informationChapter 2: Intro to Relational Model
Chapter 2: Intro to Relational Model Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Example of a Relation attributes (or columns) tuples (or rows) 2.2 Attribute Types The
More informationLecture 11 - Chapter 8 Relational Database Design Part 1
CMSC 461, Database Management Systems Spring 2018 Lecture 11 - Chapter 8 Relational Database Design Part 1 These slides are based on Database System Concepts 6th edition book and are a modified version
More informationChapter 5. The Relational Data Model and Relational Database Constraints. Slide 5-١. Copyright 2007 Ramez Elmasri and Shamkant B.
Slide 5-١ Chapter 5 The Relational Data Model and Relational Database Constraints Chapter Outline Relational Model Concepts Relational Model Constraints and Relational Database Schemas Update Operations
More informationCopyright 2007 Ramez Elmasri and Shamkant B. Navathe. Slide 5-1
Slide 5-1 Chapter 5 The Relational Data Model and Relational Database Constraints Chapter Outline Relational Model Concepts Relational Model Constraints and Relational Database Schemas Update Operations
More informationThe Relational Model
The Relational Model What is the Relational Model Relations Domain Constraints SQL Integrity Constraints Translating an ER diagram to the Relational Model and SQL Views A relational database consists
More informationbegin [atomic] operation, operation, { commit rollback} end
Set Processing Languages standard, simple data structure RELATION abstracted retrievals RELATIONAL ALGEBRA abstracted updating INSERT, DELETE, UPDATE transaction indivisible set of active operations begin
More informationTranslation of ER-diagram into Relational Schema. Dr. Sunnie S. Chung CIS430/530
Translation of ER-diagram into Relational Schema Dr. Sunnie S. Chung CIS430/530 Learning Objectives Define each of the following database terms Relation Primary key Foreign key Referential integrity Field
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 informationDatabase Management System Dr. S. Srinath Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No.
Database Management System Dr. S. Srinath Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No. # 3 Relational Model Hello everyone, we have been looking into
More informationDatabases. Jörg Endrullis. VU University Amsterdam
Databases Jörg Endrullis VU University Amsterdam The Relational Model Overview 1. Relational Model Concepts: Schema, State 2. Null Values 3. Constraints: General Remarks 4. Key Constraints 5. Foreign Key
More informationChapter 7: Entity-Relationship Model
Chapter 7: Entity-Relationship Model, 7th Ed. See www.db-book.com for conditions on re-use Chapter 7: Entity-Relationship Model Design Process Modeling Constraints E-R Diagram Design Issues Weak Entity
More informationChapter 5. Relational Model Concepts 5/2/2008. Chapter Outline. Relational Database Constraints
Chapter 5 The Relational Data Model and Relational Database Constraints Copyright 2004 Pearson Education, Inc. Chapter Outline Relational Model Concepts Relational Model Constraints and Relational Database
More informationChapter 5. Relational Model Concepts 9/4/2012. Chapter Outline. The Relational Data Model and Relational Database Constraints
Chapter 5 The Relational Data Model and Relational Database Constraints Copyright 2004 Pearson Education, Inc. Chapter Outline Relational Model Constraints and Relational Database Schemas Update Operations
More informationRelational Model. IT 5101 Introduction to Database Systems. J.G. Zheng Fall 2011
Relational Model IT 5101 Introduction to Database Systems J.G. Zheng Fall 2011 Overview What is the relational model? What are the most important practical elements of the relational model? 2 Introduction
More informationChapter 10. Normalization. Chapter Outline. Chapter Outline(contd.)
Chapter 10 Normalization Chapter Outline 1 Informal Design Guidelines for Relational Databases 1.1Semantics of the Relation Attributes 1.2 Redundant Information in Tuples and Update Anomalies 1.3 Null
More informationDatabase Management Systems LECTURE NOTES 2
Database Management Systems LECTURE NOTES 2 Relation: A table; Tuple: A row in a table; Attribute: A column in a table Degree: number of attributes; Cardinality: number of tuples Entity and Entity Sets:
More informationRelational model continued. Understanding how to use the relational model. Summary of board example: with Copies as weak entity
COS 597A: Principles of Database and Information Systems Relational model continued Understanding how to use the relational model 1 with as weak entity folded into folded into branches: (br_, librarian,
More informationRelational Model History. COSC 304 Introduction to Database Systems. Relational Model and Algebra. Relational Model Definitions.
COSC 304 Introduction to Database Systems Relational Model and Algebra Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca Relational Model History The relational model was
More informationThe En'ty Rela'onship Model
The En'ty Rela'onship Model Debapriyo Majumdar DBMS Fall 2016 Indian Statistical Institute Kolkata Slides re-used, with minor modification, from Silberschatz, Korth and Sudarshan www.db-book.com Outline
More informationThe Relational Data Model and Relational Database Constraints
CHAPTER 5 The Relational Data Model and Relational Database Constraints Copyright 2017 Ramez Elmasri and Shamkant B. Navathe Slide 1-2 Chapter Outline Relational Model Concepts Relational Model Constraints
More informationConceptual Data Models for Database Design
Conceptual Data Models for Database Design Entity Relationship (ER) Model The most popular high-level conceptual data model is the ER model. It is frequently used for the conceptual design of database
More informationElmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter 10-2
Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter 10-2 Chapter Outline 1 Informal Design Guidelines for Relational Databases 1.1Semantics of the Relation Attributes 1.2 Redundant
More informationCSE 132A Database Systems Principles
CSE 132A Database Systems Principles Prof. Alin Deutsch RELATIONAL DATA MODEL Some slides are based or modified from originals by Elmasri and Navathe, Fundamentals of Database Systems, 4th Edition 2004
More informationCOURSE OVERVIEW THE RELATIONAL MODEL. CS121: Relational Databases Fall 2017 Lecture 1
COURSE OVERVIEW THE RELATIONAL MODEL CS121: Relational Databases Fall 2017 Lecture 1 Course Overview 2 Introduction to relational database systems Theory and use of relational databases Focus on: The Relational
More informationRelational Data Model. Christopher Simpkins
Relational Data Model Christopher Simpkins 1 / 22 Relational Data Model A relation schema R(A a,..., A n ) is a relation name R and a list of attributes A 1,..., A n. Each attribute A i is the name of
More informationComputer Science Applications to Cultural Heritage. Relational Databases
Computer Science Applications to Cultural Heritage Relational Databases Filippo Bergamasco (filippo.bergamasco@unive.it) http://www.dais.unive.it/~bergamasco DAIS, Ca Foscari University of Venice Academic
More informationFUNCTIONAL DEPENDENCIES CHAPTER , 15.5 (6/E) CHAPTER , 10.5 (5/E)
FUNCTIONAL DEPENDENCIES CHAPTER 15.1-15.2, 15.5 (6/E) CHAPTER 10.1-10.2, 10.5 (5/E) 4 LECTURE OUTLINE Design guidelines for relation schemas Functional dependencies Definition and interpretation Formal
More informationCOURSE OVERVIEW THE RELATIONAL MODEL. CS121: Introduction to Relational Database Systems Fall 2016 Lecture 1
COURSE OVERVIEW THE RELATIONAL MODEL CS121: Introduction to Relational Database Systems Fall 2016 Lecture 1 Course Overview 2 Introduction to relational database systems Theory and use of relational databases
More informationMapping ER Diagrams to. Relations (Cont d) Mapping ER Diagrams to. Exercise. Relations. Mapping ER Diagrams to Relations (Cont d) Exercise
CSC 74 Database Management Systems Topic #6: Database Design Weak Entity Type E Create a relation R Include all simple attributes and simple components of composite attributes. Include the primary key
More informationCSC 453 Database Technologies. Tanu Malik DePaul University
CSC 453 Database Technologies Tanu Malik DePaul University A Data Model A notation for describing data or information. Consists of mostly 3 parts: Structure of the data Data structures and relationships
More informationInformal Design Guidelines for Relational Databases
Outline Informal Design Guidelines for Relational Databases Semantics of the Relation Attributes Redundant Information in Tuples and Update Anomalies Null Values in Tuples Spurious Tuples Functional Dependencies
More informationThe strategy for achieving a good design is to decompose a badly designed relation appropriately.
The strategy for achieving a good design is to decompose a badly designed relation appropriately. Functional Dependencies The single most important concept in relational schema design theory is that of
More informationCS221 Lecture: The Relational Data Model
CS221 Lecture: The Relational Data Model last revised July 30, 2010 Objectives: 1. To understand the fundamentals of the relational model 2. To understand the concept of key (superkey, candidate, primary,
More informationChapter 7: Entity-Relationship Model
Chapter 7: Entity-Relationship Model Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Chapter 7: Entity-Relationship Model Design Process Modeling Constraints E-R Diagram
More informationChapter 7: Entity-Relationship Model
Chapter 7: Entity-Relationship Model Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Chapter 7: Entity-Relationship Model Design Process Modeling Constraints E-R Diagram
More informationCS352 Lecture - The Entity-Relationship Model
CS352 Lecture - The Entity-Relationship Model Objectives: last revised August 3, 2004 1. To introduce the concepts of entity, relationship, key 2. To show how to convert an ER design to a set of tables.
More informationIntegrity and Security
C H A P T E R 6 Integrity and Security This chapter presents several types of integrity constraints, including domain constraints, referential integrity constraints, assertions and triggers, as well as
More informationLogical Database Design. ICT285 Databases: Topic 06
Logical Database Design ICT285 Databases: Topic 06 1. What is Logical Database Design? Why bother? Bad logical database design results in bad physical database design, and generally results in poor database
More informationTranslation of ER-diagram into Relational Schema. Dr. Sunnie S. Chung CIS430/530
Translation of ER-diagram into Relational Schema Dr. Sunnie S. Chung CIS430/530 Learning Objectives Define each of the following database terms 9.2 Relation Primary key Foreign key Referential integrity
More informationRelational model. Jaroslav Porubän, Miroslav Biňas, Milan Nosáľ (c)
Relational model Jaroslav Porubän, Miroslav Biňas, Milan Nosáľ (c) 2011-2016 Relational database model Data are represented as a mathematical relation (subset of cartesian product) of attribute domains
More informationChapter 6: Entity-Relationship Model
Chapter 6: Entity-Relationship Model Database System Concepts, 5th Ed. See www.db-book.com for conditions on re-use Chapter 6: Entity-Relationship Model Design Process Modeling Constraints E-R Diagram
More informationER Modeling ER Diagram ID-Dependent and Weak Entities Pg 1
ER Modeling ER Diagram ID-Dependent and Weak Entities Pg 1 ER Diagram ID-Dependent and Weak Entities Ray Lockwood Points: An ID-dependent entity is an entity whose identifier (key) includes the identifier
More informationFunctional Dependencies and Normalization for Relational Databases Design & Analysis of Database Systems
Functional Dependencies and Normalization for Relational Databases 406.426 Design & Analysis of Database Systems Jonghun Park jonghun@snu.ac.kr Dept. of Industrial Engineering Seoul National University
More informationIntroduction to Database Systems. The Relational Data Model
Introduction to Database Systems The Relational Data Model Werner Nutt 1 4. The Relational Data Model 4.1 Schemas 1. Schemas 2. Instances 3. Integrity Constraints 2 Different Schemas are Based on Different
More informationChapter 6: Entity-Relationship Model. The Next Step: Designing DB Schema. Identifying Entities and their Attributes. The E-R Model.
Chapter 6: Entity-Relationship Model The Next Step: Designing DB Schema Our Story So Far: Relational Tables Databases are structured collections of organized data The Relational model is the most common
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 informationRelational Model. Courses B0B36DBS, A4B33DS, A7B36DBS: Database Systems. Lecture 02: Martin Svoboda
Courses B0B36DBS, A4B33DS, A7B36DBS: Database Systems Lecture 02: Relational Model Martin Svoboda 28. 2. 2017 Faculty of Electrical Engineering, Czech Technical University in Prague Lecture Outline Logical
More informationIntroduction to Database Systems. The Relational Data Model. Werner Nutt
Introduction to Database Systems The Relational Data Model Werner Nutt 1 4. The Relational Data Model 4.1 Schemas 1. Schemas 2. Instances 3. Integrity Constraints 2 Different Schemas are Based on Different
More informationMySQL. A practical introduction to database design
MySQL A practical introduction to database design Dr. Chris Tomlinson Bioinformatics Data Science Group, Room 126, Sir Alexander Fleming Building chris.tomlinson@imperial.ac.uk Database Classes 24/09/18
More informationCS275 Intro to Databases
CS275 Intro to Databases The Relational Data Model Chap. 3 How Is Data Retrieved and Manipulated? Queries Data manipulation language (DML) Retrieval Add Delete Update An Example UNIVERSITY database Information
More informationChapter 14 Outline. Normalization for Relational Databases: Outline. Chapter 14: Basics of Functional Dependencies and
Ramez Elmasri, Shamkant B. Navathe(2016) Fundamentals of Database Systems (7th Edition), pearson, isbn 10: 0-13-397077-9;isbn-13:978-0-13-397077-7. Chapter 14: Basics of Functional Dependencies and Normalization
More informationUNIT 3 DATABASE DESIGN
UNIT 3 DATABASE DESIGN Objective To study design guidelines for relational databases. To know about Functional dependencies. To have an understanding on First, Second, Third Normal forms To study about
More informationDatabase Management Systems
Database Management Systems Associate Professor Dr. Raed Ibraheem Hamed University of Human Development, College of Science and Technology Computer Science Department 2015 2016 Department of Computer Science
More information01/01/2017. Chapter 5: The Relational Data Model and Relational Database Constraints: Outline. Chapter 5: Relational Database Constraints
Chapter 5: The Relational Data Model and Relational Database Constraints: Outline Ramez Elmasri, Shamkant B. Navathe(2017) Fundamentals of Database Systems (7th Edition),pearson, isbn 10: 0-13-397077-9;isbn-13:978-0-13-397077-7.
More informationChapter 7: Entity-Relationship Model
Chapter 7: Entity-Relationship Model Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Chapter 7: Entity-Relationship Model Design Process Modeling Constraints E-R Diagram
More informationChapter 10. Chapter Outline. Chapter Outline. Functional Dependencies and Normalization for Relational Databases
Chapter 10 Functional Dependencies and Normalization for Relational Databases Chapter Outline 1 Informal Design Guidelines for Relational Databases 1.1Semantics of the Relation Attributes 1.2 Redundant
More informationThe Next Step: Designing DB Schema. Chapter 6: Entity-Relationship Model. The E-R Model. Identifying Entities and their Attributes.
Chapter 6: Entity-Relationship Model Our Story So Far: Relational Tables Databases are structured collections of organized data The Relational model is the most common data organization model The Relational
More informationIGCSE Information Communication Technology (ICT) Syllabus code Section 5: Data types
IGCSE Information Communication Technology (ICT) Syllabus code 0417 Section 5: Data types At the end of this Unit students will be able to: (a) identify different data types: logical/boolean, alphanumeric/text,
More informationPES Institute of Technology Bangalore South Campus (1 K.M before Electronic City,Bangalore ) Department of MCA. Solution Set - Test-II
PES Institute of Technology Bangalore South Campus (1 K.M before Electronic City,Bangalore 560100 ) Solution Set - Test-II Sub: Database Management Systems 16MCA23 Date: 04/04/2017 Sem & Section:II Duration:
More informationDatabase Design Theory and Normalization. CS 377: Database Systems
Database Design Theory and Normalization CS 377: Database Systems Recap: What Has Been Covered Lectures 1-2: Database Overview & Concepts Lecture 4: Representational Model (Relational Model) & Mapping
More informationCSIT5300: Advanced Database Systems
CSIT5300: Advanced Database Systems L02: Relational Data Model Dr. Kenneth LEUNG Department of Computer Science and Engineering The Hong Kong University of Science and Technology Hong Kong SAR, China kwtleung@cse.ust.hk
More informationChapter 14. Database Design Theory: Introduction to Normalization Using Functional and Multivalued Dependencies
Chapter 14 Database Design Theory: Introduction to Normalization Using Functional and Multivalued Dependencies Copyright 2012 Ramez Elmasri and Shamkant B. Navathe Chapter Outline 1 Informal Design Guidelines
More informationLecture Notes for 3 rd August Lecture topic : Introduction to Relational Model. Rishi Barua Shubham Tripathi
Lecture Notes for 3 rd August 2011 Lecture topic : Introduction to Relational Model Rishi Barua 09010141 Shubham Tripathi 09010148 Example of a relation. Attribute (Column) ID Name Department Salary (Rs)
More informationCopyright 2016 Ramez Elmasri and Shamkant B. Navathe
CHAPTER 14 Basics of Functional Dependencies and Normalization for Relational Databases Slide 14-2 Chapter Outline 1 Informal Design Guidelines for Relational Databases 1.1 Semantics of the Relation Attributes
More informationDC62 Database management system JUNE 2013
Q2 (a) Explain the differences between conceptual & external schema. Ans2 a. Page Number 24 of textbook. Q2 (b) Describe the four components of a database system. A database system is composed of four
More informationA hypothetical M:M student schedule example
A hypothetical : student schedule example We are interested in creating a relationship between two tables: Student and Class Section. We want to be able to be able to have students register for different
More informationInformation Services. Essential Access Exercises. IT
Information Services Essential Access Exercises IT www.york.ac.uk/it-services/training Essential Access Tasks Exercises to accompany Essential Access Course Books 1 & 2 Sample files for use with these
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 informationRunning Example Tables name location
Running Example Pubs-Drinkers-DB: The data structures of the relational model Attributes and domains Relation schemas and database schemas databases Pubs (name, location) Drinkers (name, location) Sells
More informationThe data structures of the relational model Attributes and domains Relation schemas and database schemas
The data structures of the relational model Attributes and domains Relation schemas and database schemas databases First normal form (1NF) Running Example Pubs-Drinkers-DB: Pubs (name, location) Drinkers
More information