Download presentation
Presentation is loading. Please wait.
1
Conceptual data modeling
University of Banja Luka Faculty of Electrical Engineering Conceptual data modeling 9/18/2018
2
Content Introduction Data abstraction Data models E-R model
UML class diagram Comparation of E-R model and UML class diagram Conclusion Conceptual data modeling 9/18/2018
3
Introduction Database design is one of the most important phases of development of database system (i.e. system with a database) The goal of this phase is to obtain a conceptual database schema Poorly organized database can be source of a bad application characteristics, and can lead to frequent, large and often expensive application changes Therefore, a systematic approach and usage of an adequate methodology is a necessity Such methodology should be close to man and his perception of the real world, and must have concepts that are able to represent man’s perceptions of the real world in the form of a conceptual schema on a high level of abstraction First phase of database design is a conceptual modeling, a specification of database structure on a high level of abstraction Conceptual data modeling 9/18/2018
4
Data abstraction Database systems support three levels of data abstraction (ANSI/SPARC database architecture, ): Physical level. The physical level describes how the data are actually stored on the physical medium, with the goal to implement more efficient data access. Logical level. Logical (conceptual) level describes the logical structure of the entire database. View level. Many users of the database system need to access only a part of the database. The view level of abstraction exists to simplify their interaction with the system. Conceptual data modeling 9/18/2018
5
Data abstraction Physical level Logical level View 2 View 1 View n
. . . View level (local logical level) (global logical level) (how the data are actually stored) Conceptual data modeling 9/18/2018
6
Data models Data model is a collection of conceptual tools for describing data, data relationships, data semantics, and consistency constraints Models that use concepts that are close to man are called high level models or conceptual models The most often used such model is Entity-Relationship (ER) model Models that describe how data are actually stored on secondary storage devices are called physical data models or low level models Between conceptual and physical models there is a class of representational (or implementational) data models that use concepts that are close to man, and also represent how the data are organized in database Conceptual data modeling 9/18/2018
7
E-R model Concept of E-R data model is simple and intuitive
E-R model is based on a perception of a real world that consists of a collection of basic objects, called entities, and of relationships among these objects E-R model is very useful in mapping the meanings and interactions of real-world enterprises onto a conceptual schema which can be represented by a graphical notation called E-R diagram Conceptual data modeling 9/18/2018
8
Basic concepts Entity is a “thing” or “object” in the real world that is distinguishable from all other objects Every entity has a set of properties which are in E-R model represented by a set of attributes Relationship is an association among several entities Most of the relationships are binary Key is a set of one or more attributes that, taken collectively, allow us to identify uniquely an entity/relationship in the entity set/relationship set Conceptual data modeling 9/18/2018
9
E-R model symbols entity type / set attribute primary key
Е entity type / set A attribute A primary key A multivalued attribute R A derived attribute relationship type / set discriminating attribute of weak entity type Е weak entity type / set A R identifying relationship type / set R m .. n Е cardinality limits total participation of entity type in relationship role- name R Е R Е role indicator R R 1:1 relationship type 1:M relationship type R R M:1 relationship type M:M relationship type Conceptual data modeling 9/18/2018
10
E-R model symbols superclass/subclass relationship type disjoint
(specialization/ generalization) disjoint specialization/ generalization ISA ISA disjoint total specialization/ generalization ISA union union/category Е1 R1 Е2 aggregation R2 Е3 Conceptual data modeling 9/18/2018
11
Alternative E-R notations
Entities and attributes Relationships and cardinality mappings E a) b) c) A1# A2 A3 … Е A1 A2 A3 … Е A1# A2 A3 … 1 N 1 N 1 N Elmasri / Navathe notation A1 Е A2 (0,N) (0,1) (0,N) (1,1) (1,N) (0,1) . . . A3 Min / max notation Batini / Ceri / Navathe notation “Crow’s foot” notation IE / IDEF1X notations. Oracle notation Entity type/set E and attributes A1 (primary key), A2, A3 …. Notation with arrows Generalization and specialization C C C d o S1 S2 S3 S1 S2 S2 S1 S2 S3 Elmasri / Navathe notation Batini / Ceri / Navathe notation IE (Information Engineering) notation Conceptual data modeling 9/18/2018
12
Example (conceptual schema for University database)
FirstName LastName Address Id BirthDate PERSON GPA Grade ISA Title disjoint SAddress Salary PROFESSOR STUDENT TAKES Semester Semester ENROLS TEACHES REG. Address Type Phone FName COURSE C_D DEPARTMENT BEL. FACULTY Duration DId ExamDate CourseNo ECTS ECTS Title DName OF EXAM Room Conceptual data modeling 9/18/2018
13
Example (conceptual schema for University database)
Conceptual data modeling 9/18/2018
14
UML class diagrams Unified Modeling Language (UML) provides graphical means for visualization, specification, design, and documentation of models of a software systems UML can be used for business modeling and modeling of other non-software systems too UML class diagram is a stucture diagram which shows structure of the system by showing classes and the relationships among the classes Class diagram is the most widely used diagram in modeling object-oriented system It can be used for conceptual modeling, although standard notation is not adjusted for that purpose Conceptual data modeling 9/18/2018
15
Basic concepts Main concepts of the class diagrams are:
Classes Associations Class is a descriptor which describes a set of objects (entities) that share the same properties, behaviour and relationships with other objects (entities) Association is a relationship between several classes Conceptual data modeling 9/18/2018
16
Basic concepts (examples)
association with specified multiplicity 1..* 1 symmetric association asymmetric association aggregation composition generalization association with association class ternary association Conceptual data modeling 9/18/2018
17
Example (conceptual schema for University database)
Conceptual data modeling 9/18/2018
18
Comparation of E-R model and UML class diagram
Classes are equivalent to the entity types Association concept is equivalent to the concept of relationship Standard UML does not have symbols to specify primary key attributes. In literature, often used specification of primary key is stereotype or {PK} constraint. Standard UML also does not have means to specify other E-R concepts like weak entity types, composite attributes, etc. Composition can be used to represent composite attributes of the class Conceptual data modeling 9/18/2018
19
Comparation of E-R model and UML class diagram
Multiplicity of the association’s end specifies not only the cardinality mapping but also the participation cardinality In n-ary associations, we can not draw a conclusion about partiticipation cardinalities of the classes E-R concept of aggregation is not supported in UML class diagram Specialization constraints on class diagrams are modeled using constraints: {disjoint}, {operlapping}, {complete}, and {incomplete} Conceptual data modeling 9/18/2018
20
Conclusion First phase of database design is a conceptual modeling
The most often used model for conceptual data modeling is E-R model Due to intense development and increasing use of UML in all stages of software system life cycle, class diagram is often used during the database design phase, although standard notation is not adjusted for that purpose In practice, standard UML notation can be adjusted for conceptual data modeling by using different profiles At our faculty, both notations are used, but with increasing use of UML class diagrams in student projects and diploma thesis Conceptual data modeling 9/18/2018
21
Q&A Conceptual data modeling 9/18/2018
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.