What is Domain Model and Conceptual Classes?. Tutorial

LEARN TO ACHIEVE GOAL
21 Nov 202022:44

Summary

TLDRIn this educational video, the presenter introduces the concept of domain models, focusing on their role in software design. Using UML class diagram notation, the video explains the difference between conceptual classes and software artifacts, emphasizing that domain models should reflect real-world entities and relationships, not software-specific constructs. The script guides viewers through creating a domain model, illustrating how to define conceptual classes, their attributes, and associations. It also highlights common mistakes, such as confusing attributes with classes, and provides examples to clarify these concepts, aiming to enhance understanding of domain modeling in software development.

Takeaways

  • πŸ˜€ Domain models are visual representations of conceptual classes, distinct from software classes.
  • πŸ“š The video introduces chapter nine focusing on domain models, starting with an example in Figure 9.1.
  • πŸ“Š Figure 9.2 illustrates a partial domain model using UML class diagram notation, highlighting attributes and associations.
  • πŸ”— Associations in domain models are represented by lines linking classes, indicating relationships between them.
  • 🚫 Domain models exclude software artifacts to focus on real-world concepts, such as 'sales database' being a software artifact, not part of the domain model.
  • πŸ’‘ Conceptual classes are ideas, things, or objects, and are the building blocks of a domain model, representing real-world entities.
  • 🎯 The purpose of a domain model is to understand the vocabulary and key concepts of a system, facilitating better system comprehension.
  • πŸ› οΈ To create a domain model, one should identify conceptual classes from different categories and represent them with attributes and associations.
  • πŸ“ An important guideline is to differentiate between attributes and classes to avoid common mistakes, ensuring clarity in the model.
  • πŸ” The video provides examples and guidelines on how to correctly represent relationships and avoid misrepresenting real-world entities as software artifacts in domain models.

Q & A

  • What is the main topic of chapter nine in the video?

    -The main topic of chapter nine in the video is 'Domain Models'.

  • What is the difference between a domain model and a class diagram?

    -In a domain model, only attributes are shown, while a class diagram includes both attributes and operations or methods.

  • What are the lines and links between classes in a domain model called?

    -The lines and links between classes in a domain model are called associations.

  • What is a domain model according to the video?

    -A domain model is a visual representation of conceptual classes, also known as conceptual models.

  • Why are software artifacts not included in a domain model?

    -Software artifacts are not included in a domain model because a domain model represents real-world concepts, not software classes or artifacts.

  • What is a conceptual class?

    -A conceptual class is an idea, thing, or object that is abstract and not tied to software implementation.

  • What are the three key elements of a conceptual class mentioned in the video?

    -The three key elements of a conceptual class are intension, extension, and identification.

  • Why do we create a domain model?

    -We create a domain model to understand the vocabulary and key concepts of a system and to get a better understanding of the system.

  • How can conceptual classes be identified from different categories?

    -Conceptual classes can be identified from different categories by looking at examples like sales, payments, reservations, and other real-world scenarios.

  • What is the guideline for creating a domain model?

    -The guideline for creating a domain model involves identifying conceptual classes, giving them attributes, and creating associations between them using UML class diagram notation.

  • What is a common mistake when creating a domain model?

    -A common mistake when creating a domain model is confusing attributes with classes, which should be clearly separated.

Outlines

00:00

πŸ“š Introduction to Domain Models

The video begins with a warm welcome to the YouTube channel and introduces Chapter 9 on Domain Models. The speaker explains that domain models are visual representations of conceptual classes, which are distinct from software classes. An example of a partial domain model is given, depicted using UML class diagram notation. This notation includes attributes and operations or methods, but domain models focus solely on attributes and their associations. The speaker emphasizes that domain models are conceptual and do not include software artifacts, using 'sales database' as an example of something that would not be part of a domain model. The importance of understanding domain models for representing real-world situations is highlighted.

05:06

🌐 Understanding Conceptual Classes

Paragraph 2 delves into the concept of conceptual classes, which are ideas, things, or objects that form the basis of domain models. The speaker clarifies that domain models are graphical representations of real-world concepts and are not related to software artifacts. The paragraph distinguishes between conceptual classes and software classes, using 'gender' and 'age' as examples of attributes that can be part of a domain model. The speaker also discusses the intention behind conceptual classes, explaining that they are defined by their name, phone number, age, and address. The paragraph concludes with an emphasis on the importance of conceptual classes in creating a domain model for a better understanding of the system.

10:07

πŸ›  Creating a Domain Model

Paragraph 3 discusses the process of creating a domain model, starting with identifying conceptual class categories and their examples, such as 'sale', 'payment', and 'reservation'. The speaker explains that these conceptual classes can act as candidates for inclusion in a domain model. The paragraph also touches on the importance of understanding the vocabulary and key concepts of a domain model for system comprehension. The speaker provides a guideline on how to create a domain model, suggesting that one should start by identifying conceptual classes from different categories and then proceed to draw them using class diagram notation, focusing on attributes and associations.

15:10

🎯 Sketching Domain Models with UML

In Paragraph 4, the speaker demonstrates how to create a domain model using UML class diagram notation. The process involves identifying classes such as 'line item', 'item register', 'ledger', 'cashier', 'customer', 'store', 'product description', and 'product catalog'. The speaker corrects a mistake made in the initial sketch, emphasizing the importance of accurately representing relationships and attributes. The paragraph also discusses the common mistake of confusing attributes with classes, using 'airport' as an example to illustrate the correct approach. The speaker concludes by emphasizing the use of UML for sketching domain models in agile modeling.

20:17

πŸ” Correcting Mistakes in Domain Model Attributes

Paragraph 5 addresses common mistakes in domain model creation, particularly the confusion between attributes and classes. The speaker uses the example of 'product description' and 'item' to illustrate how they should be correctly represented in a domain model with a one-to-many relationship. The paragraph also discusses how to improve the representation of a domain model, suggesting that a better approach is to clearly define the relationships and attributes. The speaker provides examples from figures 9.10 and beyond to show how descriptions and relationships should be correctly depicted in a domain model.

Mindmap

Keywords

πŸ’‘Domain Model

A domain model is a conceptual model that represents the structure and behavior of the problem domain. It is a visual representation of conceptual classes, which are abstract representations of real-world concepts. In the video, the domain model is discussed as a way to understand the vocabulary and key concepts of a system, and it is depicted as a UML class diagram that shows classes, their attributes, and associations without including methods or software artifacts.

πŸ’‘UML Class Diagram

UML (Unified Modeling Language) class diagrams are a standard way of representing static structure of a system. They show classes, their attributes, operations, and the relationships between objects. In the context of the video, UML class diagrams are used to draw domain models, focusing on attributes and associations, but excluding operations, as the domain model is more concerned with the conceptual structure rather than the implementation details.

πŸ’‘Conceptual Classes

Conceptual classes are abstract representations of real-world entities or ideas. They form the basis of a domain model and are used to capture the essence of the problem domain without getting into the specifics of software implementation. The video emphasizes that conceptual classes in a domain model represent real-world situations and concepts, such as 'Sale' or 'Customer', and are distinct from software classes.

πŸ’‘Associations

In UML class diagrams, associations are lines that link classes and represent relationships between them. The video script explains that these lines, or links, are called associations and are a key element in domain models. They show how different conceptual classes are connected, which is crucial for understanding the structure of the domain.

πŸ’‘Attributes

Attributes in a class diagram are properties or characteristics of a class. The video script mentions that in a domain model, classes have attributes but not operations or methods. Attributes help define the characteristics of conceptual classes, such as 'name', 'phone number', 'age', and 'address' for a 'Customer' class.

πŸ’‘Software Artifacts

Software artifacts are elements that are part of the software implementation, such as databases, user interfaces, or code. The video script clarifies that domain models should not include software artifacts because they represent the real-world concepts, not the implementation details. For example, a 'Sales Database' is a software artifact and should not be part of a domain model.

πŸ’‘Conceptual Class

A conceptual class is an abstract representation of an idea, thing, or object in the problem domain. The video script provides examples of conceptual classes, such as 'Sale', 'Payment', and 'Reservation', and explains that these classes are used to build the domain model. Conceptual classes are the building blocks for understanding the domain and are distinct from the actual software classes that might implement them.

πŸ’‘Multiplicity

Multiplicity in UML class diagrams indicates the number of instances one class can have in relation to another. The video script uses a star symbol to denote multiplicity, showing how many instances of one class are associated with an instance of another class. For example, a 'Product Description' might be associated with many 'Items', indicating a one-to-many relationship.

πŸ’‘Agile Modeling

Agile Modeling is a set of best practices for modeling and documentation in an agile project. The video script mentions that agile modeling uses UML diagramming notation, which is why UML class diagrams are used to sketch domain models in an agile context. Agile Modeling emphasizes flexibility and adaptability, which is reflected in the iterative and incremental nature of creating domain models.

πŸ’‘Common Mistake: Attributes vs. Classes

The video script highlights a common mistake of confusing attributes with classes. Attributes are properties of a class, while classes represent entities or concepts. The script provides an example of this mistake, where 'Airport' is incorrectly treated as an attribute instead of a class. The correct approach is to treat 'Airport' as a class with attributes like 'name' and 'destination'.

Highlights

Introduction to chapter nine on domain models.

Definition and discussion of domain models as conceptual models.

Explanation of the difference between domain models and class diagrams, including the inclusion of operations in class diagrams.

Description of associations in domain models as connections between classes.

Emphasis on the importance of remembering that methods are not included in domain model classes.

Clarification that domain models represent real-world concepts, not software artifacts.

Discussion on the exclusion of software-related classes from domain models.

Definition of conceptual classes as ideas, things, or objects.

Explanation of the three aspects of conceptual classes: intension, extension, and conceptual symbols.

Purpose of creating domain models for understanding vocabulary and key concepts of a system.

Guidelines on how to create a domain model using UML class diagram notation.

Common mistake clarification between attributes and classes in domain models.

Example of correctly associating conceptual classes in a domain model.

Discussion on the importance of correctly identifying conceptual classes for domain modeling.

Agile modeling's use of UML diagramming notation for sketching domain models.

Final thoughts on the practical application of domain models in understanding system concepts.

Transcripts

play00:05

assalamualaikum viewers welcome to our

play00:07

youtube channel

play00:08

today the chapter that we are going to

play00:09

start is chapter number nine that is

play00:11

domain models

play00:13

so first we will discuss what is domain

play00:15

models so let's first discus

play00:16

example that is 9.1 we say that figure

play00:20

9.2 shows a partial domain model drawn

play00:23

with uml class diagram notation

play00:26

diagram so

play01:10

diagram you don't know

play01:14

in domain model we have just attributes

play01:17

but in class diagram we have attributes

play01:21

along with operations or methods

play01:23

fine so again

play02:23

now you can see this figure figure 9.2

play02:25

what is happening in this domain model

play02:27

we are having some of the classes

play02:29

and there is some association in between

play02:32

them these

play02:32

lines and links are actually called

play02:35

associations

play02:36

fine we can see these relationships

play02:48

concepts

play03:06

so these are the attributes here this

play03:08

line is

play03:09

actually called association it is also

play03:11

told here fine

play03:12

so these are the things to be noted and

play03:14

remember that methods are not

play03:17

included in these classes as these are

play03:19

conceptual classes

play03:21

and when we combine all the conceptual

play03:22

classes we get a domain model

play03:24

okay so what is a domain model a domain

play03:27

model is a visual representation of

play03:29

conceptual classes

play03:30

or

play04:14

can also be called conceptual models so

play04:16

it means if somebody asks you

play04:18

or if you come across a multiple choice

play04:21

question like

play04:22

top secret domain model conceptual model

play04:24

domain object model yeah analysis object

play04:26

model be here

play04:27

okay so you can see figure 9.3 here a

play04:30

domain model shows

play04:31

real situation conceptual classes not

play04:34

software classes

play04:36

the real situation the conceptual

play04:38

classes could represent software classes

play04:40

could represent

play04:52

[Music]

play05:06

[Music]

play05:09

say real world concepts are related some

play05:11

guests are thinking a real world

play05:12

situation

play05:13

a real situation conceptual classes

play05:15

representation

play05:17

visualization a graphical representation

play05:20

has so this is a domain model

play05:22

next remember 9.4 a domain model does

play05:25

not show software artifacts or classes

play05:28

software's related to software artifacts

play05:35

you can see this in this diagram like we

play05:39

are going to avoid such

play05:40

classes first one sales database

play05:44

what does this mean yex software

play05:46

artifact it is not a part of domain

play05:48

model why

play05:49

is sales database

play06:30

[Music]

play06:47

gender and age like that

play06:52

so this can't be a part of a domain

play06:55

model as it is a software artifact

play06:57

next is

play07:02

it is fine it is perfect but we are

play07:04

talking about domain model

play07:06

this is a software class we can't

play07:08

include it in the domain

play07:09

[Music]

play07:27

this is a conceptual class okay okay so

play07:29

next we are having is

play07:30

definition what are conceptual classes

play07:33

conceptual classes

play07:35

basically conceptual class is an idea

play07:37

thing or object

play07:38

simply conceptual class

play07:42

objective

play07:46

[Music]

play08:18

if we talk about intention we said that

play08:20

it is the definition of conceptual class

play08:22

a definition they are in the basic

play08:24

definition

play08:37

let's take another example

play08:52

it has name phone number age and address

play08:55

job attributes some include classmates

play08:59

there has a concept intention or tia

play09:01

pass what is the concepts

play09:02

extension you could example something

play09:05

like sale one sale to sell three sale

play09:15

three things that we discussed regarding

play09:17

conceptual classes concept

play09:19

symbol intention and extension

play09:47

making a general

play10:06

so this is the reason of creating the

play10:08

main model so that

play10:10

we can get the understanding of

play10:11

vocabulary key concepts

play10:14

and also to get better understanding of

play10:16

the system let's discuss

play10:18

an important guideline that is how to

play10:20

create a domain model

play10:22

hum of domain model could create

play10:23

questions

play10:26

then we discussed why do we create a

play10:28

domain model and now we are going to

play10:30

discuss

play12:22

here so you can see here that from these

play12:26

conceptual class categories we are

play12:28

getting some of the examples like

play12:30

sale payment reservation yes sales line

play12:34

similarly from other conceptual class

play12:36

categories we are getting

play12:38

different examples find

play12:41

different classes like a place of

play12:44

transaction your place of service so to

play12:45

store

play12:46

transactions at the airport plane see

play12:48

these all can be our conceptual classes

play12:50

from these type

play13:10

[Music]

play13:18

foreign

play13:32

scenario here

play14:00

as conceptual classes they can act as a

play14:03

candidate

play14:04

customer also appears check out also

play14:06

goods services

play14:08

cashier sale item identifier sale line

play14:11

item item description price total taxes

play14:15

payment accounting sales again

play14:17

commissions inventory

play14:19

and many more the case 7 i was received

play14:22

so these all can be what these can be

play14:25

our

play14:26

conceptual classes candidate conceptual

play14:28

classes like

play14:40

these all can be our candidate

play14:53

[Music]

play14:57

sale line item or amount rendered

play15:02

classes identification one two three

play15:05

four five six

play15:06

and all our next job is what

play15:10

we have to draw conceptual

play15:39

line item item register ledger cashier

play15:41

customer store product description and

play15:43

product catalog

play15:47

correct list simply domain model created

play15:52

simply

play16:12

through class diagram notation okay so

play16:15

like this you will complete all of the

play16:16

classes

play16:19

only attributes after giving

play16:23

sorry let's correct it after giving

play16:25

attributes here we are going to make

play16:27

associations as well

play16:29

attributes associations create

play16:44

like this we can give a star here

play16:47

that indicates multiplicity so this is

play16:50

what

play16:50

association is there

play16:54

same is the case here for monopoly

play16:56

domain same

play16:58

value identification then you are going

play17:00

to make classes

play17:01

afterwards we can see these are six

play17:04

classes here

play17:06

i'm gonna identify here i'm gonna draw

play17:07

here further we also

play17:09

let's check them no it's enough you have

play17:12

my personal six classes he identified

play17:14

scenario like monopoly game player

play17:18

piece board square and diet classes

play17:27

giant modeling sketching a class diagram

play17:30

we already

play17:31

read that agile modeling uses uml

play17:33

diagramming notation

play17:35

so that is why we use uml class diagram

play17:37

for sketching agile modeling

play17:39

okay okay now let's discuss an important

play17:41

topic that

play17:42

is guideline a common mistake with

play17:45

attributes versus classes

play17:47

common mistake attributes or classes

play17:54

let's see an example is here

play17:57

that is discussed

play18:12

separate

play19:14

[Music]

play19:53

then we will come to know about it okay

play19:55

so airport is

play19:56

another conceptual class that is having

play19:58

some separate

play20:00

attribute like name in the real world

play20:02

destination airport is not considered a

play20:04

real world

play20:16

okay let's see these associations

play20:47

that is not right this is worse we

play20:49

should make something

play20:51

else so this is a better one like a

play20:54

product description

play20:56

description and we are having

play20:59

a conceptual class that whose name is

play21:02

item

play21:02

uh attribute has serial number now

play21:06

they can have a one-to-many relationship

play21:09

easily the egg product description

play21:11

against

play21:12

maximum any many items

play21:32

so this is a better approach let's see

play21:34

some particular figures

play21:35

like figure 9.10 description about other

play21:38

things

play21:38

the other things

play21:42

flight

play22:06

this is worse but this is better how is

play22:08

it better

play22:09

let's see flight is being described

play22:38

description

play22:43

you

Rate This
β˜…
β˜…
β˜…
β˜…
β˜…

5.0 / 5 (0 votes)

Related Tags
Domain ModelingUML Class DiagramConceptual ClassesSoftware ArtifactsReal-World ConceptsAgile ModelingAssociationsMultiplicityConceptual GuidelinesDomain Model Creation