Data ModelingAn Introduction to Systems Modeling models for the following reasons: current system is implemented or the way that any one person thinks the system might be implemented..
Trang 1Data Modeling
Introduction
logical and physical system models?
constructs of a data model?
stored?
Trang 2Data Modeling
Introduction
and describe all data structures and attributes to the repository or encyclopedia?
Trang 3Data Modeling
An Introduction to Systems
Modeling
a thousand words, most system models are pictorial representations of reality
understand those systems, or for proposed systems as a way to document business requirements or technical designs
implementation-independent; that is, they depict the system independent of any technical implementation As such, logical
models illustrate the essence of the system.
Trang 4Data Modeling
An Introduction to Systems
Modeling
but also how the system is physically and technically implemented They are implementation-dependent because they reflect technology choices, and the limitations of those technology choices
requirements, and physical system models to depict technical designs
Trang 5Data Modeling
An Introduction to Systems
Modeling
models for the following reasons:
current system is implemented or the way that any one person thinks the system might be implemented
requirements because we are too preoccupied with technical details
non-technical or less technical languages
Trang 6a system’s DATA Data modeling is sometimes called database modeling because a data model is usually implemented as a
database It is sometimes called information modeling.
the modeling techniques
as possible As a result, data must be organized in a way that is flexible and adaptable to unanticipated business requirements
Trang 7Data Modeling
An Introduction to Systems
Modeling
certainly a great deal more stable than the processes that use the data Often the data model of a current system is nearly identical to that of the desired system
and can be constructed more rapidly
users quickly reach consensus on business terminology and rules
Trang 8Order Total Cost Customer Number (FK)
INVENTORY PRODUCT
Product Number (PK)
Product Name
Product Unit of Measure
Product Unit Price
ORDERED PRODUCT Ordered Product ID (PK) Order Number (FK) Product Number (FK) Quantity Ordered Unit Price at Time of Order
has placed
sold
sold as
Trang 9and concepts to systems problem solving.
is frequently called an entity relationship diagram (ERD).
described by the data
Trang 10Data Modeling
System Concepts for Data Modeling
‘things’ is called an entity
Synonyms include entity type and entity class.
concepts about which we need to capture and store data
STUDENT
An entity
Trang 11Data Modeling
System Concepts for Data Modeling
given entity are called attributes
entity Synonyms include element, property, and field.
called compound attributes
primitive attributes Synonyms in different data modeling
languages are numerous: concatenated attribute, composite
attribute, and data structure.
Trang 12Data Modeling
System Concepts for Data Modeling
properties: data type, domain, and default
stored in that attribute.
definition, it is useful to declare logical (non-technical) data types for our business attributes
can legitimately take on
Trang 13Data Modeling
TEXT A string of characters, inclusive of numbers When numbers are
included in a TEXT attribute, it means 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 note to a give database record.
DATE Any date in any format.
TIME Any time in any format.
YES / NO An attribute that can only assume 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, etc.)
Trang 14Data Modeling
NUMBER For integers, specify the range:
{minimum - maximum}
For real numbers, specify the range and precision:
{minimum.precision - maximum.precision}
{10- 99}
{1.000 - 799.999}
TEXT TEXT (maximum size of attribute)
Actual values are usually infinite;
however, users may specify certain narrative restrictions.
TEXT (30)
MEMO Not applicable There are no restrictions
on size or content.
Not applicable.
DATE Variation on the MMDDYYYY format To
accommodate the year 2000, do not abbreviate year to YY Formatting characters are rarely stored; therefore, do not include hyphens or slashes.
MMDDYYYY MMYYYY YYYY
or
-HHMMT
Trang 15Data Modeling
A legal value from the
domain (as described above)
For an instance of the attribute, if the user does not specify a value, then use this value.
0 1.00 FR
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 the
user to enter a legal value from the domain.
(This is used when no value in the domain is common enough to be a default, but a some value must be entered.)
REQUIRED NOT NULL
Trang 16Data Modeling
System Concepts for Data Modeling
millions and there exists a need to uniquely identify each instance based on the data value of one or more attributes
unique value for each entity instance It is sometimes called an
identifier.
identify an instance of an entity
entity is called a concatenated key Synonyms include composite
Trang 17Data Modeling
System Concepts for Data Modeling
of instances of an entity It is sometimes called a candidate identifier (Note: A candidate key may be a single attribute or a
concatenated key.)
be used to uniquely identify a single entity instance.
is called an alternate key.
Trang 18Data Modeling
System Concepts for Data Modeling
instances as opposed to a single instance
students, and all female students.
whose finite values divide all entity instances into useful subsets
Some methods call this an inversion entry.
STUDENT
Student Number (Primary Key 1)
Name (Alternate Key 1)
Gender (Subsetting Criteria 1)
Race (Subsetting Criteria 2)
Major (Subsetting Criteria 3)
Grade Point Average
Keys and submitting criteria
Trang 19Data Modeling
System Concepts for Data Modeling
support the business mission
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
relationship
interpreted in both directions
Trang 20Data Modeling
STUDENT is being studied by is enrolled in CURRICULUM
Trang 21Data Modeling
System Concepts for Data Modeling
degree of each relationship and this is called cardinality.
• Cardinality defines the minimum and maximum number of
occurrences of one entity for a single occurrence of the related entity Because all relationships are bi-directional, cardinality must
be defined in both directions for every relationship.
Trang 22Data Modeling
Cardinality
Interpretation
Minimum Instances
Maximum Instances
Graphic Notation
Figure 5.3
Trang 23Data Modeling
System Concepts for Data Modeling
participate in the relationship
entities participated in the relationship.
same entity
relationship; degree = 1)
Trang 25ternary relationship
from more than one other entity (parents) Each part of that concatenated key points to one and only one instance of each
of the connecting entities.
Trang 26Instructor Name Last Name First Name Middle Initial
Instructor ID Room ID Division Number Days of Week Start Time End Time
is assigned to
Trang 27Data Modeling
System Concepts for Data Modeling
instances of another entity
primary key of one entity must be migrated into the other entity
as a foreign key.
(duplicated in) another entity for the purpose of identifying instances of a relationship A foreign key (always in a child entity) always matches the primary key (in a parent entity).
Trang 28Data Modeling
CURRICULUM
Program of Study Code (Primary Key)
Title of Program
Type of Degree Awarded (Subsetting Criteria 1)
Department Number (Foreign Key)
DEPARTMENT Department Number (Primary Key) Department Name
Trang 29Data Modeling
System Concepts for Data Modeling
between parent and child it is called a non-specific relationship
one in which many instances of one entity are associated with many instances of another entity Such relationships are suitable only for preliminary data models, and should be resolved as quickly as possible.
one-to-many relationships by inserting an associative entity between the
two original entities.
Trang 30Data Modeling
STUDENT
Student Number (Primary Key 1)
Name (Alternate Key 1)
Gender (Subsetting Criteria 1)
Race (Subsetting Criteria 2)
Grade Point Average
Student Number (Primary Key 1)
Name (Alternate Key 1)
Gender (Subsetting Criteria 1)
Race (Subsetting Criteria 2)
Grade Point Average
CURRICULUM Program of Study Code (Primary Key) Title of Program
Type of Degree Awarded (Subsetting Criteria 1)
Current Candidate for Degree?
Trang 31Data Modeling
System Concepts for Data Modeling
the commonalties between entities
• Generalization is a technique wherein the attributes that are
common to several types of an entity are grouped into their own
entity, called a supertype.
that are common to one or more entity subtypes
relationships to entity subtypes These relationships are
sometimes called IS A relationships (or WAS A, or COULD
BE A) because each instance of the supertype ‘is also an’
instance of one or more subtypes.
Trang 32Data Modeling
System Concepts for Data Modeling
common attributes from an entity supertype, and then add other attributes that are unique to an instances of the subtype.
models permits the the reduction of the number of attributes through the careful sharing of common attributes
domains, and defaults of those attributes.
relationships to other entities
Trang 33Data Modeling
PERSON Personal ID Number (Primary Key) Name
Last Name First Name Middle Initial Gender (Subsetting Criteria 1) Race (Subsetting Criteria 2) Marital Status (Subsetting Criteria 3)
all attributes from PERSON plus
Pension Plan Code Life Insurance Plan Code Medical Insurance Plan Code Vacation Days Accumulated Sick Days Acculumlated
ADDRESS
can be contacted at
PROSPECT
all attributes from PERSON and STUDENT plus
First Contact Date Last Contact Date Has Visited Campus?
ALUMNUS
all attributes from PERSON and STUDENT plus
Member of Alumni Association?
Job in Field of Study?
FORMER STUDENT
all attributes from PERSON and STUDENT plus
Reason for Withdrawal Plans to Return?
CURRENT STUDENT
all attributes from PERSON and STUDENT plus
Number of Credits Earned Grade Point Average Encumberance Status Financial Aid Eligibility Status
has earned
Trang 34Data Modeling
The Process of Logical Data
Modeling
on strategic information system plans
defines an overall vision and architecture for information systems
model
Trang 35Data Modeling
The Process of Logical Data
Modeling
fundamental of entities
are not described in terms of keys or attributes
(depending on the planning methodology’s standards and the level
of detail desired by executive management)
non-specific.
repository
Trang 36Data Modeling
The Process of Logical Data
Modeling
an application data model.
perspective
the study and definition phases of a project
details or technology, they may be constructed (through reverse
engineering) from existing databases.
systems analysis
Trang 37FOCUS ON SYSTEM PROCESSES
FOCUS ON SYSTEM INTERFACES
Existing Applications and Technology
Existing Interfaces and Technology
Existing Networks and Technology
FOCUS ON SYSTEM GEOGRAPHY
Definition Phase (establish and prioritize business system requirements)
Study Phase (establish system improvement objectives)
Survey Phase (establish scope and project plan)
Customers order zero,
one, or more products
Products may be ordered
by zero, one, or more
customers.
Reverse Engineering (optional)
Trang 38Data Modeling
The Process of Logical Data
Modeling
analysis Most analysts prefer to draw process models to document the current system
following reasons:
more completely than process models.
models.
Process models often require dozens of sheets of paper.
Trang 39Data Modeling
The Process of Logical Data
Modeling
following reasons: (continued)
similar than process models for existing and proposed systems Consequently, there is less work to throw away as you move into later phases.
no attributes – a context data model.
into details about the entities and business rules
Trang 40Data Modeling
The Process of Logical Data
Modeling
stages:
associative entities, include primary, alternate keys, and foreign keys, plus precise cardinalities and any generalization hierarchies
attributes and subsetting criteria.
domains, and defaults.
Trang 41Data Modeling
The Process of Logical Data
Modeling
data requirements, not technical solutions
way to implement those requirements with database technology
into a physical data model (called a database schema) for the
chosen database management system
of that database technology, as well as the performance tuning requirements suggested by the database administrator
and flexibility through a process called normalization
Trang 42information as supplied by the user community
sampling of existing forms and files; research of similar systems; surveys of users and management; and interviews of users and management
simultaneously constructing and verifying the data models is
Joint Application Development (JAD)
Trang 43Data Modeling
Discover the system
entities
What are the subjects of the business? In other words, what types of persons, organizations, organizational units, places, things, materials, or events are used in, or interact with this system, about which data must be captured or maintained? How many instances of each subject exist?
Discover the entity keys What unique characteristic (or characteristics) distinguishes an
instance of each subject from other instances of the same subject? Are there any plans to change this identification scheme in the future?
Discover entity subsetting
criteria Are there any characteristics of a subject that divide allinstances of the subject into useful subsets? Are there any
subsets of the above subjects for which you have no convenient way to group instances?
Discover attributes and
domains
What characteristics describe each subject? For each of these characteristics: (1) what type of data is stored? (2) who is responsible for defining legitimate values for the data? (3) what are the legitimate values for the data? (4) is a value required? and (5) is there any default value that should be assigned if you don’t specify otherwise?
Discover security and
control needs
Are there any restrictions on who can see or use the data? Who
is allowed to create the data? Who is allowed to update the data? Who is allowed to delete the data?
Discover data timing
needs
How often does the data change? Over what period of time is the data of value to the business? How long should we keep the data? Do you need historical data or trends? If a characteristic changes, must you know the former values?
Discover generalization
hierarchies
Are all instances of each subject the same? That is, are there special types of each subject that are described or handled differently? Can any of the data be consolidated for sharing? Discover relationships
and degrees
What events occur that imply associations between subjects? What business activities or transactions require involve handling or changing data about several different subjects of the same or a different type?
Discover cardinalities Is each business activity or event handled the same way or are
there special circumstances? Can an event occur with only