Introduction to Database Design. Overview of Database Design



Similar documents
The Entity-Relationship Model

The Entity-Relationship Model

Conceptual Design Using the Entity-Relationship (ER) Model

Outline. Data Modeling. Conceptual Design. ER Model Basics: Entities. ER Model Basics: Relationships. Ternary Relationships. Yanlei Diao UMass Amherst

The Relational Model. Why Study the Relational Model? Relational Database: Definitions. Chapter 3

Review: Participation Constraints

The Relational Model. Ramakrishnan&Gehrke, Chapter 3 CS4320 1

Lecture 6. SQL, Logical DB Design

The Relational Model. Why Study the Relational Model? Relational Database: Definitions

Winter Winter

Database Design Overview. Conceptual Design ER Model. Entities and Entity Sets. Entity Set Representation. Keys

Databases Model the Real World. The Entity- Relationship Model. Conceptual Design. Steps in Database Design. ER Model Basics. ER Model Basics (Contd.

2. Conceptual Modeling using the Entity-Relationship Model

Introduction to Database Systems CS4320/CS5320. CS4320/4321: Introduction to Database Systems. CS4320/4321: Introduction to Database Systems

Data Modeling. Database Systems: The Complete Book Ch ,

Review Entity-Relationship Diagrams and the Relational Model. Data Models. Review. Why Study the Relational Model? Steps in Database Design

Database Management Systems. Chapter 1

Topics. Introduction to Database Management System. What Is a DBMS? DBMS Types

CSC 742 Database Management Systems

Chapter 2: Entity-Relationship Model. Entity Sets. " Example: specific person, company, event, plant

Database Design Process. Databases - Entity-Relationship Modelling. Requirements Analysis. Database Design

Database Design. Database Design I: The Entity-Relationship Model. Entity Type (con t) Chapter 4. Entity: an object that is involved in the enterprise

Chapter 2: Entity-Relationship Model

Database Systems. Lecture 1: Introduction

Lecture 12: Entity Relationship Modelling

There are five fields or columns, with names and types as shown above.

Chapter 3. Data Modeling Using the Entity-Relationship (ER) Model

Entity Relationship Diagram

Database Design Process

Chapter 2: Entity-Relationship Model. E-R R Diagrams

ER modelling, Weak Entities, Class Hierarchies, Aggregation

not necessarily strictly sequential feedback loops exist, i.e. may need to revisit earlier stages during a later stage

Database Design Process

Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model

XV. The Entity-Relationship Model

Database Design. Goal: specification of database schema Methodology: E-R Model is viewed as a set of

IV. The (Extended) Entity-Relationship Model

COMP 378 Database Systems Notes for Chapter 7 of Database System Concepts Database Design and the Entity-Relationship Model

Chapter 8 The Enhanced Entity- Relationship (EER) Model

Why Is This Important? Schema Refinement and Normal Forms. The Evils of Redundancy. Functional Dependencies (FDs) Example (Contd.)

The Entity-Relationship Model

Foundations of Information Management

Schema Design and Normal Forms Sid Name Level Rating Wage Hours

The Relational Model. Why Study the Relational Model?

CSCI-GA Database Systems Lecture 7: Schema Refinement and Normalization

Relational Schema Design

Foundations of Information Management

Schema Refinement and Normalization

THE ENTITY- RELATIONSHIP (ER) MODEL CHAPTER 7 (6/E) CHAPTER 3 (5/E)

Database Management Systems

Entity-Relationship Model. Purpose of E/R Model. Entity Sets

EECS 647: Introduction to Database Systems

DATABASE DESIGN. - Developing database and information systems is performed using a development lifecycle, which consists of a series of steps.

Rose Data Modeler (logical)

Bridge from Entity Relationship modeling to creating SQL databases, tables, & relations

Entity-Relationship Model

DATABASE MANAGEMENT SYSTEMS SOLUTIONS MANUAL THIRD EDITION

Databases and BigData

BİL 354 Veritabanı Sistemleri. Entity-Relationship Model

three Entity-Relationship Modeling chapter OVERVIEW CHAPTER

CS 4604: Introduc0on to Database Management Systems. B. Aditya Prakash Lecture #5: En-ty/Rela-onal Models- - - Part 1

Overview. Introduction to Database Systems. Motivation... Motivation: how do we store lots of data?

Concepts of Database Management Seventh Edition. Chapter 6 Database Design 2: Design Method

CS2Bh: Current Technologies. Introduction to XML and Relational Databases. The Relational Model. The relational model

SQL NULL s, Constraints, Triggers

Chapter 10. Practical Database Design Methodology. The Role of Information Systems in Organizations. Practical Database Design Methodology

Database Design Methodology

How To Write A Diagram

Database Design Methodologies

A brief overview of developing a conceptual data model as the first step in creating a relational database.

Databases What the Specification Says

DATABASE MANAGEMENT SYSTEMS. Question Bank:

CS411 Database Systems

OVERVIEW 1.1 DATABASE MANAGEMENT SYSTEM (DBMS) DEFINITION:-

Database Systems. Session 3 Main Theme. Enterprise Data Modeling Using The Entity/Relationship (ER) Model. Dr. Jean-Claude Franchitti

Object-Oriented Data Modeling

Lesson 8: Introduction to Databases E-R Data Modeling

Database Fundamentals: 1

Database Design. Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB

The Relational Data Model: Structure

SCHEMAS AND STATE OF THE DATABASE

TIM 50 - Business Information Systems

AVOIDANCE OF CYCLICAL REFERENCE OF FOREIGN KEYS IN DATA MODELING USING THE ENTITY-RELATIONSHIP MODEL

Data Modeling: Part 1. Entity Relationship (ER) Model

Overview of Data Management

Chapter 2. Data Model. Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel

LiTH, Tekniska högskolan vid Linköpings universitet 1(7) IDA, Institutionen för datavetenskap Juha Takkinen

Exercise 1: Relational Model

Chapter 10 Practical Database Design Methodology and Use of UML Diagrams

CMU - SCS / Database Applications Spring 2013, C. Faloutsos Homework 1: E.R. + Formal Q.L. Deadline: 1:30pm on Tuesday, 2/5/2013

Designing a Database Schema

Implementing evolution: Database migration

Data Modeling Basics

Week 11: Normal Forms. Logical Database Design. Normal Forms and Normalization. Examples of Redundancy

Lecture Notes INFORMATION RESOURCES

CS2Bh: Current Technologies. Introduction to XML and Relational Databases. Introduction to Databases. Why databases? Why not use XML?

The E-R èentity-relationshipè data model views the real world as a set of basic objects èentitiesè and

Concepts of Database Management Seventh Edition. Chapter 9 Database Management Approaches

Object Oriented Databases. OOAD Fall 2012 Arjun Gopalakrishna Bhavya Udayashankar

Transcription:

Introduction to Database Design Chapter 2 Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Overview of Database Design Requirements Analysis The very first step in designing a database application. We focus on the design of the database. Conceptual design: (ER Model is used at this stage.) What are the entities and relationships in the enterprise? What information about these entities and relationships should we store in the database? What are the integrity constraints or business rules that hold? Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 2

Overview of Database Design (Cont.) sid login age gpa 53666 Jones jones@cs 18 3.4 53688 Smith smith@ee 18 3.2 Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 3 Overview of Database Design (Cont.) A database `schema in the ER Model can be represented pictorially (ER diagrams). Logical Database Design Choose a DBMS to implement our database design. Map an ER diagram into a relational schema (Chapter 3). Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 4

Overview of Database Design (Cont.) Schema Refinement (Chapter 19) Analyze the current schema to identify potential problems and to refine it (performance criteria). Theory normalizing relations. Physical Database Design (Chapter 20) Build indices on some tables and clustering some tables. Application and Security Design (Chapter 21) Consider aspects of the application that go beyond the database itself. Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 5 ER Model Basics Entity: Real-world object distinguishable from other objects. An entity is described (in DB) using a set of attributes. Entity Set: A collection of similar entities. E.g., all employees. All entities in an entity set have the same set of attributes. (Until we consider ISA hierarchies, anyway!) Each entity set has a key (primary key - SSN). Each attribute has a domain. Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 6

ER Model Basics (Contd.) did d budget subordinate supervisor Works_In Departments Reports_To Relationship: Association among two or more entities. E.g., Barbara works in the CS department. Relationship Set: Collection of similar relationships. An n-ary relationship set R relates n entity sets E1... En; each relationship in R involves entities e1 E1,..., en En Same entity set could participate in different relationship sets, or in different roles in same set. Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 7 Key Constraints d did budget Consider Works_In: An employee can work in many departments; a dept can have many employees. In contrast, each dept has at most one manager, according to the key constraint on Manages. Manages 1-to-1 1-to Many Many-to-1 Departments Many-to-Many Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 8

Participation Constraints Does every department have a manager? If so, this is a participation constraint: the participation of Departments in Manages is said to be total (vs. partial). Every Departments entity must appear in an instance of the Manages relationship. did d budget Manages Departments Works_In Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 9 Weak Entities A weak entity can be identified uniquely only by considering the primary key of another (owner) entity. Owner entity set and weak entity set must participate in a one-tomany relationship set (one owner, many weak entities). Weak entity set must have total participation in this identifying relationship set. Identifying owner (the way to identify a weak entity) SSN + p (partial key). cost p age Policy Dependents Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 10

ISA (`is a ) Hierarchies Contract_Emps Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 11 As in C++, or other PLs, hourly_wages hours_worked attributes are inherited. ISA contractid If we declare A ISA B, every A entity is also considered to be a B Hourly_Emps entity. Reasons for using ISA: To add descriptive attributes specific to a subclass. To identify entitities that participate in a relationship. Overlap constraints: Can Joe be an Hourly_Emps as well as a Contract_Emps entity? (Allowed/disallowed) No by default Covering constraints: Does every entity also have to be an Hourly_Emps or a Contract_Emps entity? (Yes/no) No by default