April 20022CS3X1 Database Design The relational model John Wordsworth Department of Computer Science The University of Reading

Slides:



Advertisements
Similar presentations
The Relational Model Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Advertisements

Chapter 3 : Relational Model
Chapter 3 The Relational Model Transparencies © Pearson Education Limited 1995, 2005.
Relations The Relational Data Model John Sieg, UMass Lowell.
Chapter 3. 2 Chapter 3 - Objectives Terminology of relational model. Terminology of relational model. How tables are used to represent data. How tables.
Chapter 14 Getting to First Base: Introduction to Database Concepts.
1 Minggu 2, Pertemuan 3 The Relational Model Matakuliah: T0206-Sistem Basisdata Tahun: 2005 Versi: 1.0/0.0.
1 Pertemuan 04 MODEL RELASIONAL Matakuliah: >/ > Tahun: > Versi: >
Thomas Connolly and Carolyn Begg’s
Relational Database Management System A type of database in which records are stored in relational form is called relational database management system.
Database Design & ER Diagrams
Database Architecture The Relational Database Model.
The Relational Database Model
CSC271 Database Systems Lecture # 6. Summary: Previous Lecture  Relational model terminology  Mathematical relations  Database relations  Properties.
Relational Model & Relational Algebra. 2 Relational Model u Terminology of relational model. u How tables are used to represent data. u Connection between.
Lecture 2 The Relational Model. Objectives Terminology of relational model. How tables are used to represent data. Connection between mathematical relations.
Chapter 4 The Relational Model Pearson Education © 2014.
© Pearson Education Limited, Chapter 2 The Relational Model Transparencies.
Module Title? DBMS E-R Model to Relational Model.
Relational Model Session 6 Course Name: Database System Year : 2012.
Chapter 4 The Relational Model.
Chapter 3 The Relational Model Transparencies Last Updated: Pebruari 2011 By M. Arief
Content Resource- Elamsari and Navathe, Fundamentals of Database Management systems.
RAJIKA TANDON DATABASES CSE 781 – Database Management Systems Instructor: Dr. A. Goel.
Page 1 Topic 4 Relational Databases CPS510 Database Systems Abdolreza Abhari School of Computer Science Ryerson University.
DBSQL 3-1 Copyright © Genetic Computer School 2009 Chapter 3 Relational Database Model.
Chapter 3 The Relational Model. 2 Chapter 3 - Objectives u Terminology of relational model. u How tables are used to represent data. u Connection between.
ICOM 6005 – Database Management Systems Design Dr. Manuel Rodríguez Martínez Electrical and Computer Engineering Department Lecture 2 – Relational Model.
Copyright © Curt Hill The Relational Model of Database Basic organization and terms.
1 The Relational Database Model. 2 Learning Objectives Terminology of relational model. How tables are used to represent data. Connection between mathematical.
9/7/2012ISC329 Isabelle Bichindaritz1 The Relational Database Model.
The Relational Model Pertemuan 03 Matakuliah: M0564 /Pengantar Sistem Basis Data Tahun : 2008.
Relational Database. Database Management System (DBMS)
Slide Chapter 5 The Relational Data Model and Relational Database Constraints.
System Design System Design - Mr. Ahmad Al-Ghoul System Analysis and Design.
Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
The University of Akron Dept of Business Technology Computer Information Systems The Relational Model: Concepts 2440: 180 Database Concepts Instructor:
Announcements Reading for Monday –4.6 Homework 3 – Due 9/29.
12/2/2015CPSC , CPSC , Lecture 41 Relational Model.
CSE314 Database Systems Lecture 3 The Relational Data Model and Relational Database Constraints Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson.
The relational model A data model (in general) : Integrated collection of concepts for describing data (data requirements). Relational model was introduced.
The Relational Model. 2 Relational Model Terminology u A relation is a table with columns and rows. –Only applies to logical structure of the database,
April 20022CS3X1 Database Design Normalisation (1) John Wordsworth Department of Computer Science The University of Reading Room.
CHAPTER 2 : RELATIONAL DATA MODEL Prepared by : nbs.
The Relational Model © Pearson Education Limited 1995, 2005 Bayu Adhi Tama, M.T.I.
Mapping ER to Relational Model Each strong entity set becomes a table. Each weak entity set also becomes a table by adding primary key of owner entity.
April 20022CS3X1 Database Design Entity-relationship modelling John Wordsworth Department of Computer Science The University of Reading
Chapter 3 The Relational Model. Objectives u Terminology of relational model. u How tables are used to represent data. u Connection between mathematical.
April 20022CS3X1 Database Design Relational algebra John Wordsworth Department of Computer Science The University of Reading Room.
Week 2 Lecture The Relational Database Model Samuel ConnSamuel Conn, Faculty Suggestions for using the Lecture Slides.
Chapter 4 The Relational Model Pearson Education © 2009.
Rationale Databases are an integral part of an organization. Aspiring Database Developers should be able to efficiently design and implement databases.
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.
INFO 340 Lecture 3 Relational Databases. Based on the relational model, grounded in mathematic set theories. Three basic elements: Relation, Tuple, and.
Databases Chapter 16.
Data Base System Lecture 6: Relational Model
Chapter 3 The Relational Model.
Chapter 4 The Relational Model Pearson Education © 2009.
Chapter 4 The Relational Model Pearson Education © 2009.
Chapter 4 The Relational Model Pearson Education © 2009.
The Relational Model Transparencies
Chapter 4 The Relational Model Pearson Education © 2009.
Chapter 4 The Relational Model Pearson Education © 2009.
Getting to First Base: Introduction to Database Concepts
Design tools and techniques for a relational database system
Getting to First Base: Introduction to Database Concepts
Chapter 4 The Relational Model Pearson Education © 2009.
INSTRUCTOR: MRS T.G. ZHOU
Chapter 3 The Relational Model
Presentation transcript:

April 20022CS3X1 Database Design The relational model John Wordsworth Department of Computer Science The University of Reading Room 129, Ext 6544

April 20022CS3X2 Lecture objectives Describe the main characteristics of the relational model of data. Explain what is meant by entities, attributes, and domains. Explain the various kinds of keys that appear in the relational model. Describe the use of null values for attributes. Define entity integrity.

April 20022CS3X3 What is a model? A model is something simple constructed to represent something more complicated. Focuses on certain aspects of the thing modelled. Discards features of the original that are regarded as being unessential.

April 20022CS3X4 What is a relation? A relation is a set of tuples – displayed as a table – each row contains information about a single object – each column records a particular piece of information about every object – ordering not significant – duplicates not allowed

April 20022CS3X5 Entities Entity –A single object about which information is stored Entity set (C&B: entity type) –A collection of similar objects, the same kind of information being stored about each of them

April 20022CS3X6 Degree and cardinality Degree = 3 Cardinality = 5

April 20022CS3X7 Attributes and domains: definitions Attribute: a single-valued property of an entity; recorded in a named column of a relation. Domain: analogous to type in conventional programming. Restricts permissible values to specified range or set. Allows dynamic checks of assignments.

April 20022CS3X8 Attributes and domains: example Entity type: Person Attributes: Name, Age, Height, Weight, Hair Colour Domain for Hair Colour: –{Ash, Fair, Brown, Auburn, Dark, Grey, Black} Attribute value: Brown

April 20022CS3X9 Keys (1) Used in two senses –stronger: unique identification for one row/record/tuple –weaker: specifies ordering on the entity-set –Simple and Composite simple: one attribute is adequate to identify a single entity. composite: two or more attributes taken together are necessary to identify a single entity.

April 20022CS3X10 Keys (2) Superkey –a (group of) attribute(s) that uniquely identifies a single row Candidate key –superkey such that no proper subset of it is itself a superkey Primary key –candidate key actually selected to identify rows Foreign key –(set of) attributes in one relation that matches the candidate key of some (possibly the same) relation

April 20022CS3X11 Is it a key? Looking at an actual instance of a table can be misleading. –Is surname sufficient? Surname and initials? and date- of-birth? –In one year there were two students named David G Barnes. May need an artificial key –student registration number; national insurance number, for example.

April 20022CS3X12 Integrity Null –means "attribute value not known" –Note: this is not the same as a zero value or an empty string. Entity integrity –Every attribute of a primary key must be non- null in every record.

April 20022CS3X13 Key points The relational model is a way of looking at data. Data is considered as being stored in tables: rows and columns. The relational model views things as entities with attributes. Every table must have one or more attributes that serve as a key, a unique identifier for each row of the table. A null value can be used to say that an attribute value is not known.