Copyright Kathy S. Schwaig, 20011 MBA 8473 Kathy S. Schwaig Information Technology.

Slides:



Advertisements
Similar presentations
ER to Relational Mapping. Logical DB Design: ER to Relational Entity sets to tables. CREATE TABLE Employees (ssn CHAR (11), name CHAR (20), lot INTEGER,
Advertisements

Logical DB Design: ER to Relational Entity sets to tables. Employees ssn name lot CREATE TABLE Employees (ssn CHAR (11), name CHAR (20), lot INTEGER, PRIMARY.
Entity-Relationship Modeling (ER-M)
Data Modeling and the Entity-Relationship Model
Data Modeling and the Entity-Relationship Model
Data Modeling and the Entity-Relationship Model Chapter Four DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 3 rd Edition.
1 Database Theoretic Basis Entity Relationship (E-R) Modeling Database Theoretic Basis Entity Relationship (E-R) Modeling.
ENTITY RELATIONSHIP MODELLING
Data Modeling and the Entity-Relationship Model
Data Modeling and the Entity-Relationship Model
Copyright © 2015 Pearson Education, Inc. Database Design Chapters 17 and
D ATABASE S YSTEMS I A DMIN S TUFF. 2 Mid-term exam Tuesday, Oct 2:30pm Room 3005 (usual room) Closed book No cheating, blah blah No class on Oct.
Conceptual Models Agenda - Steps in the design of a DB - Need for conceptual models - The Entity-Relationship Model (ER-Model)
Data Modeling with ERD ISYS 363. Entity-Relationship Diagram An entity is a “thing” in the real world, such as a person, place, event for which we intend.
Entity-Relationship Model and Diagrams (continued)
© 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Data Modeling and the Entity-Relationship Model Chapter Four DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 5 th Edition.
Attribute databases. GIS Definition Diagram Output Query Results.
Relational Databases What is a relational database? What would we use one for? What do they look like? How can we describe them? How can you create one?
Slide 1 Chapter 05 – Part 1 Data Modeling with the Entity-Relationship Model.
Entity/Relationship Modelling
APPENDIX C DESIGNING DATABASES
Data Modeling and Entity- Relationship Model I IST2101.
Data Modeling and the Entity-Relationship Model Chapter Four DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
Data Modeling Using the Entity-Relationship Model
CONCEPTS OF E-R MODEL. CONTENTS Entity Attributes Data Value Entity Types Types of Entity Types Relationships Relationship Constraints.
Chapter 5 Database Processing.
1. 2 Data Modeling 3 Process of creating a logical representation of the structure of the database The most important task in database development E-R.
Database. Basic Definitions Database: A collection of related data. Database Management System (DBMS): A software package/ system to facilitate the creation.
Module Title? Data Base Design 30/6/2007 Entity Relationship Diagrams (ERDs)
SQL Structured Query Language Programming Course.
Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
Data Modeling IST210 Class Lecture.
Entity-Relationship (ER) Modelling ER modelling - Identify entities - Identify relationships - Construct ER diagram - Collect attributes for entities &
1 Entity-Relationship Diagram. 2 Components of ERD: –Entity –Relationship –Cardinality –Attributes.
Lecture 4 Conceptual Data Modeling. Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship,
1 Database & DBMS The data that goes into transaction processing systems (TPS), also goes to a database to be stored and processed later by decision support.
Data modeling using the entity-relationship model Chapter 3 Objectives How entities, tuples, attributes and relationships among entities are represented.
IT 21103/41103 System Analysis & Design. Chapter 04 Data Modeling.
Description and exemplification of entity-relationship modelling.
Data Modelling Using Entity-Relationship (ER) Model
5-1 McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved.
Copyright © Curt Hill Entities and Relationships The basics and what they have to do with database.
INTRODUCTION TO DATABASE DESIGN. Definitions Database Models: Conceptual, Logical, Physical Conceptual: “big picture” overview of data and relationships.
Chapter 3: Modeling Data in the Organization. Business Rules Statements that define or constrain some aspect of the business Assert business structure.
EntityRelationshipDiagrams. Entity Relationship Models The E-R (entity-relationship) data model views the real world as a set of basic objects (entities)
Lecture 5 Entity Relationship Modeling
Data Modeling and Entity-Relationship Model I
DATA SCIENCE MIS0855 | Spring 2016 Designing Data
Rationale Databases are an integral part of an organization. Aspiring Database Developers should be able to efficiently design and implement databases.
DATA MODELING AND ENTITY-RELATIONSHIP MODEL II IST 210: Organization of Data IST210 1.
Database Designsemester Slide 1 Database Design Lecture 7 Entity-relationship modeling Text , 7.1.
Copyright © 2014 Pearson Canada Inc. 5-1 Copyright © 2014 Pearson Canada Inc. Application Extension 5a Database Design Part 2: Using Information Technology.
Entity/Relationship Modelling
Application Extension 5a
Data Modeling and the Entity-Relationship Model
ER model Ashima Wadhwa.
Requirements Become the E-R Data Model
Database Design – Lecture 4
Databases and Information Management
Entity-Relationship Model and Diagrams (continued)
CS 174: Server-Side Web Programming February 12 Class Meeting
Database Fundamentals
Data Modeling and the Entity-Relationship Model
Database Design Chapters 17 and 18.
Databases and Information Management
Lesson Objectives Aims You should know about: 1.3.2:
Entity Relation Model Tingting Zhang.
ER MODELING Instructor: SAMIA ARSHAD
Data Modeling and the Entity-Relationship Model
Presentation transcript:

Copyright Kathy S. Schwaig, MBA 8473 Kathy S. Schwaig Information Technology

Copyright Kathy S. Schwaig, Database Design Steps User Requirements Conceptual Design (E.g. entity-relationship model) Logical Design (E.g. relational model) Physical Design (optimize for performance)

Copyright Kathy S. Schwaig, Database requirements from user User view: part of database important to user Difficult! Why? User Requirements

Copyright Kathy S. Schwaig, Conceptual Design Entity-Relationship Model Entity A “thing” of interest. May be tangible (employee) or intangible (banking transaction). E.g. employee, department, manager, customer. Attributes -- properties or characteristics. Key Each entity must be uniquely identified by an attribute or group of attributes called a key. E.g.: Employee: [EMP#, name, address, phone#]

Copyright Kathy S. Schwaig, Order number Order date Item number QuantityAmount /08/ Key field This record describes the entity called ORDER and its attributes. The specific values for order number, order date, item number, quantity, and amount for this particular order are the fields for this record. Order number is the key field because each order is assigned a unique identification number. Order : [Order number, order date, item number, quantity, amount] Attributes ENTITY = ORDER

Copyright Kathy S. Schwaig, An association between entities. E.g. Managers manage Employees Cardinalities indicate the number of each entity that may participate in the relationship. One to one (1:1) One to many (1:N) Many to many (N:M) M:N relationships may have relationship attributes. E.g. Employees assigned-to Projects:[length-of-time] N : M Relationship

Copyright Kathy S. Schwaig, Entity- Relationship Diagram Each entity represented by a rectangle. Each relationship represented by a diamond. Attributes shown in ovals. Cardinalities next to entities

Copyright Kathy S. Schwaig, E-R Diagram StudentCourse SSNname address gradeCourse# description assigned to NM

Copyright Kathy S. Schwaig, You have been asked to create a database for a small consulting company. The company wants to keep track of which employees are assigned to which project and what dates they start and stop working on them. An employee can work on more than one project at a time (as any MBA student knows). You also need to keep track of which client sponsors which project(s). Each project usually requires a set of skills so you need to know what skills an employee has and when he or she obtained them. Employees are encouraged to find clients and receive extra compensation for doing so. Consulting Company Database

Copyright Kathy S. Schwaig, Project Employee Emp# Client Client-Id sponsors finds start-date end-date Project# has date acquired Skill requires Skill- name M N M N l N M N 1 N assigned to

Copyright Kathy S. Schwaig, Entities Employee : [Emp#, name, address, dob, hourly-rate] Client : [Client-Id, name, phone, date-signed] Skill : [Skill-name, description] Project : [Project#, name, date-began, date-completed] Consulting Company Database Entity-Relationship Model

Copyright Kathy S. Schwaig, Relationships Employee finds Client 1 : N Client sponsors Project 1 : N Employee has Skill : [date-acquired] N : M Project requires Skill N : M Employee assigned-to Project : [start-date, end-date] N : M Consulting Company Database Entity-Relationship Model (cont’d)

Copyright Kathy S. Schwaig, Relational Data Model One basic construct: the relation. Relations represent both entities and relationships. Data Manipulation Language: English-like. Dominant database structure. DB2 by IBM ACCESS by Microsoft ORACLE

Copyright Kathy S. Schwaig, Translate E-R Model into Relational Model Each entity represented by an (entity) relation N:M relationship represented by a separate (relationship) relation Key is concatenation (joining together) of entity keys. Relationship attributes are non keys. 1:N relationship represented by foreign key, i.e. key of entity on “1” side appears as non key in relation for the entity on the “N” side.

Copyright Kathy S. Schwaig, Example: Student-Course Design a database to keep track of what courses a student takes and the grade he or she receives. Entities: Student: [SSN, name, address] Course: [Course-Id, description] Relationships:Student takes Course: [grade] N : M

Copyright Kathy S. Schwaig, Student Relation Course Relation

Copyright Kathy S. Schwaig, Takes Relation

Copyright Kathy S. Schwaig, Employee : [Emp#, name, address, dob, hourly-rate] Client : [Client-Id, name, phone, date-signed, emp#] Project : [Project#, name, date-began, date-completed, client-id] Skill : [Skill-name, description] Has-skill : [Emp#, Skill-name, date-acquired] Requires : [Project#, Skill-name] Assigned : [Emp#, Project#, start-date, end-date] Consulting Company Relational Model

Copyright Kathy S. Schwaig,

Copyright Kathy S. Schwaig,

Copyright Kathy S. Schwaig, SQL Query SELECTcolumns FROMtables WHEREconditions ORDER BYcolumns What date was the project called “Metro” completed? Select date-completed From project Where name=‘Metro’ Answer: 1 Mar 1999

Copyright Kathy S. Schwaig, SQL Query What is the name of the client who sponsors the project called “Pontiac”? Select client.name From client, project Where project.name=‘Pontiac’ and project.client-id=client.client-id Answer: Ed Edwards

Copyright Kathy S. Schwaig, What skills are required for the project called “Virtual Courtyard”? SELECT requires.skill-name FROM requires, project WHERE project.name= ‘Virtual Courtyard’ and requires.project# = project.project# Answer: Electronic Commerce Data Mining SQL Query