DATA SCIENCE MIS0855 | Spring 2016 Designing Data

Slides:



Advertisements
Similar presentations
ER Modeling Case Studies
Advertisements

ER Modeling Case Studies
BUSINESS DRIVEN TECHNOLOGY Plug-In T4 Designing Database Applications.
Data Design The futureERD - CardinalityCODINGRelationshipsDefinition.
ENTITY RELATIONSHIP MODELLING
Copyright © 2015 Pearson Education, Inc. Database Design Chapters 17 and
ISP 121 Access Normalization and Relationships. Normalization Say we’re operating a pet day-care and we need to keep information on our pets/customers.
Agenda for Week 1/31 & 2/2 Learn about database design
Entity-Relationship Model and Diagrams (continued)
Entity-Relationship Modelling Introduced by Chen in 1976 The ER Model is used to construct the conceptual data model – independent of DBMS Most widely.
Database Design Chapter 2. Goal of all Information Systems  To add value –Reduce costs –Increase sales or revenue –Provide a competitive advantage.
Entity/Relationship Modelling
APPENDIX C DESIGNING DATABASES
Data Modeling 1 Yong Choi School of Business CSUB.
MIS2502: Data Analytics Relational Data Modeling
MS Access 2007 IT User Services - University of Delaware.
 An entity-relationship (ER) diagram is a specialized graphic that illustrates the interrelationships between entities in a database.  An Entity Relationship.
Chapter 5 Database Processing.
Database Design Concepts
CSE 441: Systems Analysis & Design
Module Title? Data Base Design 30/6/2007 Entity Relationship Diagrams (ERDs)
1 Chapter 1 Overview of Database Concepts. 2 Chapter Objectives Identify the purpose of a database management system (DBMS) Distinguish a field from a.
Relational databases and third normal form As always click on speaker notes under view when executing to get more information!
CHAPTER 8: MANAGING DATA RESOURCES. File Organization Terms Field: group of characters that represent something Record: group of related fields File:
MIS 301 Information Systems in Organizations Dave Salisbury ( )
MIS 301 Information Systems in Organizations Dave Salisbury ( )
Lecturer: Gareth Jones. How does a relational database organise data? What are the principles of a database management system? What are the principal.
Copyright 2008 McGraw-Hill Ryerson 1 TECHNOLOGY PLUG-IN T5 DESIGNING DATABASE APPLICATIONS.
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Plug-In T5: Designing Database Applications Business Driven Technology.
Databases. Not All Tables Are Created Equal Spreadsheets use tables to store data and formulas associated with that data The “meaning” of data is implicit.
Information Systems & Databases 2.2) Organisation methods.
1 Entity-Relationship Diagram. 2 Components of ERD: –Entity –Relationship –Cardinality –Attributes.
MS Access. Access is a DBMS/RDMS DBMS = Database Management System RDMS = Relational Database Management System.
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.
IT 21103/41103 System Analysis & Design. Chapter 04 Data Modeling.
Relational Theory and Design
Concepts of Database Management Seventh Edition Chapter 1 Introduction to Database Management.
Lesson 2: Designing a Database and Creating Tables.
MIS 301 Information Systems in Organizations Dave Salisbury ( )
MIS2502: Data Analytics Relational Data Modeling
1 DATABASE TECHNOLOGIES (Part 2) BUS Abdou Illia, Fall 2015 (September 9, 2015)
Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin APPENDIX C DESIGNING DATABASES APPENDIX C DESIGNING DATABASES.
Entity-Relationship Diagram Presentation Gianna-lee Williams 6AQ Ms. Anderson.
Understand Relational Database Management Systems Software Development Fundamentals LESSON 6.1.
EntityRelationshipDiagrams. Entity Relationship Models The E-R (entity-relationship) data model views the real world as a set of basic objects (entities)
MIS2502: Data Analytics Relational Data Modeling David Schuff
Database Design. Database Design Process Data Model Requirements Application 1 Database Requirements Application 2 Requirements Application 4 Requirements.
Howard Paul. Sequential Access Index Files and Data File Random Access.
1 Information System Analysis Topic-3. 2 Entity Relationship Diagram \ Definition An entity-relationship (ER) diagram is a specialized graphic that illustrates.
Microsoft Access 2010 Chapter 11 Database Design.
Data Modeling AND ER MODELS.
Databases Databases are collections of information; our study repeats a theme: Tell the computer the structure, and it can help you! © 2004, Lawrence Snyder.
Data Modeling and Entity-Relationship Model I
Database (Microsoft Access). Database A database is an organized collection of related data about a specific topic or purpose. Examples of databases include:
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.
Database Designsemester Slide 1 Database Design Lecture 7 Entity-relationship modeling Text , 7.1.
2b. Create an Access Database Lingma Acheson Department of Computer and Information Science IUPUI CSCI N207 Data Analysis with Spreadsheets 1.
Database Design Chapters 17 and 18.
Entity/Relationship Modelling
Data Model Basic Building Blocks
Revised: 2 April 2004 Fred Swartz
Databases Chapter 16.
© 2014 by McGraw-Hill Education. This is proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner.
© The McGraw-Hill Companies, All Rights Reserved APPENDIX C DESIGNING DATABASES APPENDIX C DESIGNING DATABASES.
DESIGNING DATABASE APPLICATIONS
MIS2502: Data Analytics Relational Data Modeling
MIS2502: Data Analytics Relational Data Modeling
MIS2502: Data Analytics Relational Data Modeling 2
Presentation transcript:

DATA SCIENCE MIS0855 | Spring 2016 Designing Data SungYong Um sungyong.um@temple.edu

Pivot Table Data Use a Flat File Structure EmpNo Ename DeptNo DeptName Date Expenses 101 Abigail 10 Marketing Jan 2014 $1,000 102 Bob 20 Purchasing $500 103 Carolyn $1,500 Feb 2014 $250 $900 Mar 2014 $400 $1,750 $2,000

All related data is in the same column EmpNo Ename DeptNo DeptName Date Expenses 101 Abigail 10 Marketing Jan 2014 $1,000 102 Bob 20 Purchasing $500 103 Carolyn $1,500 Feb 2014 $250 $900 Mar 2014 $400 $1,750 $2,000

This allows you to aggregate data by column value How many people work in marketing? How much did Abigail expense in January through March? Who expensed the most in March? Which month had the greatest amount expensed? EmpNo Ename DeptNo DeptName Date Expenses 101 Abigail 10 Marketing Jan 2014 $1,000 102 Bob 20 Purchasing $500 103 Carolyn $1,500 Feb 2014 $250 $900 Mar 2014 $1,750 $2,000

Relational Data Model Data Model: a formal way to express data relationships to a database Relational Data Model: a type of model that represents its information in the form of logically-related 2-D tables The most common, intuitive, de facto model consists of Entities, Attributes, and Relationships Entity-Relationship Diagram (ERD) 5

Entities and Attributes (1/2) Entity, aka table, is an object or event about which information is stored. Object: e.g. Customer, Product, Employee, Factory Event: e.g. Order, Registration, Contract, Payment A company is usually not an entity unless a database stores information of multiple companies. Attributes, aka fields or columns, are characteristics or proper- ties of an entity. A customer (entity) can be described by customer number, name, address, phone number (attributes). 6

Entities and Attributes (2/2) How to distinguish between Entity and Attribute? An Attribute is a characteristic or property of an Entity. An Attribute becomes a column of a Table. 7

Instances An entity consists of multiple Instances, aka records or rows.

Entity Attribute Instance

Entity Identifier (Primary Key) Entity Identifier, aka primary key, is an attribute that ensures each instance has a unique value that distinguishes it from every other instance. Every entity must have an entity identifier. TUID # Social Security # Plate # other examples? 10

How to draw Entities and Attributes (1/2) Entity Identifier

How to draw Entities and Attributes (2/2) Entity Identifier Entity Customer Order Item Distributor Customer Number First Name Last Name Street City State Zip Code Phone Number Credit Card # Credit Card Exp. Order Number Customer Number Order Date Order Filled Item Number Title Distributor # Price Release Date Genre Distributor # Name Street City State Zip Code Phone Number Contact Name Contact Phone Attributes

Example SportTech Events puts on athletic events for local high school athletes. The company needs a database designed to keep track of the sponsor for the event and where the event is located. Each event needs a description, date, and cost. Separate costs are negotiated for each event. The company would also like to have a list of potential sponsors that includes each sponsor’s contact information such as the name, phone number, and address. Each event will have a single sponsor, but a particular sponsor may sponsor more than one event. Each location will need an ID, contact person, and phone number. A particular event will use only one location, but a location may be used for multiple events.

Event Sponsor Location ID ID Description Date Cost Name Phone Add-ress Contact Phone

Relationship An entity should be related to one or more other entities. Any relationship between the entities below? 15

One-to-One (1:1) Relationship A relationship between two entities in which an instance of entity A can be related to only one instance of entity B and an instance of entity B can be related to only one instance of entity A. Name of relationship usually with a verb 16

One-to-Many (1:M) Relationship A relationship between two entities, in which an instance of entity A can be related to one or more instances of entity B and an instance of entity B can be related to only one instance of entity A. 17

Many-to-Many (M:N) Relationship A relationship between two entities, in which an instance of entity A can be related to one or more instances of entity B and an instance of entity B can be related to one or more instances of entity A. 18

Event Sponsor Location ID ID Description Date Cost Name Support M 1 Phone M Add-ress Host 1 Location ID Contact Phone

Relationship Depends on Business Rules There is no right answer in relationship types. It depends on business descriptions and rules. If a customer can place only one order, it’s 1:1 relationship. If an order can have multiple customers, it’s M:N. 20

Database Normalization (1/2) EmpNo Ename DeptNo DeptName Date Expenses 101 Abigail 10 Marketing Jan 2014 $1,000 102 Bob 20 Purchasing $500 103 Carolyn $1,500 Feb 2014 $250 104 Kevin 30 R&D $900 Mar 2014 $400 $1,750 $2,000

Database Normalization (1/2) EmpNo Ename DeptNo DeptName Date Expenses 101 Abigail 10 Marketing Jan 2014 $1,000 102 Bob 20 Purchasing $500 103 Carolyn $1,500 Feb 2014 $250 104 Kevin 30 R&D $900 Mar 2014 $400 $1,750 $2,000 There are too many redundant data (Department name, employee names). What if there are millions of records? Normalization : a process to remove redundant data

Database Normalization (2/2) DeptNo DeptName 10 Marketing 20 Purchasing 30 R&D EmpNo Date Expenses 101 Jan 2014 $1,000 102 $500 103 $1,500 Feb 2014 $250 104 $900 Mar 2014 $400 $1,750 $2,000 EmpNo Ename DeptNo 101 Abigail 10 102 Bob 20 103 Carolyn 104 Kevin 30

Employee Dept Expense EmpNo Ename DeptNo Belong to M 1 Dept Name 1 Make M Expense ExpID Date Expense