Database Systems Logical Data Modelling Tutor:Ian Perry Tel:01723 35 7287 Web:http://itsy.co.uk/units/dbs0204/http://itsy.co.uk/units/dbs0204/

Slides:



Advertisements
Similar presentations
Data Bits Models Classes & Schemes Rows & Tables Keys Associations $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit.
Advertisements

The Relational Model and Relational Algebra Nothing is so practical as a good theory Kurt Lewin, 1945.
Relational Model (CB Chapter 4) CPSC 356 Database Ellen Walker Hiram College.
THE RELATIONAL DATABASE MODEL & THE DATABASE DEVELOPMENT PROCESS Fact of the Week: According to a Gartner study in ‘06, Microsoft SQL server had the highest.
Monash University Week 7 Data Modelling Relational Database Theory IMS1907 Database Systems.
Relations The Relational Data Model John Sieg, UMass Lowell.
ETEC 100 Information Technology
Chapter 3. 2 Chapter 3 - Objectives Terminology of relational model. Terminology of relational model. How tables are used to represent data. How tables.
The Relational Database Model:
The Relational Model 1 Prof. Sin-Min Lee Department of Mathematics and Computer Science Prof. Sin-Min Lee Department of Computer Science.
The Relational Database Model. 2 Objectives How relational database model takes a logical view of data Understand how the relational model’s basic components.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 3 The Relational Database Model.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 3 The Relational Database Model.
3 1 Chapter 3 The Relational Database Model Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
The Relational Model Codd (1970): based on set theory Relational model: represents the database as a collection of relations (a table of values --> file)
Thomas Connolly and Carolyn Begg’s
RIZWAN REHMAN, CCS, DU. Advantages of ORDBMSs  The main advantages of extending the relational data model come from reuse and sharing.  Reuse comes.
Database Architecture The Relational Database Model.
LECTURE 3 THE RELATIONAL DATABASE MODEL
44220: Database Design & Implementation Review & Assignment 1
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.
44220: Database Design & Implementation Logical Data Modelling Ian Perry Room: C48 Tel Ext.: 7287
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.
Web-Enabled Decision Support Systems
Introduction to SQL Steve Perry
Chapter 9 Designing Databases Modern Systems Analysis and Design Sixth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
Fundamentals of Relational Database Yong Choi School of Business CSUB, Bakersfield.
Module 3: The Relational Model.  Overview Terminology Relational Data Structure Mathematical Relations Database Relations Relational Keys Relational.
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.
10/17/2012ISC471/HCI571 Isabelle Bichindaritz 1 Technologies Databases.
The Relational Database Model
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.
Slide Chapter 5 The Relational Data Model and Relational Database Constraints.
Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
Database Systems Module Review
Database Systems, 9th Edition 1.  In this chapter, students will learn: That the relational database model offers a logical view of data About the relational.
3 1 Chapter 3 The Relational Database Model Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
The University of Akron Dept of Business Technology Computer Information Systems The Relational Model: Concepts 2440: 180 Database Concepts Instructor:
Database Systems: Design, Implementation, and Management Tenth Edition Chapter 3 The Relational Database Model.
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 3 The Relational Database Model.
12/2/2015CPSC , CPSC , Lecture 41 Relational Model.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 3 The Relational Database Model.
44271: Database Design & Implementation Logical Data Modelling (Avoiding Database Anomalies) Ian Perry Room: C49 Tel Ext.: 7287
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,
Database Systems Avoiding Database Anomalies Tutor:Ian Perry Tel: Web:
44271: Database Design & Implementation Physical Data Modelling Ian Perry Room: C49 Tel Ext.: 7287
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 3 The Relational Database Model.
Chapter 3 The Relational Database Model. Database Systems, 10th Edition 2 * Relational model * View data logically rather than physically * Table * Structural.
The Relational Model © Pearson Education Limited 1995, 2005 Bayu Adhi Tama, M.T.I.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 3 The Relational Database Model.
The relational model1 The relational model Mathematical basis for relational databases.
Chapter 3 The Relational Model. Objectives u Terminology of relational model. u How tables are used to represent data. u Connection between mathematical.
Logical Database Design and Relation Data Model Muhammad Nasir
uses of DB systems DB environment DB structure Codd’s rules current common RDBMs implementations.
LECTURE TWO Introduction to Databases: Data models Relational database concepts Introduction to DDL & DML.
INFO 340 Lecture 3 Relational Databases. Based on the relational model, grounded in mathematic set theories. Three basic elements: Relation, Tuple, and.
Logical Database Design and the Rational Model
Data Modelling Introduction
Data Base System Lecture 6: Relational Model
Database Design: Relational Model
Design tools and techniques for a relational database system
Presentation transcript:

Database Systems Logical Data Modelling Tutor:Ian Perry Tel: Web:

Ian PerrySlide 2 Remember the ‘Stack’

Ian PerrySlide 3 What is a Logical Data Model? A ‘robust’ representation of the initial decisions made when building our Conceptual Data Model, which was composed of: –Entities –Attributes –Relationships When I say ‘robust’ I mean that this model MUST ‘perform’ well with respect to a specific style/type of software.

Ian PerrySlide 4 Database Theories & Software Hardware independent, the match to ‘type’ of software is our only concern here, e.g.: –hierarchyHierarchical DBMS –relationsRelational DBMS –objectsObject-based DBMS Each Database Theory addresses: –Data Structure –Data Integrity –Data Manipulation

Ian PerrySlide 5 Database Theory = Relational Model First proposed by Dr. E. F. Codd in June –Codd E F, (1970), A Relational Model of Data for Large Shared Data Banks, Communications of the ACM, Vol. 13, No. 6, Pgs 377 – 387. Codd's model is now accepted as the definitive model for relational database management systems (RDBMS). Structured English Query Language ("SEQUEL") was developed by IBM Corporation, Inc., to use Codd's model. –SEQUEL later became SQL. In 1979, Relational Software, Inc. (now Oracle Corporation) introduced the first commercial implementation of SQL. –SQL is the most widely used RDBMS manipulation language.

Ian PerrySlide 6 Relational Modelling Language

Ian PerrySlide 7 Relations look very like Entities Staff (SCode, Name, Address, DoB, DoE) Contract (CCode, Site, Begin, End, Super)

Ian PerrySlide 8 Attributes Attribute Values are held in Data Cells: –must be atomic (i.e. simple) values only. Set of Attribute Values eligible for entry in a Data Cell: –is known as an Attribute’s Domain. The Relational Model is weak at explicitly modelling relationships: –Relations must share an Attribute Domain if a relationship is present/possible.

Ian PerrySlide 9 Data Access Data is retrieved by reference to name (of an Attribute) & value (held in a Data Cell) only. Most important Attribute(s) is know as the ‘Key’, of which there are two types. –Primary Key: special Attribute(s) used to control access to Tuples (i.e. rows) of data. –Foreign Key: used, as logical pointers, instead of lines to represent associations between Relations.

Ian PerrySlide 10 Relations are NOT Tables Tables are just data items presented in rows & columns. –Relations must obey rules (Codd’s 12 Rules). For example, we cannot have: –Duplicates: each Tuple (row) must be unique. –Row or Column dependencies there is no hidden meaning from location/sequence of Tuples (rows) and/or Attributes (columns). –etc.

Ian PerrySlide 11 Keys to Data Integrity Rule: –each Tuple (i.e. row) must be unique (for all time). Need a way to discriminate between Tuples: –so, each Relation must have Primary Key: There may be many Candidates for the job of Primary Key, so select on basis of: –uniqueness AND/OR minimality Keys with more than one Attribute: –are know as composite keys.

Ian PerrySlide 12 Other things about Attributes Attributes that are part of the Primary Key are known as Prime Attributes. Attributes not selected as part of the Primary Key are known as Secondary Keys. Secondary Key Attributes which serve as the Primary Key in another Relation are known as Foreign Keys.

Ian PerrySlide 13 Rules for Integrity Entity Integrity: –No Attribute that is a member of a Primary Key can assume a ‘null’ value. Else, how could we discriminate between Tuples? Referential Integrity: –Foreign Key Attributes must take values that are either ‘null’, or from same Domain as the Relation in which Attribute(s) acts as Primary Key. Else, we will lose linkages between Relations.

Ian PerrySlide 14 In Summary Logical Data Modelling: –is all about translating our Conceptual Data Model so that it might be implemented using software that matches a specific Database Theory. Relational Database Theory, Codd (1970): –allows us to develop mathematically rigorous abstract data models, composed of a number of distinct Relations. Tables are NOT Relations: –simply the way we choose to mentally give flesh to our Logical Data Model,

Ian PerrySlide 15 And Relations? –defined by a list of Attributes. –relationships via Primary/Foreign Key mechanism. Attributes? –must be distinctly named. –ordering is irrelevant. –data entries: should be atomic, of the same type, from the same domain. Tuples? –must be unique (so need a Key). –ordering is irrelevant.

Ian PerrySlide 16 So Staff (SCode, Name, Address, DoB, DoE) Contract (CCode, Site, Begin, End, Super)

Ian PerrySlide 17 And Finally! I know what you are thinking: –the Relation Definitions of a Logical Data Model looks to be exactly the same as the Entity Definitions of a Conceptual Data Model. However: –it is highly unlikely that your Logical Data Model will be exactly the same as your Conceptual Data Model. You will have made some logical errors!