1 CSE323 การวิเคราะห์และออกแบบระบบ (Systems Analysis and Design) Lecture 05: Data Modeling and Analysis.

Slides:



Advertisements
Similar presentations
Developing ER-Diagram
Advertisements

Alternative Approach to Systems Analysis Structured analysis
Data & Process Modeling
Data Base Design. D ATA M ODELING  Database modeling is the first step to design a complex database  Entity relationship diagram (ERD) – a data model.
Copyright Irwin/McGraw-Hill Data Modeling Prepared by Kevin C. Dittman for Systems Analysis & Design Methods 4ed by J. L. Whitten & L. D. Bentley.
Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
ISYS114 Data Modeling and Entity Relationship Diagrams
System Analysis - Data Modeling
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Agenda for Week 1/31 & 2/2 Learn about database design
Review Questions What is data modeling? What is the actual data model that is created called? Data modeling is a technique for organizing and documenting.
Irwin/McGraw-Hill Copyright © 2000 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS5th Edition.
DATA MODELING AND ANALYSIS Pertemuan 13 – 14 Matakuliah: D0584/Analisis Sistem Informasi Tahun : 2008.
Data Modeling Yong Choi School of Business CSUB. Part # 2 2 Database Collection of data in electronic format – A digital library of organization Managed.
Entity Relationship Diagrams
Data Modeling Entity - Relationship Models. Models Used to represent unstructured problems A model is a representation of reality Logical models  show.
Irwin/McGraw-Hill Copyright © 2000 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS5th Edition.
Bina Nusantara 8 C H A P T E R DATA MODELING AND ANALYSIS.
Fundamentals, Design, and Implementation, 9/e COS 346 Day 2.
Lesson-19 Data Modeling and Analysis
Chapter 4 Entity Relationship (ER) Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
Assistant Professor MIS Department UNLV
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Supplemental Material Data Modeling and Analysis.
Modern Systems Analysis and Design Third Edition
BIS310: Week 7 BIS310: Structured Analysis and Design Data Modeling and Database Design.
Introduction to Entity-Relationship Diagrams, Data Flow Diagrams, and UML Todd Bacastow Penn State University Geography 583 Geospatial System Analysis.
Training of master Trainers Workshop e-Services Design and Delivery
Irwin/McGraw-Hill Copyright © 2004 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS6th Edition.
Assistant Professor MIS Department UNLV
2131 Structured System Analysis and Design
Copyright Irwin/McGraw-Hill Data Modeling Introduction  The presentation will address the following questions:  What is systems modeling and what.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
3.1 CSIS 3310 Chapter 3 The Entity-Relationship Model Conceptual Data Modeling.
CSE314 Database Systems Data Modeling Using the Entity- Relationship (ER) Model Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson Ed Slide Set.
Irwin/McGraw-Hill Copyright © 2000 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS5th Edition.
Chapter 7 Data Modeling with Entity Relationship Diagrams Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition.
Chapter 4 The Relational Model.
Sample Entity Relationship Diagram (ERD)
Irwin/McGraw-Hill Copyright © 2004 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS6th Edition.
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 2/1 Copyright © 2004 Please……. No Food Or Drink in the class.
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
DATABASEMODELSDATABASEMODELS  A database model ◦ defines the logical design of data. ◦ Describes the relationships between different parts of data.
INFORMATION AND DATABASES Part 1. LEARNING OBJECTIVES The importance of high-quality information and issues involved in managing business data. Advantages.
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
1 Chapter 11 Entity-Relationship Modeling Transparencies Last Updated: 25 April 2011 By M. Arief
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
Chapter 4 Entity Relationship (ER) Modeling.  ER model forms the basis of an ER diagram  ERD represents conceptual database as viewed by end user 
Chapter 12 Entity-Relationship Modeling Pearson Education © 2009.
Lecture 4 Conceptual Data Modeling. Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship,
Database Design – Lecture 5 Conceptual Data Modeling – adding attributes.
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
IFS310: Module 6 3/1/2007 Data Modeling and Entity-Relationship Diagrams.
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 4 Entity Relationship (ER) Modeling.
Databases Illuminated Chapter 3 The Entity Relationship Model.
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 4 ENTITY RELATIONSHIP (ER) MODELING Instructor Ms. Arwa Binsaleh 1.
1 Database Systems Entity Relationship (E-R) Modeling.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Levels of Database Modeling High degree of abstraction Conceptual model User view 1 User view 2 Implementa- tion model Physical model Medium degree of.
Database Design, Application Development, and Administration, 6 th Edition Copyright © 2015 by Michael V. Mannino. All rights reserved. Chapter 5 Understanding.
1 Documenting Solutions Todd Bacastow Penn State University Geog 468 GIS Analysis & Design.
Data Modeling Using the Entity- Relationship (ER) Model
Data Modeling and Analysis
Entity-Relationship Modeling
Lecture on Data Modeling and Analysis
Review of Week 1 Database DBMS File systems vs. database systems
Entity-Relationship Diagram (ERD)
Presentation transcript:

1 CSE323 การวิเคราะห์และออกแบบระบบ (Systems Analysis and Design) Lecture 05: Data Modeling and Analysis

Data Modeling and Analysis 2

Objectives  Define data modeling and explain its benefits.  Recognize and understand the basic concepts and constructs of a data model.  Read and interpret an entity relationship data model.  Explain when data models are constructed during a project and where the models are stored.  Discover entities and relationships.  Construct an entity-relationship context diagram.  Discover or invent keys for entities and construct a key-based diagram.  Construct a fully attributed entity relationship diagram and describe data structures and attributes to the repository.  Normalize a logical data model to remove impurities that can make a database unstable, inflexible, and nonscalable.  Describe a useful tool for mapping data requirements to business operating locations. 3

4 Data Modeling Data modeling Data modeling – a technique for organizing and documenting a system ’ s data. Sometimes called database modeling. Entity relationship diagram (ERD) Entity relationship diagram (ERD) – a data model utilizing several notations to depict data in terms of the entities and relationships described by that data.

5 Sample Entity Relationship Diagram (ERD)

6  Persons:  Persons: agency, contractor, customer, department, division, employee, instructor, student, supplier.  Places:  Places: sales region, building, room, branch office, campus.  Objects  Objects: book, machine, part, product, raw material, software license, software package, tool, vehicle model, vehicle.  Events:  Events: application, award, cancellation, class, flight, invoice, order, registration, renewal, requisition, reservation, sale, trip.  Concepts  Concepts: account, block of time, bond, course, fund, qualification, stock. Data Modeling Concepts: Entity Entity – a class of persons, places, objects, events, or concepts about which we need to capture and store data.  Named by a singular noun

7 Data Modeling Concepts: Entity Entity instance Entity instance – a single occurrence of an entity. Student IDLast NameFirst Name 2144ArnoldBetty 3122TaylorJohn 3843SimmonsLisa 9844MacyBill 2837LeathHeather 2293WrenchTim instances entity

8 Data Modeling Concepts: Attributes Attribute Attribute – a descriptive property or characteristic of an entity. Synonyms include element, property, and field.  Just as a physical student can have attributes, such as hair color, height, etc., data entity has data attributes Compound attribute Compound attribute – an attribute that consists of other attributes. Synonyms in different data modeling languages are numerous: concatenated attribute, composite attribute, and data structure.

9 Data Modeling Concepts: Data Type Data type – a property of an attribute that identifies what type of data can be stored in that attribute. Representative Logical Data Types for Attributes Data TypeLogical Business Meaning NUMBER Any number, real or integer. TEXT A string of characters, inclusive of numbers. When numbers are included in a TEXT attribute, it means that we do not expect to perform arithmetic or comparisons with those numbers. MEMO Same as TEXT but of an indeterminate size. Some business systems require the ability to attach potentially lengthy notes to a give database record. DATE Any date in any format. TIME Any time in any format. YES/NO An attribute that can assume only one of these two values. VALUE SET A finite set of values. In most cases, a coding scheme would be established (e.g., FR=Freshman, SO=Sophomore, JR=Junior, SR=Senior). IMAGE Any picture or image.

10 Data Modeling Concepts: Domains Domain – a property of an attribute that defines what values an attribute can legitimately take on. Representative Logical Domains for Logical Data Types Data TypeDomainExamples NUMBER For integers, specify the range. For real numbers, specify the range and precision. {10-99} { } TEXT Maximum size of attribute. Actual values usually infinite; however, users may specify certain narrative restrictions. Text(30) DATE Variation on the MMDDYYYY format. MMDDYYYY MMYYYY TIME For AM/PM times: HHMMT For military (24-hour times): HHMM HHMMT HHMM YES/NO {YES, NO} {YES, NO} {ON, OFF} VALUE SET {value#1, value#2, … value#n} {table of codes and meanings} {M=Male F=Female}

11 Data Modeling Concepts: Default Value Default value – the value that will be recorded if a value is not specified by the user. Permissible Default Values for Attributes Default ValueInterpretationExamples A legal value from the domain For an instance of the attribute, if the user does not specify a value, then use this value NONE or NULL For an instance of the attribute, if the user does not specify a value, then leave it blank. NONE NULL Required or NOT NULL For an instance of the attribute, require that the user enter a legal value from the domain. (This is used when no value in the domain is common enough to be a default but some value must be entered.) REQUIRED NOT NULL

12 Data Modeling Concepts: Identification Key – an attribute, or a group of attributes, that assumes a unique value for each entity instance. It is sometimes called an identifier. composite key, compound  Concatenated key - group of attributes that uniquely identifies an instance. Synonyms: composite key, compound key. candidate identifier  Candidate key – one of a number of keys that may serve as the primary key. Synonym: candidate identifier.  Primary key – a candidate key used to uniquely identify a single entity instance. secondary key  Alternate key – a candidate key not selected to become the primary key. Synonym: secondary key.

13 Subsetting criteria Subsetting criteria – an attribute(s) whose finite values divide all entity instances into useful subsets. Sometimes called an inversion entry. Data Modeling Concepts: Subsetting Criteria

14 Data Modeling Concepts: Relationships Relationship Relationship – a natural business association that exists between one or more entities. The relationship may represent an event that links the entities or merely a logical affinity that exists between the entities.

15 Data Modeling Concepts: Cardinality Cardinality Cardinality – the minimum and maximum number of occurrences of one entity that may be related to a single occurrence of the other entity. Because all relationships are bidirectional, cardinality must be defined in both directions for every relationship. bidirectional

16 Cardinality Notations

17 Data Modeling Concepts: Degree Degree Degree – the number of entities that participate in the relationship. A relationship between two entities is called a binary relationship. A relationship between three entities is called a 3- ary or ternary relationship. A relationship between different instances of the same entity is called a recursive relationship.

18 Data Modeling Concepts: Degree Relationships may exist between more than two entities and are called N-ary relationships. The example ERD depicts a ternary relationship.

19 Data Modeling Concepts: Degree Associative entity – an entity that inherits its primary key from more than one other entity (called parents). Each part of that concatenated key points to one and only one instance of each of the connecting entities. Associative Entity

20 Data Modeling Concepts: Recursive Relationship Recursive relationship - a relationship that exists between instances of the same entity

21 Data Modeling Concepts: Foreign Keys Foreign key Foreign key – a primary key of an entity that is used in another entity to identify instances of a relationship.  A foreign key is a primary key of one entity that is contributed to (duplicated in) another entity to identify instances of a relationship.  A foreign key always matches the primary key in the another entity  A foreign key may or may not be unique (generally not)  The entity with the foreign key is called the child.  The entity with the matching primary key is called the parent.

22 Data Modeling Concepts: Parent and Child Entities Parent entity Parent entity - a data entity that contributes one or more attributes to another entity, called the child. In a one-to- many relationship the parent is the entity on the "one" side. Child entity Child entity - a data entity that derives one or more attributes from another entity, called the parent. In a one- to-many relationship the child is the entity on the "many" side.

23 Data Modeling Concepts: Foreign Keys Student IDLast NameFirst NameDorm 2144ArnoldBettySmith 3122TaylorJohnJones 3843SimmonsLisaSmith 9844MacyBill 2837LeathHeatherSmith 2293WrenchTimJones DormResidence Director SmithAndrea Fernandez JonesDaniel Abidjan Primary Key Foreign Key Duplicated from primary key of Dorm entity (not unique in Student entity)

24 Nonidentifying Relationships Nonidentifying relationship – relationship where each participating entity has its own independent primary key  Primary key attributes are not shared.  The entities are called strong entities

25 Identifying Relationships Identifying relationship – relationship in which the parent entity ’ key is also part of the primary key of the child entity.  The child entity is called a weak entity.

26 Data Modeling Concepts: Sample CASE Tool Notations

27 Nonspecific Relationships

28 Resolving Nonspecific Relationships

29 Resolving Nonspecific Relationships(continued)

30 Resolving Nonspecific Relationships(continued)

31 Data Modeling Concepts: Generalization Generalization Generalization – a concept wherein the attributes that are common to several types of an entity are grouped into their own entity. Supertype Supertype – an entity whose instances store attributes that are common to one or more entity subtypes. Subtype Subtype – an entity whose instances may inherit common attributes from its entity supertype And then add other attributes unique to the subtype.

32 Generalization Hierarchy

33 Next Lecture: Object-Oriented Systems Analysis and Design using UML