DataBase Logic in Business Applications

Slides:



Advertisements
Similar presentations
Conceptual / semantic modelling
Advertisements

Chapter 2.1 V3.1 Napier University Dr Gordon Russell
Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 COS 346 Day 6.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Chapter Five Data Modeling with the Entity-Relationship Model.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 COS 346 Day 6.
Fundamentals, Design, and Implementation, 9/e COS 346 Day 2.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 David M. Kroenke’s Chapter Five: Data Modeling with the Entity-Relationship.
Slides adapted from A. Silberschatz et al. Database System Concepts, 5th Ed. Entity-Relationship Model Database Management Systems I Alex Coman, Winter.
Database Design & ER Diagrams
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 David M. Kroenke’s Chapter Five: Data Modeling with the Entity-Relationship.
DeSiamorewww.desiamore.com/ifm1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
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.
Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 2/1 Copyright © 2004 Please……. No Food Or Drink in the class.
Component 4: Introduction to Information and Computer Science Unit 6: Databases and SQL Lecture 2 This material was developed by Oregon Health & Science.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
DeSiamorePowered by DeSiaMore1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
Msigwaemhttp//:msigwaem.ueuo.com/1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Component 4/Unit 6b Topic II Relational Databases Keys and relationships Data modeling Database acquisition Database Management System (DBMS) Database.
Chapter 2: Entity-Relationship Model
Entity Relationship (E-R) Model
Data Modeling Using the Entity- Relationship (ER) Model
COP Introduction to Database Structures
Entity Relationship Modeling
CSE202 Database Management Systems
Data Modeling Using the ERD
Let try to identify the conectivity of these entity relationship
Logical Database Design and the Rational Model
Entity-Relationship Model
Data Modeling Using the Entity- Relationship (ER) Model
Entity- Relationship (ER) Model
Entity-Relationship Model
TMC2034 Database Concept and Design
Entity Relationship Model
MODELS OF DATABASE AND DATABASE DESIGN
Entity-Relationship Model
Tables and Their Characteristics
Databases and Database Management Systems Chapter 9
Chapter 7: Entity-Relationship Model
Entity-Relationship Modelling
Relational Database Design by ER- and EER-to-Relational Mapping
Outline of the ER Model By S.Saha
Entity-Relationship Modeling
ERD :: 19 / 1 / Entity-Relationship (ER) Modeling. ER Modeling is a top-down approach to database design. Entity Relationship (ER) Diagram –A.
بسم الله الرحمن الرحيم.
Conceptual data modeling
CS 174: Server-Side Web Programming February 12 Class Meeting
Module 8 – Database Design Using the E-R Model
LECTURE 34: Database Introduction
Entity-Relationship Modeling
Entity-Relationship Model
Database Systems: Design, Implementation, and Management Tenth Edition
Entity – Relationship Model
Entity-Relationship Modelling
Data Modeling for Database Design 2
Database Modeling using Entity Relationship Model (E-R Model)
Review of Week 1 Database DBMS File systems vs. database systems
Chapter 3: Modeling Data in the Organization
Chapter 7: Entity-Relationship Model
Database Processing: David M. Kroenke’s Chapter Five:
Entity-Relationship Diagram (ERD)
DBMS ER-Relational Mapping
Database Management system
Database Management system
LECTURE 33: Database Introduction
Entity Relationship (ER) Modeling
Chapter 6b: Database Design Using the E-R Model
Presentation transcript:

DataBase Logic in Business Applications Al.I. Cuza University of Iași Faculty of Economics and Business Administration Department of Accounting, Information Systems and Statistics DataBase Logic in Business Applications Introduction to Data Modeling. Entity-Relationship vs. UML Class Diagrams By Marin Fotache & Co.

Notice All the Oracle Data Modeler diagrams in this presentation are archived and can be downloaded at: https://1drv.ms/u/s!AgPvmBEDzTOSzktYE1J5aVYv NyDW Please download and move the archive into a new folder on your computes Unzip it Each diagram will have its own folder (the folder name is identical with diagram label) The files in archive (base) folder contain domains and data types (if necessary, you might set this folder as default for data types in Oracle Data Modeler)

Types of DataModels in Software Development Source: http://en.wikipedia.org/wiki/Data_model#Patterns

Data Models A model is a vehicle for describing reality Data models describe the structure of persistent (stored) information within an organization area Models assume abstracting, simplification/reduction, and generality Do not confound the model with the reality! Basic modeling tools: Classification Aggregation Generalization A typical confusion in data modeling between: Modeling method (normalization, E-R, Rational Unified Process, ...) and Modeling language (usually UML)

A Few Data Modeling Areas Source: http://www.matthew-west.org.uk/documents/princ03.pdf

Typical Data Modeling Issues Source: http://www.matthew-west.org.uk/documents/princ03.pdf

Data Model Representation Lax Text (Word, Notepad, Notepad++, ...) PowerPoint drawings (diagrams) Rigurous (by diagrams): Entity-Relationship, using notations such as: Chen (original) EER (Enhanced Entity-Relationship) Barker (Oracle Case) IDEF1X IE (Information Engineering) .... UML Stardardized (UML 1.0, 1.1…) Implemented in current modeling applications (Visual Paradigm, ArgoUML, Software Ideas Modeler, ...)

Modeling Approach in This Course Entity-Relationship. For recap of E-R models, methodology, diagrams, see: Entity-Relationship Diagrams: https://www.youtube.com/watch?v=c0_9Y8QAstg&spfreload=10 ER Diagram in DBMS - SKU Database Management System: https://www.youtube.com/watch?v=xAr5BLFMcgo&spfreload=10 Database Lesson #4 of 8 - Data Modeling and the ER Model: https://www.youtube.com/watch?v=IfaqkiHpIjo&spfreload=10 Conceptual Data Modeling with Entity Relationship Diagrams https://www.youtube.com/watch?v=wo-Wyul8CDQ Barker (Oracle Case / Oracle Data Modeler) Notation: Database schema will be designed in ODM and the DDL script or sub-schema will be automatically generated

Basic Concepts of E-R (1) Source: Teorey, T. s.a. – Database Design. Know It All, MK, Amsterdam, 2009 Concept Description Examples Entity Collection of real or abstract objects sharing a series of properties. Different from relational terminology that uses the plural (Students, Books) Student, book, customer, employee, invoice, product Attribute Data item that describes a property of an entity or of a relationship Student_Code, ISBN, Invoice_Date, Price Identifier A single attribute or a set of attributes that takes on unique values for each entity instance Student_Code, ISBN, Transaction_Id Descriptor A non-identifier attribute describing an entity or a relationship Invoice_Date, Genre, Year_of_Study, Master_Programme Composite Group of single (simple) attributes describing a property of an entity or of a relationship Student_Address Multi-valued attribute Entity or relatioship attribute that can take on multiple values for a single entity or relationship instance Article_Tags, Student_Hobbies, Customer_Phones

Basic Concepts of E-R (2) Source: Teorey, T. s.a. – Database Design. Know It All, MK, Amsterdam, 2009 Concept Description Examples Relationship Semantic link between (two or more) entities Teaches, sells, borrows, works_on, manages, pays, requires, evaluates Binary Relationship A relationship between two entities Teaches, sells Recursive Relationship A binary relationship that relates an entity to itself Manages, Is_Managed Ternary Relationship A relationship among three entities. Usually avoided (see row below) Examines_3 (A teacher examines a group of students on a course topics) n-ary Relationship A relationship on more than two entities. Can be replaced by a number of distinct binary relationships. Not supported by most modeling tools (such as ODM) Examines_4 (A teacher examines in a classroom a group of students on a course topics)

Mapping Real World Objects to E-R Concepts Source: http://www.matthew-west.org.uk/documents/princ03.pdf

Cardinality of entities E and F within relationship R Source: Teorey, T. s.a. – Database Design. Know It All, MK, Amsterdam, 2009

E-R Diagrams – Chen notation A faculty member (professor) teaches zero, one, or more course sections/lectures/topics; zero means she/he is retired (consultant) or researcher (no currently teaching) A course section is taught by only one professor; there are no course sections without associated teacher Source: Teorey, T. s.a. – Database Design. Know It All, MK, Amsterdam, 2009

Teaches_1 E-R Diagram in ODM

Teaches_1 Relational Diagram in ODM Attribute type and length added Primary keys Foreign (keys) – in E-R diagrammes foreign keys are not represented (there is no concept of foreign key)

Teaches_1 Relational Diagram in ODM using plurals (for table names)

Recursive Relationship (Chen notation) Each employee has at least zero managers (the case of general manager/CEO) and at most one manager (reports to) A manager could have zero () or more subordinates Source: Teorey, T. s.a. – Database Design. Know It All, MK, Amsterdam, 2009

Recursive Relatioship (manages_1) in ODM)

Relational Schema for Recursive Relatioship (manages_1) in ODM)

E-R concepts not recommended in ODM Relationship attributes (implemented, but not recommended) – they will be included in one of the relationship entities N-ary relationships, where N > 2 (not implemented) Source: Teorey, T. s.a. – Database Design. Know It All, MK, Amsterdam, 2009

E-R concepts not implemented in ODM (cont.) Attribute cardinality Source: Teorey, T. s.a. – Database Design. Know It All, MK, Amsterdam, 2009

Weak Entities A weak entity is an entity whose occurrences are dependent for their existence, through a relationship R, on the occurrence of another (strong) entity. Source: Teorey, T. s.a. – Database Design. Know It All, MK, Amsterdam, 2009

Weak Entity in Orders_1 Diagram

A Relationship Between Two Strong Entities in Orders_1 Diagram

Relationship Between A Strong and A Weak Entity in Orders_1 Diagram

Generated Relational Schema for Orders_1 Diagram

Hierarchy in E-R modeling Source: Teorey, T. s.a. – Database Design. Know It All, MK, Amsterdam, 2009

Hierarchy_1 Diagram in ODM

Declaring entities hierarchy in ODM

Declaring entities hierarchy in ODM (cont.)

Declaring entities hierarchy in ODM (cont.)

Generated Relational Schema for Hierarchy_1 Diagram

An UML Class Diagram

Useful Resources on Oracle Data Modeling Oracle SQL Developer Data Modeler http://www.oracle.com/technetwork/developer- tools/datamodeler/overview/index.html SQL Developer ER diagram sqlvids https://www.youtube.com/watch?v=f80xWJYKJFQ&spfreload =10 Re-engineering Your Database Using Oracle SQL Developer Data Modeler 4.0 (4.2) http://www.oracle.com/webfolder/technetwork/tutorials/obe/db /sqldevdm/r40/mod1_dm_v4/mod1_dm_v4.html Forward and Reverse Engineering Models and Working with Logical Model Diagrams, Displays and Subviews https://apexapps.oracle.com/pls/apex/f?p=44785:24:0::NO: 24:P24_CONTENT_ID,P24_PREV_PAGE:5231,29

Useful Resources on Oracle Data Modeling (cont.) Reverse Engineering your Oracle Database to a Relational Data Model https://www.youtube.com/watch?v=hDwJN3KLXWY Introduction to SQL Developer Data Modeler https://www.youtube.com/watch?v=wsVh1zLmQb0 Using the Database Synchronization Feature https://apexapps.oracle.com/pls/apex/f?p=44785:24:3125138 319327:::24:P24_CONTENT_ID,P24_PROD_SECTION_GRP _ID,P24_PREV_PAGE:5951,,24#prettyPhoto Working with Glossaries http://download.oracle.com/otn_hosted_doc/sqldev/Glossaries /glossaries_viewlet_swf.html 3 Oracle SQL Developer Data Modeler Features to Save Time and Make Fewer Mistakes https://www.youtube.com/watch?v=s5oTpdLfRnU

Two Resources on UML Class Diagrams (not so important for our course) Database design with UML and SQL, 3rd edition http://www.tomjewett.com/dbdesign/dbdesig n.php?page=intro.html Data Modeling With the UML https://www.youtube.com/watch?v=gaAYtta Ebx0&spfreload=10