44220: Database Design & Implementation Logical Data Modelling Ian Perry Room: C48 Tel Ext.: 7287

Slides:



Advertisements
Similar presentations
The Relational Model and Relational Algebra Nothing is so practical as a good theory Kurt Lewin, 1945.
Advertisements

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.
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.
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.
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
Database Architecture The Relational Database Model.
Dale Roberts 1 Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
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.
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
By: M.Nadeem Akhtar1 The Data Base Management System (DBMS) Ch # 09.
RAJIKA TANDON DATABASES CSE 781 – Database Management Systems Instructor: Dr. A. Goel.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
Introduction to SQL Steve Perry
44220: Database Design & Implementation Review & Assignment 2 Ian Perry Room: C49 Tel Ext.: 7287
CODD’s 12 RULES OF RELATIONAL DATABASE
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.
University of Sunderland COM 220Lecture Two Slide 1 Database Theory.
10/17/2012ISC471/HCI571 Isabelle Bichindaritz 1 Technologies Databases.
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.
1 The Relational Model. 2 Why Study the Relational Model? v Most widely used model. – Vendors: IBM, Informix, Microsoft, Oracle, Sybase, etc. v “Legacy.
1.1 CAS CS 460/660 Relational Model. 1.2 Review E/R Model: Entities, relationships, attributes Cardinalities: 1:1, 1:n, m:1, m:n Keys: superkeys, candidate.
Slide Chapter 5 The Relational Data Model and Relational Database Constraints.
44220: Database Design & Implementation Modelling the ‘Real’ World Ian Perry Room: C41C Ext.: 7287
Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
Database Systems Module Review
In this session, you will learn to: Map an ER diagram to a table Objectives.
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.
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.
44220: Database Design & Implementation Review & Assignment 2 Ian Perry Room: C41C Tel Ext.: 7287
44220: Database Design & Implementation Implementing Physical Domains Ian Perry Room: C41C Tel Ext.: 7287
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 3 The Relational Database Model.
ICOM 6005 – Database Management Systems Design Dr. Manuel Rodríguez Martínez Electrical and Computer Engineering Department Lecture 5 – September 4 th,
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.
44220: Database Design & Implementation Conceptual Data Modelling Ian Perry Room: C49 Tel Ext.: 7287
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 Logical Data Modelling Tutor:Ian Perry Tel: Web:
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.
44220: Database Design & Implementation Review & Assignment 2 Ian Perry Room: C41C Tel Ext.: 7287
Logical Database Design and the Rational Model
Data Modelling Introduction
Database Design: Relational Model
Presentation transcript:

44220: Database Design & Implementation Logical Data Modelling Ian Perry Room: C48 Tel Ext.:

Ian PerrySlide :Database Design & Implementation: Logical Data Modelling Remember the ‘Stack’

Ian PerrySlide :Database Design & Implementation: Logical Data Modelling 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 :Database Design & Implementation: Logical Data Modelling Database Theories & Software Logical Modelling is hardware independent; the match to ‘type’ of software is our only concern; e.g.: hierarchyHierarchical DBMS relationsRelational DBMS objectsObject-based DBMS Whichever Database Theory is ‘chosen’ they generally separate the following three things: Data Structure Defining how the data will be stored. Data Manipulation Defining how data is to be added/updated/deleted. Data Query Defining how ‘questions’ can be asked of the stored data.

Ian PerrySlide :Database Design & Implementation: Logical Data Modelling 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 the definitive model for ALL 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 still (i.e. after more than 27 Years) the most widely used RDBMS manipulation & query language.

Ian PerrySlide :Database Design & Implementation: Logical Data Modelling Relational Modelling Language Don’t get too hung up on Codd’s strange language, but that is what you often read in Relational Database Design books.

Ian PerrySlide :Database Design & Implementation: Logical Data Modelling Relations look very like Entities Staff (SCode, Name, Address, DoB, DoE)  Contract (CCode, Site, Begin, End, Super) NB. You should only ‘use’ the above tabular form in order to check logic; i.e. Tables are NOT Relations.

Ian PerrySlide :Database Design & Implementation: Logical Data Modelling 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 :Database Design & Implementation: Logical Data Modelling 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 (i.e. instead of lines) to represent associations between Relations.

Ian PerrySlide :Database Design & Implementation: Logical Data Modelling Relations are NOT Tables Tables are ‘possible’ data values presented in rows & columns. and are very useful in order to check logic. Relations must obey rules (Codd’s 12 Rules); e.g. 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 :Database Design & Implementation: Logical Data Modelling Keys to Data Integrity Rule: each Tuple (i.e. row) must be unique. Need a way to discriminate between Tuples: each Relation MUST have a Primary Key May be many candidates for the job of Primary Key, so select on basis of: uniqueness AND/OR minimality Primary Keys with multiple Attributes: are know as composite keys.

Ian PerrySlide :Database Design & Implementation: Logical Data Modelling Other things about Attributes Attributes that are part of the Primary Key: are known as Prime Attributes. Candidates not selected as part of the Primary Key: are known as Secondary Keys. Secondary Attributes which serve as the Primary Key in another Relation: are known as Foreign Keys.

Ian PerrySlide :Database Design & Implementation: Logical Data Modelling Rules for Integrity Entity Integrity: No Attribute that is a member of a Primary Key can assume a ‘null’ (i.e. empty) value. Else, how could we discriminate between Tuples? Referential Integrity: A Foreign Key Attribute must take values that are either ‘null’, or from same Domain as the Relation in which this Attribute acts as the Primary Key. Else, we will lose linkages between Relations.

Ian PerrySlide :Database Design & Implementation: Logical Data Modelling It can be difficult to check all of Codd’s Rules if you don’t express each Relation as a Table. Staff (SCode, Name, Address, DoB, DoE)  Contract (CCode, Site, Begin, End, Super) BUT always remember that Tables are NOT Relations.

Ian PerrySlide :Database Design & Implementation: Logical Data Modelling 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 :Database Design & Implementation: Logical Data Modelling And Relations? are 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, and of the same type, and from the same domain. Tuples? must be unique (so need a Key). ordering is irrelevant.

Ian PerrySlide :Database Design & Implementation: Logical Data Modelling 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! Which we will attempt to ‘fix’ in next week’s lecture & workshop sessions.

Ian PerrySlide :Database Design & Implementation: Logical Data Modelling This Week’s Workshop The purpose of this week’s Workshop is to explore the formality of a developing a logical data model, that conforms to the ‘rules’ of Codd’s Relational Model. Five Questions, exploring: the ‘language’ and ‘rules’ of Relational Modelling, and the ‘definition’ of Relations. Make sure that you ‘have a go’ at all 5 questions in advance of the Workshop.