0% found this document useful (0 votes)
70 views27 pages

Data Models-Draft 1

The document discusses enterprise architecture and data modeling. It defines enterprise architecture as describing the structure, functions, and technology of complex organizations. Data models represent real-world objects and relationships in a simplified way. There are different types of data models including object-based models using entities, attributes, and relationships, physical models for implementation, and record-based models. Enterprise architecture frameworks provide standardized views of the enterprise to meet stakeholder needs.

Uploaded by

malvin muthoni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views27 pages

Data Models-Draft 1

The document discusses enterprise architecture and data modeling. It defines enterprise architecture as describing the structure, functions, and technology of complex organizations. Data models represent real-world objects and relationships in a simplified way. There are different types of data models including object-based models using entities, attributes, and relationships, physical models for implementation, and record-based models. Enterprise architecture frameworks provide standardized views of the enterprise to meet stakeholder needs.

Uploaded by

malvin muthoni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

11/9/2020

Data Models and Modelling

Intended Learning Outcomes

• Define what an Enterprise architecture is


• Discuss basic concepts of enterprise architecture
• Discuss various Data Diagrams: Business rules, Entity types,
Relationship types, Attribute, Keys, Cardinality
• Discuss types of Data Models
• Discuss concepts of Entity Relationship modeling

Monday,
November
9, 2020
2 |

1
11/9/2020

Enterprise Architectures

• Enterprise Architecture is the practice of informing the business


decision-making process by understanding how complex organizations
are structured, how they function and how what technology supports
these functions.
• Enterprise architecture (EA) is a rigorous description of the structure
of an enterprise, including the business perspective and the
information system perspective.
• EA describes the terminology, the composition of enterprise
components, and their relationships with the external environment, as
well as providing the guiding principles for the requirements, design,
and evolution of an enterprise.
• This description is comprehensive, including enterprise goals,
business processes, roles, organizational structures, organizational
behaviors, business information, software applications and
computer systems.
• EA is a major part of IT governance for any large organization.
Monday,
November
9, 2020
3 |

Enterprise Architectures

• seeks to do is model the relationships between the business and


technology in such a way that key dependencies are exposed from
the underlying complexity and so can be used to support decisions.

Monday,
November
9, 2020
4 |

2
11/9/2020

Enterprise Architectures

• For example, by ascertaining which business processes are


supported by a given software application, and then which
platform the application runs on, it is possible to calculate the
impact on the business of hardware obsolescence.
• From the same model, it would also be possible to examine, the
cost of replacing the application, or which processes could be best
re-designed to reduce the IT portfolio.

Monday,
November
9, 2020
5 |

Enterprise Architectures

Monday,
November
9, 2020
6 |

3
11/9/2020

Rationale for EA

• Gaps in understanding – the business community are unable to


elucidate their requirements to the technology providers, and the
technology providers are unable to describe the impact of
technology changes in such a way that the business community can
understand the risk.
• Weakness of verbal requirements – written specifications are
open to interpretation and contribute to gaps in understanding
• Lack of project cohesion – it is very difficult to coordinate a large
development team to work towards a singular goal when their
allotted tasks are specialized and isolated

Monday,
November
9, 2020
7 |

Sales Example

Monday,
November
9, 2020
8 |

4
11/9/2020

Rationale for EA

• One way to measure the benefits of EA is to compare two almost identical


projects, one which used an EA approach and one which did not.
• For example, in a paper by Tony Brown:
• Two IT implementation projects are compared.
• Each project implemented a worker’s compensation system for US states (one
of which was Ohio).
• The Ohio project came in at $3.5m and was delivered in three years, whereas
the other project cost $42m and took 12 years.
• The projects were comparable in scale and used similar CASE technology – the
key difference was that the Ohio project took an enterprise view and so was
able to make smarter decisions about implementation because the delivery
team better understood the requirements of the business.

Monday,
November
9, 2020
9 |

Enterprise Architecture Models

• There are two key types of Enterprise Architecture model; as-is


and to-be.
• As-is models are generally used to understand the dependencies in
an enterprise, or provide a “big picture” executive summary.
• To-be models are generally produced to examine the impact of
change, or to act as a blue-print for a particular change
programme.
• Quite often, to-be models will be developed to overlap a small
part of a larger as-is model – for example to examine the broader
impact of a change to a part of the enterprise.
• These hybrid models are sometimes called “transitional
architectures”, because they support changes in the enterprise.

Monday,
November
9, 2020
10 |

5
11/9/2020

Enterprise Architecture Frameworks

• EA Frameworks
• Given the breadth of information covered by an Enterprise
Architecture Model, it is sensible to have a formal way of
categorizing the information it represents – i.e. a framework.
• The best known architecture framework was devised by John
Zachman, and defines a set of views on the enterprise.
• These views are designed to serve the needs of various
stakeholders – e.g. business process models, logical data models,
etc.
• Since Zachman, there have been a plethora of frameworks,
emanating from national governments, IT consortia and businesses.
Most owe their existence to Zachman though.
• The table below summarizes the Zachman Framework:

Monday,
November
9, 2020
11 |

Zachman Framework

Monday,
November
9, 2020
12 |

6
11/9/2020

Zachman Framework

Monday,
November
9, 2020
13 |

Data Models

A model is a representation of reality, 'real world' objects and events,


associations. It is an abstraction that concentrates on the
essential, inherent aspects an organization and ignores the
accidental properties.
A data model represents the organization itself. It should provide the
basic concepts and notations that will allow database designers
and end users unambiguously and accurately to communicate their
understanding of the organizational data.

Monday,
November
9, 2020
14 |

7
11/9/2020

Data Models (Components)

• Data Model can be defined as an integrated collection of concepts for


describing and manipulating data, relationships between data, and
constraints on the data in an organization.
• A data model comprises of three components:

1. A structural part, consisting of a set of rules according to which


databases can be constructed.
2. A manipulative part, defining the types of operation that are allowed
on the data (this includes the operations that are used for updating or
retrieving data from the database and for changing the structure of
the database).
3. Possibly a set of integrity rules, which ensures that the data is
accurate.

Monday,
November
9, 2020
15 |

Types of Data Models

• The purpose of a data model is to represent data and to make the


data understandable.
• There have been many data models proposed in the literature.
They fall into three broad categories:
1. Object Based Data Models
2. Physical Data Models
3. Record Based Data Models

• The object based and record based data models are used to
describe data at a conceptual and external levels, the physical
data model is used to describe data at an internal level (actual
implementation).

Monday,
November
9, 2020
16 |

8
11/9/2020

Types of Data Models

• Object Based Data Models


• Object based data models use concepts such as entities,
attributes, and relationships.
• An entity is a distinct object (a person, place, concept, and event)
in the organization that is to be represented in the database.
• An attribute is a property that describes some aspect of the object
that we wish to record, and a relationship is an association
between entities.
• Some of the more common types of object based data model are:

 • Entity-Relationship
 • Object Oriented
 • Semantic
 • Functional
Monday,
November
9, 2020
17 |

Types of Data Models

• The Entity-Relationship model has emerged as one of the main


techniques for modeling database design and forms the basis for
the database design methodology.

Monday,
November
9, 2020
18 |

9
11/9/2020

Types of Data Models

Monday,
November
9, 2020
19 |

Types of Data Models

• The object oriented data model extends the definition of an entity


to include, not only the attributes that describe the state of the
object but also the actions that are associated with the object,
that is, its behavior.
• The object is said to encapsulate both state and behavior.

Monday,
November
9, 2020
20 |

10
11/9/2020

Types of Data Models

• Entities in semantic systems represent the equivalent of a record


in a relational system or an object in an OO system but they do not
include behavior (methods).
• They are abstractions 'used to represent real world (e.g. customer)
or conceptual (e.g. bank account) objects.

Monday,
November
9, 2020
21 |

Types of Data Models

Monday,
November
9, 2020
22 |

11
11/9/2020

Types of Data Models

•The functional data model is now almost twenty years old.


•The original idea was to' view the database as a collection of
extensionally defined functions and to use a functional language for
querying the database.

Monday,
November
9, 2020
23 |

Types of Data Models

Monday,
November
9, 2020
24 |

12
11/9/2020

Physical Data Models

• Physical data models describe how data is stored in the computer,


representing information such as record structures, record
ordering, and access paths.
• There are not as many physical data models as logical data models,
the most common one being the Unifying Model

Monday,
November
9, 2020
25 |

Record Based Logical Models

• Record based logical models are used in describing data at the


logical view levels.
• Logical means that it is a representation of how data is organized
• In contrast to object based data models, they are used to specify
the overall logical structure of the database and to provide a
higher-level description of the implementation.
• Record based models are so named because the database is
structured in fixed format records of several types.
• Each record type defines a fixed number of fields, or attributes,
and each field is usually of a fixed length.

Monday,
November
9, 2020
26 |

13
11/9/2020

Record Based Logical Models

• The three most widely accepted record based data models are:

1. Hierarchical Model
2. Network Model
3. Relational Model

• The relational model has gained favor over the other two in recent
years. The network and hierarchical models are still used in a
large number of older databases.

Monday,
November
9, 2020
27 |

Hierarchical Model

Monday,
November
9, 2020
28 |

14
11/9/2020

Network Model

Monday,
November
9, 2020
29 |

Relational Model

Monday,
November
9, 2020
30 |

15
11/9/2020

Business Rules

What are Business Rules?

• A business rule is anything that captures and implements business


policies and practices.
• A rule can enforce business policy, make a decision, or infer new
data from existing data.
• A business rule is a statement that defines or constrains some
aspect of the business. It is intended to assert business structure
or to control or influence the behavior of the business. The
business rules that concern the project are atomic -- that is, they
cannot be broken down further.

16
11/9/2020

Types of Business Rules

• Definitions of business terms


• The most basic element of a business rule is the language used to
express it.
• The very definition of a term is itself a business rule that describes
how people think and talk about things.
• Thus, defining a term is establishing a category of business rule.
Terms have traditionally been documented in glossaries or as
entities in a conceptual model.
• For example, we refer to our workers as employees, not staff.
Operational definitions.

Types of Business Rules

• Facts relating terms to each other


• The nature or operating structure of an organization can be
described in terms of the facts that relate terms to each other.
• To say that a customer can place an order is a business rule.
• Facts can be documented as natural language sentences or as
relationships, attributes, and generalization structures in a
graphical model.

17
11/9/2020

Types of Business Rules

• Before a withdrawal, the balance of the account must be greater


than the amount being withdrawn.
• After the withdrawal, the balance will be equal to the balance
before, minus the amount that has been withdrawn.

Types of Business Rules

• Constraints
• Every enterprise constrains behavior in some way, and this is
closely related to constraints on what data may or may not be
updated.
• To prevent a record from being made is, in many cases, to prevent
an action from taking place.
• The manager of a department must belong to that department.
• An employee cannot earn more than her manager.
• A department of the Nairobi office can only be managed by an
employee who has ≥ 10yrs experience.
• An employee can only participate in projects associated with her
department.

18
11/9/2020

Types of Business Rules

• Derivations
• Business rules (including laws of nature) define how knowledge in
one form may be transformed into other knowledge, possibly in a
different form.
• Examples
• The budget of a project is the sum of all salaries of participating
employees, multiplied by 3.
• The total of the invoice is the sum of the quantity ordered
multiplied by the price of the items.

Example Business Rule

• An example of a business rule

19
11/9/2020

Building Blocks

• All rules must have at least two elements:


Conditions
• A condition describes a situation or state that must be in place in
order for a specific action to occur.
• In the above example, the condition is quite simply the status of
the customers themselves.
Actions
• An action is the event that results from the evaluation of the
condition. Each action is uniquely bound to the condition that
precedes it.
• In this example, the action is the quotation of the price; it is
different for each of the conditions that is encountered.

Specifying Business Rules Precisely

• Natural Language
• use unrestricted natural language...but such descriptions can be
highly ambiguous;
• Structured English
• use a subset of a natural language (both syntactically and
vocabulary-wise) to minimize ambiguities.
• Decision Tables
• use table representation of alternative outcomes (similar to truth
tables)
• Decision Trees
• use tree representation of alternative outcomes

20
11/9/2020

Natural Language

• Example 1: License Inspection Project (Expressed in natural


Language)
• Rule 1:
• A Driver of a Vehicle must have a valid Driver's License.
• Rule 2:
• A Driver's License must be considered valid if all of the following are
true:
• The Driver's License belongs to the Driver.

• The Expiry Date of the Driver's License is later than the Inspection Date.

• The physical proof is produced within 24 hours of the Inspection Date.


• Possible business requirements to enforce these rules:
• Police officer to inspect driver's license.
• Scanner to read driver's license for validity.
• Card reader for driver to insert driver's license when driving through a
checkpoint.

Structure English

• Structured English is less formal English with a little bit of


programming language syntax in it. This is mostly understood by
programmers of a particular language.

21
11/9/2020

Example

• For each LOAN ACCOUNT NUMBER in the LOAN ACCOUNT FILE


• do the following steps:
• If the AMOUNT PAST DUE is greater than $0.00 then
• while there are LOAN ACCOUNT NUMBERS for the CUSTOMER NAME
do the following:
• sum the OUTSTANDING LOAN BALANCES
• sum the MINIMAL PAYMENTS
• sum the PAST DUE AMOUNTS
• report the CUSTOMER NAME, LOAN ACCOUNT on OVERDUE
CUSTOMER, LOAN ANALYSIS

Another Example

• do while there are more staff in the list


• calculate staff bonus
• store bonus amount
• begin case
• case bonus > £250
• add name to StarOfTheMonth list
• case bonus < £25
• print warning letter
• end case
• end do

22
11/9/2020

Decision Tables

• They are used especially where there is a condition and an


outcome of the condition has to be evaluated.
• Usually, an action is decided by more than one condition.
• The conditional logic is represented as a table where the rows and
columns (each of which represent a condition) intersect to
determine the appropriate action.
• In a decision table, several conditions may get evaluated, but only
one action is ever fired.

Decision Tables

23
11/9/2020

Decision Tables

• For instance, in this example the customer status is represented by


the rows in the table, and the potential amount of money spent by
that customer is represented by the columns.
• During the transaction, the customer receives a bigger discount
when they spend more money.
• This discount is dependent on their status, and increases to the
point that a gold customer who spends over $200 will get the item
for free.
• This business rule behavior is enforced by this decision table
through the intersection of the status (rows) and money spent
(columns).
• We can see in the first column that the results of each of the
intersections is identical to the if-then rule set of the previous
section.

Decision Trees

• A Decision tree is a hierarchical structure that starts at what is


called a root node and goes downwards till it reaches a decision ,
branching where there are pertinent questions asked and their
answers given.

24
11/9/2020

Decision Trees

• “Air shipping charges are set depending on the weight of a parcel.


The basic rate is $3/lb, reducing to $2/lb for excess over 20 lb,
with a minimum of $6.
• Surface freight is $2/lb for express delivery. However, this rate
only applies in the local delivery area.
• If the shipping address is outside the local area and the parcel
weighs more than 20lb, or express delivery is not required, the
surface rate is the same as for local delivery (express).
• Normal delivery of packages is $2/lb up to 20lb is $2/lb, with $1
express surcharge (per pound).
• Notwithstanding the provisions of the previous paragraph, air
freight to destinations west of the Mississippi is charged at double
rate”

Clarifications

• Question: Is there a difference between freight shipping and


handling?
• Answer: No, all rates include freight and handling.
• Question: The description mentions “up to 20lbs” and “over
20lbs”. Which rate applies for exactly 20lbs?
• Answer: It’s generally understood that “up to 20lbs” means “up
to and including 20lbs”.
• Question: The fourth sentence could be read in two ways: “both
outside the local area and also over 20lbs, or, alternatively,
express not required” or “outside the local area and, in addition,
either over 20lbs or express not required”. Which is correct?
• Answer: The second one.

25
11/9/2020

Decision Trees

• http://en.wikipedia.org/wiki/Business_rule
• http://www.brcommunity.com/b290.php
• http://www.businessrulesgroup.org/first_paper/br01c1.htm#s1e
• http://publib.boulder.ibm.com/infocenter/dmndhelp/v6rxmx/ind
ex.jsp?topic=/com.ibm.wbit.help.br.ui.doc/topics/cundbus.html
• http://knut.hinkelmann.ch/lectures/KE2011/KE-2-Rules.pdf
• http://www.inf.ufrgs.br/er2009/res/keynotes/ER2009-
KeynotePres-Mylopoulos.pdf

26
11/9/2020

• http://home.iitj.ac.in/~ramana/ch3-ER-diagrams.pdf

Ole Sangale Road, Madaraka Estate. PO Box 59857-00200, Nairobi, Kenya


Tel +254 (0)20 606155, 606268, 606380 Fax +254 (0)20 607498
Mobile +254 (0)722 25 428, (0)733 618 135 Email [email protected]
www.strathmore.edu |

27

You might also like