Relational Database Components

Similar documents
Fundamentals, Design, and Implementation, 9/e Copyright 2004 Database Processing: Fundamentals, Design, and Implementation, 9/e by David M.

Objectives of logical design... Transforming the ERD diagram into relations. Relational database components. Mapping a composite attribute

THE RELATIONAL DATABASE MODEL

Chapter 1 SQL and Data

The DBMS accepts requests for data from the application program and instructs the operating system to transfer the appropriate data.

Chapter 17. Methodology Logical Database Design for the Relational Model

Systems Analysis and Design Methods Chapter 7: Data Modeling and Analysis

Chapter 3B Objectives. Relational Set Operators. Relational Set Operators. Relational Algebra Operations

ER Modeling Data Modeling and the Entity-Relationship (ER) Diagram Pg 1

COMM 391. Objectives. Introduction to Microsoft Access. What is in an Access database file? Introduction to Microsoft Access 2010

A l Ain University Of Science and Technology

Distributed Database Systems By Syed Bakhtawar Shah Abid Lecturer in Computer Science

Non-overlappingoverlapping. Final outcome of the worked example On pages R&C pages R&C page 157 Fig 3.52

Entity Relationship Diagram (ERD): Basics

Represent entities and relations with diagrams

Entity Attribute STUDENT TABLE tuples single domain

Objectives Definition iti of terms List five properties of relations State two properties of candidate keys Define first, second, and third normal for

Database Management System 5 ER Modeling

Database Management System 9

Entity-Relationship Model &

Full file at Chapter 2: Foundation Concepts

A l Ain University Of Science and Technology

Entity Relationship Diagram (ERD) Dr. Moustafa Elazhary

CMP-3440 Database Systems

Information Technology Audit & Cyber Security

Systems Analysis and Design in a Changing World, Fourth Edition. Chapter 12: Designing Databases

8) A top-to-bottom relationship among the items in a database is established by a

Chapter 6. Advanced Data Modeling. Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel

Modern Systems Analysis and Design Seventh Edition

Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition. Chapter 7 Data Modeling with Entity Relationship Diagrams

MIDTERM EXAMINATION Spring 2010 CS403- Database Management Systems (Session - 4) Ref No: Time: 60 min Marks: 38

System Analysis & design

Chapter 4. In this chapter, you will learn:

Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition. Chapter 8 Data Modeling Advanced Concepts

Database Logical Design

Test bank for accounting information systems 1st edition by richardson chang and smith

Chapter 11 Database Concepts

Relational Model (cont d) & Entity Relational Model. Lecture 2

4. Entity Relationship Model

Chapter. Relational Database Concepts COPYRIGHTED MATERIAL

Logical Database Design. ICT285 Databases: Topic 06

More on the Chen Notation

Related download: Instructor Manual for Modern Database Management 12th Edition by Hoffer Venkataraman Topi (Case studies included)

Introduction to Databases

The Entity-Relationship Model. The Entity-Relationship model. The ER model. The Entity-Relationship model. E-R Model Constructs. E-R Model Constructs

Database Systems: Design, Implementation, and Management Tenth Edition. Chapter 4 Entity Relationship (ER) Modeling

ER Modeling ER Diagram ID-Dependent and Weak Entities Pg 1

Database Systems: Design, Implementation, and Management Tenth Edition. Chapter 4 Entity Relationship (ER) Modeling

Logical E/R Modeling: the Definition of Truth for Data

ER Model. Objectives (2/2) Electricite Du Laos (EDL) Dr. Kanda Runapongsa Saikaew, Computer Engineering, KKU 1

1D D0-541 CIW v5 Database Design Specialist Version 1.7

High Level Database Models

Chapter 4 Entity Relationship Modeling In this chapter, you will learn:

Data about data is database Select correct option: True False Partially True None of the Above

David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation

DATABASE SYSTEMS. Chapter 5 Entity Relationship (ER) Modelling DESIGN IMPLEMENTATION AND MANAGEMENT INTERNATIONAL EDITION ROB CORONEL CROCKETT

DATA MODELING USING THE ENTITY-RELATIONSHIP MODEL. 1 Powered by POeT Solvers Limited

Relational Data Model

Physical Design of Relational Databases

Full file at

Database Design. IIO30100 Tietokantojen suunnittelu. Michal Zabovsky. Presentation overview

ER-to-Relational Mapping


DATABASE MANAGEMENT SYSTEMS

System Analysis And Design Methods ENTITY RELATIONSHIP DIAGRAM (ERD) Prof. Ali Khaleghi Eng. Hadi Haedar

E-R Model. Hi! Here in this lecture we are going to discuss about the E-R Model.

CSE 530A. ER Model to Relational Schema. Washington University Fall 2013

Unit 2 Research Project. Eddie S. Jackson. Kaplan University. IT525: Database Design and Data Modeling

Vendor: CIW. Exam Code: 1D Exam Name: CIW v5 Database Design Specialist. Version: Demo

KDI EER: The Extended ER Model

Chapter 2. DB2 concepts

Introduction to Relational Databases. Introduction to Relational Databases cont: Introduction to Relational Databases cont: Relational Data structure

1D0-541_formatted. Number: Passing Score: 800 Time Limit: 120 min File Version: 1.

LAB 3 Notes. Codd proposed the relational model in 70 Main advantage of Relational Model : Simple representation (relationstables(row,

Lecture2: Database Environment

Part 5: Introduction to Logical Design

Referential Integrity and Other Table Constraints Ray Lockwood

Chapter 4. The Relational Model

Accounting Information Systems, 2e (Kay/Ovlia) Chapter 2 Accounting Databases. Objective 1

Official Statistics - Relational Database Management Systems. Official Statistics - Relational Database Management Systems

Visit for more.

Solved MCQ on fundamental of DBMS. Set-1

Conceptual Database Design. COSC 304 Introduction to Database Systems. Entity-Relationship Modeling. Entity-Relationship Modeling

Conceptual Design. The Entity-Relationship (ER) Model

Database Management System (15ECSC208) UNIT I: Chapter 1: Introduction to DBMS and ER-Model

Database Design Process

High-Level Database Models (ii)

Database Management System 6 ER Modeling...

Step 2: Map ER Model to Tables

2. An implementation-ready data model needn't necessarily contain enforceable rules to guarantee the integrity of the data.

Chapter 3: The Relational Database Model

namib I A U n IVERS I TY

Basant Group of Institution

Mahathma Gandhi University

FAQ: Relational Databases in Accounting Systems

Database Logical Design

Relational model. Jaroslav Porubän, Miroslav Biňas, Milan Nosáľ (c)

3.1. Keys: Super Key, Candidate Key, Primary Key, Alternate Key, Foreign Key

Department of Industrial Engineering. Sharif University of Technology

Introduction to modeling

Transcription:

Relational Database Components Chapter 2 Class 01: Relational Database Components 1

Class 01: Relational Database Components 2

Conceptual Database Design Components Class 01: Relational Database Components 3

Class 01: Relational Database Components 4

High level Conceptual Model ERD shows only entities, definitions and relationships This form is more common in large enterprises Class 01: Relational Database Components 5

Entities Entity: a person, place, thing or event of importance to the organization. Real World things about which the organization collects data. Class 01: Relational Database Components 6

Entities Class 01: Relational Database Components 7

Attributes Attribute: a unit fact that characterizes or describes an entity in some way Should be atomic (cannot be broken down into meaningful sub parts) Class 01: Relational Database Components 8

Relationships Established through the use of primary and foreign keys Separating data into parent and child tables reduces data redundancy Normalization: the process of designing databases that meet certain characteristics, including reduced redundancy Class 01: Relational Database Components 9

Relationships Class 01: Relational Database Components 10

Relationships Three Types: One to One (1:1): Each row in one entity (table) is related to at most one row in the other entity One to Many (1:N): Each row in one entity may be related to many rows in the other entity Many to Many (M:N): Each row in one entity many be related to many rows in the other entity and vice versa Class 01: Relational Database Components 11

Types of Relationships Class 01: Relational Database Components 12

One to One Relationships A given employee can have one automobile assigned (or no automobile assigned) A given automobile can be assigned to only one employee (or no employees) The relationship between employees and automobiles can be called one to one (conditional) Class 01: Relational Database Components 13

Evaluating Relationships Important tip: Pay careful attention to how you evaluate relationships. You need to ask yourself two questions, and you may find them easier to answer if you visualize tables with rows of data in them. At any single point in time, a given row in the Employee table can be associated with how many rows in the Vehicle table? (An employee is assigned at most one vehicle at a time.) At any single point in time, a given row in the Vehicle table can be associated with how many rows in the Employee table? (A vehicle is assigned to either one employee or no employees at any point in time.) Class 01: Relational Database Components 14

One to One Relationships Sets of entities with one to one relationships are most often consolidated into a single entity class When participation is mandatory in both directions, and nontransferrable, one to one relationships should always be consolidated if at all feasible Class 01: Relational Database Components 15

One to Many Relationships A given customer may have many credit reports A given credit report belongs to only one customer The relationship between customers and credit reports can be called one to many Class 01: Relational Database Components 16

Many to Many Relationships A given order can contain many products A given product can appear on many products The relationship between orders and products can be called many to many Intersection Data: data that belongs to both entities Class 01: Relational Database Components 17

Recursive Relationships Relationships between entity instances (records) of the same entity type All types of relationships can be recursive (one to one, oneto many, many to many) Class 01: Relational Database Components 18

Business Rules Business Rule: a policy, procedure, or standard that an organization has adopted Important because they dictate controls (constraints) that must be placed upon the data The database is the last line of defense in preserving data integrity Class 01: Relational Database Components 19

Logical/Physical Database Design Components Class 01: Relational Database Components 20

Tables Table: the primary unit of storage for data in a relational database Logically stores data Relationships might exist between tables May have constraints attached Comprised of rows and columns Each column holds data for one attribute Each row holds all related data for a single occurrence of an entity Class 01: Relational Database Components 21

Table Example: Orders Class 01: Relational Database Components 22

Metadata: Data About Data Class 01: Relational Database Components 23

Database Integrity Database Integrity: the insurance of accurate data in the database Constraints validate or restrict the data values placed in the database Can be implemented at column or table level Can be used to enforce business rules Referential Integrity: ensures that data is consistent between related tables Class 01: Relational Database Components 24

Constraints Constraint: a rule placed on a database object (typically a table or column) that restricts the allowable data values for that database object in some way Class 01: Relational Database Components 25

Primary Key Constraints Primary Key: a column or set of columns that uniquely identifies each row in a table Unique identifier in conceptual design is implemented as a primary key in logical design Usually implemented using an index For multi column primary keys, it is the combination of values for all the columns that must be unique among all rows in the table Class 01: Relational Database Components 26

Foreign Keys Foreign Key: the combination of one or more columns in a table that reference (match) the primary key in another table Foreign keys in child tables establish the relationship with the parent table Fundamental building block of the Relational database Class 01: Relational Database Components 27

Referential Constraints One to many relationships implemented in tables by storing the primary key from the parent (one side) table in the child (many side) table as a foreign key A referential constraint is defined in the DBMS to insure that each foreign key value refers to a valid (existing) primary key value Class 01: Relational Database Components 28

Primary and Foreign Keys Primary Keys Foreign Key Class 01: Relational Database Components 29

The Need for Referential Integrity Class 01: Relational Database Components 30

Single Table Referential Integrity Class 01: Relational Database Components 31

Referential Constraints Defined in Microsoft Access Class 01: Relational Database Components 32

Microsoft Access Edit Relationships Panel Class 01: Relational Database Components 33

Intersection Table PLANT PLANT-PRODUCT PRODUCT Intersection Table: resolves a many to many relationship between two other entities. Appears on the many side of two one to many relationships. Why do this? Relational databases don t directly support many tomany relationships Class 01: Relational Database Components 34

Integrity Constraints NOT NULL Constraint: Prevents a database column value from being NULL (a way of handling missing data values) CHECK Constraint: A simple logic statement that validates ( checks ) a column value Triggers may be used for complicated constraint logic Class 01: Relational Database Components 35

Constraints in Access Class 01: Relational Database Components 36

Class 01: Relational Database Components 37