Data Models.

Slides:



Advertisements
Similar presentations
Three-Step Database Design
Advertisements

The Relational Model and Relational Algebra Nothing is so practical as a good theory Kurt Lewin, 1945.
Database Systems: Design, Implementation, and Management Tenth Edition
Chapter 3. 2 Chapter 3 - Objectives Terminology of relational model. Terminology of relational model. How tables are used to represent data. How tables.
Database Architecture The Relational Database Model.
Entity-Relationship Design
2 1 Chapter 2 Data Model Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Dr. Mohamed Osman Hegaz1 Conceptual data base design: The conceptual models: The Entity Relationship Model.
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.
Module Title? DBMS E-R Model to Relational Model.
Chapter 3 The Relational Model Transparencies Last Updated: Pebruari 2011 By M. Arief
CSCI 3140 Module 2 – Conceptual Database Design Theodore Chiasson Dalhousie University.
Concepts and Terminology Introduction to Database.
1 The Relational Database Model. 2 Learning Objectives Terminology of relational model. How tables are used to represent data. Connection between mathematical.
1 Chapter 1 Introduction. 2 Introduction n Definition A database management system (DBMS) is a general-purpose software system that facilitates the process.
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.
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:
Databases Illuminated Chapter 3 The Entity Relationship Model.
Information Access Mgt09/12/971 Entity-Relationship Design Information Level Design.
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,
Data Model O Gives and idea of how the final system or software will look after and the development is completed O This concept is exactly like real world.
The Relational Model © Pearson Education Limited 1995, 2005 Bayu Adhi Tama, M.T.I.
CSCI 6315 Applied Database Systems Review for Midterm Exam I Xiang Lian The University of Texas Rio Grande Valley Edinburg, TX 78539
Department of Mathematics Computer and Information Science1 CS 351: Database Management Systems Christopher I. G. Lanclos Chapter 4.
LECTURE TWO Introduction to Databases: Data models Relational database concepts Introduction to DDL & DML.
Welcome: To the fifth learning sequence “ Data Models “ Recap : In the previous learning sequence, we discussed The Database concepts. Present learning:
Lecture 5 Data Model Design Jeffery S. Horsburgh Hydroinformatics Fall 2012 This work was funded by National Science Foundation Grant EPS
1 The Relational Data Model David J. Stucki. Relational Model Concepts 2 Fundamental concept: the relation  The Relational Model represents an entire.
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.
COP Introduction to Database Structures
Databases and DBMSs Todd S. Bacastow January
- The most common types of data models.
Database Systems: Design, Implementation, and Management Tenth Edition
Logical Database Design and the Rational Model
Entity-Relationship Model
TMC2034 Database Concept and Design
Chapter 4 Logical Database Design and the Relational Model
Normalization Karolina muszyńska
Entity-Relationship Model
Tables and Their Characteristics
Quiz Questions Q.1 An entity set that does not have sufficient attributes to form a primary key is a (A) strong entity set. (B) weak entity set. (C) simple.
Databases and Database Management Systems Chapter 9
CIS 207 The Relational Database Model
Lecture 2 The Relational Model
Database Management System
Database Concepts.
Chapter 3 The Relational Database Model
Data Base System Lecture 6: Relational Model
Database.
Chapter 4 The Relational Model Pearson Education © 2009.
Chapter 4 The Relational Model Pearson Education © 2009.
Entity Relationship Diagrams
Chapter 4+17 The Relational Model Pearson Education © 2014.
Chapter 4 The Relational Model Pearson Education © 2009.
Chapter 4 Entity Relationship (ER) Modeling
The Relational Model Textbook /7/2018.
CHAPTER 4: LOGICAL DATABASE DESIGN AND THE RELATIONAL MODEL
The Relational Model Transparencies
Chapter 4 The Relational Model Pearson Education © 2009.
Review of Week 1 Database DBMS File systems vs. database systems
The Relational Database Model
Database Design Hacettepe University
Design tools and techniques for a relational database system
Entity-Relationship Diagram (ERD)
DBMS ER-Relational Mapping
Database Dr. Roueida Mohammed.
INTRODUCTION A Database system is basically a computer based record keeping system. The collection of data, usually referred to as the database, contains.
Presentation transcript:

Data Models

A description of a database is known as Schema. What is Schema ??? A description of a database is known as Schema.

What is Instance ??? Record at a particular moment of time in a database is known as Instance.

What is Data Model??? A data model is an abstract model that describes how data is represented and accessed.

Meanings of Data Model Data Model Theory Data Model Instance

A formal description of how data may be structured and accessed Data Model Theory A formal description of how data may be structured and accessed

Components of Data Model Theory Structural Part (data structure used to create databases representing entities or modeled by database using create command ) Integrity Part (rules governing the constraints placed on these data structures like applying constraints such as primary key , foreign key) Manipulation Part (a collection of operators used to manipulate the database using queries and update command)

Example of Relational Model Structural Part (based on modified concept of mathematical relation) Integrity Part (by using first order logic) Manipulation Part (using relational algebra , tuple calculus and domain calculus)

Data Model Instance Data Modeling is the process of creating a data model instance by applying a data model theory.

It involves structuring and organizing the data. Data Modeling It is a process of creating a data model by applying data model theory to create a data model instance. It involves structuring and organizing the data.

High Level (Conceptual Schema) Low Level (Physical Schema) Types of Data Model High Level (Conceptual Schema) Low Level (Physical Schema) Representational Data Model Hierarchical Relational Networked ( Logical Schema )

Conceptual Schema It is used to describe the semantics of a domain, being the scope of the model. It consists of Entity Classes and relationships among these entities.

Logical Schema It describes the semantics as represented by the particular data manipulation technology. It consists of description of tables , columns object oriented classes etc.

Physical Schema It describes the physical means by which data is stored. It is concerned with partitions , table spaces etc.

Zachman Framework Contextual List (List of Important Things) Conceptual Model (Entities & Relationships) Logical Model (attributes & identifiers) Physical Model (keys , storage requirements) DDL (Configuration Listing) Data Instances (Operations Storage) Zachman Framework

What is Logical Data Model??? A data model is an abstract model that describes how data is represented and accessed.

Graphical Representations of the business requirements Contains the things of importance in an organization and how they relate to one another Contains business textual definitions and examples Validated and approved by a business representative Basis of Physical Database design

Logical Data Model Vs Physical Data Model Includes Entities ,attributes and relationships Includes tables,columns,keys,data types,validation rules,database triggers stored procedures and access controls Uses business names for attributes Uses column names limited by DBMS Is independent of technology Includes Primary key and indices for fast data acces

Is normalized to 4th Normal Form. Can be de normalized to meet performance requirements Does not include any redundant or derived data May include redundant columns Business subject matter experts validate and approve the model Physical modeler lead the modeling activity

Why build Logical Data Model??? Helps common understanding of business requirements Provides foundation for designing a database Facilitates data re use and sharing Decreases development and maintenance time and cost Confirms a logical process model and helps impact analysis

Logical Modeling Benefits Clarifies functional specifications and avoid assumptions Confirms Business requirements Facilitates business process improvement Decreases system development time and cost Data re-using and sharing Gathers Metadata

3 Schema Architecture of DBMS View 1 View 2 High Level DM Representational DM High Level DM Conceptual Layer Internal Layer Low Level DM

What is Data Independence??? It is a capability to change a specific layer without affecting the other two layers.

Types of Data Independence Logical Data Independence Physical Data Independence

Logical Data Independence The capability to change a conceptual layer without affecting the other two layers

Physical Data Independence Capability to change physical layer without affecting the other two layers

It is database model proposed by Dr. E F Codd. Relational Data Model It is database model proposed by Dr. E F Codd. Core idea is to organize data into tables rows and columns). Follows simple concept of relational algebra

Networked Data Model It is a database model conceived as a flexible way of representing objects and their relationships. It was invented by Charles Bachman. NM allows each record to have multiple parent and child records forming a lattice structure.

Hierarchical Data Model Data is organized in a tree like structure. It allows repeating information using parent/child relationships. Each parent can have multiple child but each child has single parent. It uses 1:N mapping also known as one to many relationships.

Object Oriented Data Model Data and associated operations are represented by objects. An object is an identifiable entity with some characteristics and behavior.

What Is Relation ??? A relation is defined as a set of n tuple (rows) which stores the data logically in a 2-D format in forms of rows and columns.

Relation : Employee Attributes : Emp_id , ename , designation ,dept Emp_id ename designation dept E001 Raghav AM Civil E002 Smriti MANAGER HR E003 Ashwin DM Finance

Relational Algebra Projection Selection Union Intersection Difference Cartesian Product

Two relations A and B are said to be union compatible if and only if Union Compatibilty Union Compatible relations are those relations which have same domain and degree. Two relations A and B are said to be union compatible if and only if Deg(A)=Deg(B) Dom(a1)=dom(b1) Dom(a2)=dom(b2) .. Dom(an)=dom(bn)

Cardinality No of rows in a relation.

One to one (1 : 1) One to many (1 : M) Many to many (M:N) Cardinality Ratio One to one (1 : 1) One to many (1 : M) Many to many (M:N)

Referential Integrity Key Constraints. Types of Constraints Entity Integrity Referential Integrity Key Constraints.

Types Of Key Constraints Super Key Candidate key Primary Key Alternate Key Foreign Key

A super key is written as a finite set of attribute names. A super key K holds in a relation (H,B) if: K is proper subset of H and There exists two distinct tuples t1 and t2 which must hold the condition T1[k] = t2[k]

Data Modeling Techniques ER diagrams EER diagrams OMT

E R Diagram Works_in Department Employee

Single Valued / Multivalued Stored and Derived Types of Attributes Atomic and Composite Single Valued / Multivalued Stored and Derived

Types of Entities Strong Entity Weak Entity

Types of Participation Constraints Total Participation Partial Participation

Example Database Customer(Customer_id,Tax_id,Name,Address,City,State, Zip,Phone) Order(Orderno,Cust_id,invoice_no,date placed,date promised,terms,status) Order Line(Orderno,Orderlineno,product code,qty) Invoice(Invoice_no,Cust_id,Order_no,date,Status) Invoice Line(Invoiceno,lineno,product_code,qty,shipped) Product(Product_code,prod_desc)