Modeling Data Object
Modeling Data Object
Modeling Data Object
college
Arbaminch Information UNIT
Database Administration
Polytechnic Sheet
MODULE
College Modeling Data Objects
College
Database Administration
(Level III)
Modeling Data Object version 1.0 Year 2012 prepared By: Awraja Page 2
Arbaminch Information UNIT
Database Administration
Polytechnic Sheet
MODULE
College Modeling Data Objects
College
LEARNING GUIDE # 5
Module Title: - Modeling Data Objects
Module code: ICT DBA3 05 0710
SYMBOLS
These symbols are located at the left margin of the module. These illustrate the actions that should be
taken or resource to be used at a particular stage in the module.
LO Learning
Outcome Self-Check
Answer Key
Resources
Modeling Data Object version 1.0 Year 2012 prepared By: Awraja Page 2
Arbaminch Information UNIT
Database Administration
Polytechnic Sheet
MODULE
College Modeling Data Objects
College
Reading Assessment
Activity
Remember/Tips
Use Computer
Modeling Data Object version 1.0 Year 2012 prepared By: Awraja Page 2
NO: _____
LO
1. Identify entities and relationships
2. Develop normalization
3. Validate model
1. ER-Diagram components
Introduction
Attributes
Represents the property used to describe an entity or a relationship
Represented by Oval
Attributes
- An attribute is a property that describes an entity.
- Each attributes have a particular value based on the defined data type.
- The set of all possible (allowable) values of an attribute is called attribute domain.
- In E-R Diagram, attributes are named with an initial capital letter followed by lowercase letters.
- An attribute can be represented by an ellipse (oval) shape with a line connected it to the associated entity.
Example:
- It can also be represented by listing them within the entity rectangle, under the entity name(entity type).
Example: EMPLOYEE
Emp_Id
Relationships
1.2. Relationships
A relationship is an association that exist b/n two or more participating entities.
- In E-R Diagram, a relationship type is represented by a diamond shape
with the relationship verb in it.
* One-to-many: - one instance of an entity (A) is associated with zero, one or many instances of another entity
(B), but for one instance of entity (B) there is only one instance of entity (A).
* Many-to-many: - one instance of an entity )A) is associated with zero, one or many instances of another entity
1.2.1 Databases
A database is a collection of organized information so that it can easily be accessed, managed, and updated.
A database management system is a suite of software applications that together make it possible for people or
businesses to store, modify, and extract information from a database.
1.2.2 Applications
Application software is the name given to a program or group of the programs designed for end-users (perform
specific tasks for end-users). Example: database programs, word processors, and antivirus programs are all applications.
1.2.1 Servers
A Server is a computer program that manages access to a centralized resource such as file, printer, and user group as
well as network traffic on the network or provide services to client software running on other computers (and their
users) in the same domain (in a network).
A single server machine can have several different server software packages running on it, thus providing many
different services to clients on the network.
• Message server includes Chat servers that enable a large number of users to exchange
information in the network.
• Mail server store and handles mail message over in the networks (via LANs) and across
the Internet (via WANs).
• A Proxy server is a server that can be sitting between the server and the client. When
any request is coming, client pass that request to the server, then server process that
request and send back to the client. Proxy server improves the performance of the
security by filtering the request.
• Web server provides the access to the internet using hypertext markup language. A Web
server get request from the web browser and send back the response and associated
HTML document.
• File servers helps user to exchange data (read data, write data) as well as manage shared
files or it control and manage overall user access.
• Print server control and manage printer resources over the network and also it offer fax
services. The print server allows multiple users to access printer resources and fax
services simultaneously.
• Database servers manage the database using database management system software.
Client request is sent in the form of queries to the server, then database server process the
incoming client query, access the stored data from the database and sent result back to the
client.
• A backup server responsible for backing up and restoring files, folders, databases on a
network in order to prevent the loss of data in the event of a hard drive failure, user error,
disaster or accident.
• A DHCP Server is used to assigns IP addresses to client computers automatically. All IP
addresses of all computers are stored in a database that resides on a server machine.
• DNS Server is needed for resolving hostnames to their IP addresses.
1.2.2 Operating systems
An operating system (OS) is a collection of software that enables the computer hardware to
communicate and operate with the computer software.
The operating system is a vital component of the system software in a computer system. Without
operating system, a computer would be useless. Application programs require an operating
system to function.
1.2.3 Gateways
A network gateway is an internetworking system capable of joining together two networks that
use different base protocols. A network gateway can be implemented completely in software,
completely in hardware, or as a combination of both.
A Gateway is - used between two dissimilar LAN s.
LOGO INFORMATI UNIT Database Administration
ON SHEET MODULE Modeling Data Objects
- required to convert Data packets from one protocol format to another Protocol
format.
Router and Gateway both are sometimes used interchangeably but the difference is that Gateway
operates on 7th layer of the OSI Model and the Router works on the 3rd layer of the OSI model.
The OSI Layer consists of:
1. Physical layer
2. Data Link
3. Network, (performs establishment of connection between networks and the Routing and
selecting best path)
4. Transport layer
5. Session layer
6. Presentation layer
7. Application Layer. (Provides semantic exchange of data between application in an open system)
1.2.4 Application service provider
An application service provider (ASP) is a business that provides computer-based services to
customers over a network. I.e.: Application service provider is remote software that you access
through a web browser.
The goal of an application service provider is to reduce the cost of software distribution and
maintenance.
1.2.5 ISP
An Internet service provider (ISP) is an organization/company that provides internet access to
users or subscribers of its service, usually for a fee.
1.5. Reviewing business rules to determine impact
A business rule is a rule of a business, company, or corporation that defines/determine or constrains
some aspect of business and always resolves to either true or false.
1.5.1. Overview of business rules
Business rules describe the business polices that apply to the data stored on a company’s databases.
Business-rules constraints fall into two categories: field constraints within tables, and relationship
constraints between tables.
ER-Diagram construction
Designing conceptual model for the database is not a one linear process but an iterative
activity where the design is refined again and again.
To identify the entities, attributes, relationships, and constraints on the data, there are
different set of methods used during the analysis phase.
Modeling Data Objects version 1.0 Year 2019 prepared By: Ermias Page 13
LOGO INFORMATI UNIT Database Administration
ON SHEET MODULE Modeling Data Objects
Key
Composit Attribute
Key
Modeling Data Objects version 1.0 Year 2019 prepared By: Ermias Page 13
LOGO INFORMATI UNIT Database Administration
ON SHEET MODULE Modeling Data Objects
me pt B Credit
Na De Do ID Name
ID
GPA
Student Course
Ag
e Enrolled_in
Acedamic_year Semester
Grade
Modeling Data Objects version 1.0 Year 2019 prepared By: Ermias Page 13
LOGO INFORMATI UNIT Database Administration
ON SHEET MODULE Modeling Data Objects
One-to-one relationship
A customer is associated with at most one loan via the relationship borrower
A loan is associated with at most one customer via borrower
One-To-Many Relationships
In the one-to-many relationship a loan is associated with at most one customer via borrower, a
customer is associated with several (including 0) loans via borrower
Modeling Data Objects version 1.0 Year 2019 prepared By: Ermias Page 13
LOGO INFORMATI UNIT Database Administration
ON SHEET MODULE Modeling Data Objects
Many-To-Many Relationship
A customer is associated with several (possibly 0) loans via borrower.
A loan is associated with several (possibly 0) customers via borrower.
Modeling Data Objects version 1.0 Year 2019 prepared By: Ermias Page 13
LOGO INFORMATI UNIT Database Administration
ON SHEET MODULE Modeling Data Objects
Modeling Data Objects version 1.0 Year 2019 prepared By: Ermias Page 13
LOGO INFORMATI UNIT Database Administration
ON SHEET MODULE Modeling Data Objects
Normalization
A relational database is merely a collection of data, organized in a particular manner. As the
father of the relational database approach, Codd created a series of rules called normal forms
that help define that organization
Database normalization is a series of steps followed to obtain a database design that allows for
consistent storage and efficient access of data in a relational database. These steps reduce data
redundancy and the risk of data becoming inconsistent.
NORMALIZATION is the process of identifying the logical associations between data items
and designing a database that will represent such associations but without suffering the update
anomalies which are;
1. Insertion Anomalies
2. Deletion Anomalies
3. Modification Anomalies
Normalization may reduce system performance since data will be cross referenced from many
tables. Thus de-normalization is sometimes used to improve performance, at the cost of reduced
consistency guarantees.
Normalization normally is considered as good if it is lossless decomposition.
All the normalization rules will eventually remove the update anomalies that may exist during
data manipulation after the implementation. The update anomalies are; The type of problems that
could occur in insufficiently normalized table is called update anomalies which includes;
(1) Insertion anomalies
An "insertion anomaly" is a failure to place information about a new database entry into all the
places in the database where information about that new entry needs to be stored. In a properly
normalized database, information about a new entry needs to be inserted into only one place in
the database; in an inadequately normalized database, information about a new entry may need to
be inserted into more than one place and, human fallibility being what it is, some of the needed
additional insertions may be missed.
(2) Deletion anomalies
Modeling Data Objects version 1.0 Year 2019 prepared By: Ermias Page 13
LOGO INFORMATI UNIT Database Administration
ON SHEET MODULE Modeling Data Objects
A "deletion anomaly" is a failure to remove information about an existing database entry when it
is time to remove that entry. In a properly normalized database, information about an old, to-be-
gotten-rid-of entry needs to be deleted from only one place in the database; in an inadequately
normalized database, information about that old entry may need to be deleted from more than
one place, and, human fallibility being what it is, some of the needed additional deletions may be
missed.
(3) Modification anomalies
A modification of a database involves changing some value of the attribute of a table. In a
properly normalized database table, what ever information is modified by the user, the change
will be effected and used accordingly.
The purpose of normalization is to reduce the chances for anomalies to occur in a database.
Deletion Anomalies:
If employee with ID 16 is deleted then ever information about skill C++ and the type of
skill is deleted from the database. Then we will not have any information about C++ and
its skill type.
Insertion Anomalies:
What if we have a new employee with a skill called Pascal? We can not decide weather
Pascal is allowed as a value for skill and we have no clue about the type of skill that
Pascal should be categorized as.
Modeling Data Objects version 1.0 Year 2019 prepared By: Ermias Page 13
LOGO INFORMATI UNIT Database Administration
ON SHEET MODULE Modeling Data Objects
Modification Anomalies:
What if the address for Helico is changed from Piazza to Mexico? We need to look for
every occurrence of Helico and change the value of School_Add from Piazza to Mexico,
which is prone to error.
Database-management system can work only with the information that we put explicitly
into its tables for a given database and into its rules for working with those tables, where
such rules are appropriate and possible.
Functional Dependency (FD)
Before moving to the definition and application of normalization, it is important to have an
understanding of "functional dependency."
Data Dependency
The logical associations between data items that point the database designer in the direction of a
good database design are referred to as determinant or dependent relationships.
Two data items A and B are said to be in a determinant or dependent relationship if certain
values of data item B always appears with certain values of data item A. if the data item A is the
determinant data item and B the dependent data item then the direction of the association is from
A to B and not vice versa.
The essence of this idea is that if the existence of something, call it A, implies that B must exist
and have a certain value, and then we say that "B is functionally dependent on A." We also
often express this idea by saying that "A determines B," or that "B is a function of A," or that "A
functionally governs B." Often, the notions of functionality and functional dependency are
expressed briefly by the statement, "If A, then B." It is important to note that the value B must be
unique for a given value of A, i.e., any given value of A must imply just one and only one value
of B, in order for the relationship to qualify for the name "function." (However, this does not
necessarily prevent different values of A from implying the same value of B.)
X Y holds if whenever two tuples have the same value for X, they must have the same value
for Y
The notation is: AB which is read as; B is functionally dependent on A.
Modeling Data Objects version 1.0 Year 2019 prepared By: Ermias Page 13
LOGO INFORMATI UNIT Database Administration
ON SHEET MODULE Modeling Data Objects
Example
Dinner Type of Wine
Meat Red
Fish White
Cheese Rose
Since the type of Wine served depends on the type of Dinner, we say Wine is functionally
dependent on Dinner.
Dinner Wine
Dinner Type of Wine Type of Fork
Meat Red Meat fork
Fish White Fish fork
Cheese Rose Cheese fork
Since both Wine type and Fork type are determined by the Dinner type, we say Wine is
functionally dependent on Dinner and Fork is functionally dependent on Dinner.
Dinner Wine
Dinner Fork
Partial Dependency
If an attribute which is not a member of the primary key is dependent on some part of the
primary key (if we have composite primary key) then that attribute is partially functionally
dependent on the primary key.
Let {A, B} is the Primary Key and C is no key attribute.
Full Dependency
Modeling Data Objects version 1.0 Year 2019 prepared By: Ermias Page 13
LOGO INFORMATI UNIT Database Administration
ON SHEET MODULE Modeling Data Objects
If an attribute which is not a member of the primary key is not dependent on some part of the
primary key but the whole key (if we have composite primary key) then that attribute is fully
functionally dependent on the primary key.
Let {A, B} is the Primary Key and C is no key attribute
Then if {A, B} C and B C and A C doesn’t hold (if B cannot determine C and B cannot
determine C) Then C Fully functionally dependent on {A, B}
Transitive Dependency
In mathematics and logic, a transitive relationship is a relationship of the following form: "If A
implies B, and if also B implies C, then A implies C."
Example:
If Mr X is a Human, and if every Human is an Animal, then Mr X must be an
Animal.
Generalized way of describing transitive dependency is that:
If A functionally governs B, AND
If B functionally governs C
THEN A functionally governs C
Provided that neither C nor B determines A i.e. (B / A and C / A)
In the normal notation:
Modeling Data Objects version 1.0 Year 2019 prepared By: Ermias Page 13
LOGO INFORMATI UNIT Database Administration
ON SHEET MODULE Modeling Data Objects
Completeness for use: Is all of the data needed to support the pertinent application
development project modeled?
Completeness: Are the business areas and concepts represented by the model completely
addressed?
Accuracy: Does the model correctly represent the entities, attributes and business
relationships of interest? Are the optionality and cardinalities correct?
Standards conformance: Does the model and the supporting metadata store follow the
prescribed policies and practices?
Generalization and specialization: Does the model represent the data at the appropriate
level of abstraction?
Structure: Does the model follow the data modeling rules for the level of normalization
(typically third normal form) used?
Modeling Data Objects version 1.0 Year 2019 prepared By: Ermias Page 13
LOGO INFORMATI UNIT Database Administration
ON SHEET MODULE Modeling Data Objects
The data model addresses several subject areas and crosses organizational boundaries
Model validation by the business community can be performed in several ways. From the
modeler's perspective, the most straightforward approach is to print a copy of the diagram
and walk through it with the business representatives. This approach requires the
businessperson to understand a diagram that is IT oriented, and it is appropriate when the
validation is performed by the data stewardship council or people directly involved in IT
projects.
To some businesspeople, the entity relationship diagram is like a foreign language. These
people are likely to resist learning how to read the diagram, and a different approach for
validating the model is needed. For these people, the best approach is for the data modeler to
identify the portions of the model for each person to validate and to verbally interpret the
information in the model and the associated business rules. For instance, if the model
contains the entities and relationships in the example (see figure), the businessperson should
be asked to confirm that a person is always assigned to a specific department, but that some
departments may have no employees within them.
Modeling Data Objects version 1.0 Year 2019 prepared By: Ermias Page 13
LOGO INFORMATI UNIT Database Administration
ON SHEET MODULE Modeling Data Objects
Further, since the metadata includes definitions, the definitions for "department" and
"employee" should be confirmed. Additionally, the data elements included within each of the
two entities should be listed, and the businessperson should be asked whether or not any
significant ones have been omitted.
The business data model describes the business. While the representation of the data can be
validated by representatives from data management, the content should be validated by
businesspeople. The review process itself should be tailored to the reviewer and alternatives
to an examination of the actual diagram may be needed if the reviewer is not familiar with
the notations.
Data Validation is in computer science, data validation is the process of ensuring that a
program operates on clean, correct and useful data. It uses routines, often called "validation
rules" or "check routines", that check for correctness, meaningfulness, and security of data
that are input to the system. The rules may be implemented through the automated facilities
of a data dictionary, or by the inclusion of explicit application program validation logic.
This article explains how to add validation rules to a database. Validation rules restrict what
users can enter in a given field, and also help ensure that your database users enter the proper
types or amounts of data.
Modeling Data Objects version 1.0 Year 2019 prepared By: Ermias Page 13
LOGO INFORMATI UNIT Database Administration
ON SHEET MODULE Modeling Data Objects
A validation rule limits or controls what users can enter in a table field or a control (such as a
text box) on a form. Microsoft Office Access 2007 provides a number of ways to validate data,
and you often use several of those techniques to define a validation rule. You can think of
validation rules as a set of layers — you can use some or all of the layers when you need to
ensure that your users enter data properly.
Data types Data types typically provide the first layer of validation. When you design a
database table, you define a data type for each field in the table, and that data type
restricts what users can enter. For example, a Date/Time field accepts only dates and
times, a Currency field accepts only monetary data, and so on.
Field sizes Field sizes provide another layer of validation. For example, if you create a
field that stores first names, you can set it to accept a maximum of 20 characters. Doing
so can prevent a malicious user from pasting in large amounts of gibberish text into the
field, or it can prevent an inexperienced user from mistakenly entering a first and last
name in a field designed only to hold a first name.
Table properties Table properties provide very specific types of validation. For
example, you can set the Required property to Yes and, as a result, force users to enter a
value in a field.
You can also use the Validation Rule property to require specific values, and the Validation
Text property to alert your users to any mistakes. For example, entering a rule such as >100 And
<1000 in the Validation Rule property forces users to enter values between 100 and 1,000. A
rule such as [EndDate]>=[StartDate] forces users to enter an ending date that occurs on or after
a starting date. Entering text such as "Enter values between 100 and 1,000" or "Enter an ending
date on or after the start date" in the Validation Text property tells users when they have made a
mistake and how to fix the error.
For the steps needed to add a validation rule to a table field, see the section Validate data
Modeling Data Objects version 1.0 Year 2019 prepared By: Ermias Page 13
LOGO INFORMATI UNIT Database Administration
ON SHEET MODULE Modeling Data Objects
Input masks You can use an input mask to validate data by forcing users to enter
values in a specific way. For example, an input mask can force users to enter dates in a
European format, such as 2007.04.14.
You can use some or all of those techniques to validate your data. Some of those features, such
as data types, become part of your database by default, but you can use other techniques, such as
field properties, validation rules, and input masks, at your discretion.
This article explains how to use the Validation Text and Validation Rule properties in table
fields, queries, and form controls. A complete discussion of other validation tools, such as data
types, field sizes, and input masks, is beyond the scope of this article.
For more information about data types and field sizes, see the article Modify or change the
data type set for a field. For more information about input masks, see the article Create an
input mask to enter field or control values in a specific format.
Field validation rules Use a field validation rule to check the value that you enter in a
field when you leave the field. For example, suppose you have a Date field, and you enter
>=#01/01/2007# in the Validation Rule property of that field. Your rule now requires
users to enter dates on or after January 1, 2007. If you enter a date earlier than 2007 and
then try to place the focus on another field, Access prevents you from leaving the current
field until you fix the problem.
Record (or table) validation rules Use a record validation rule to control when you
can save a record (a row in a table). Unlike field validation rules, record validation rules
refer to other fields in the same table. You create record validation rules when you need
to check the values in one field against the values in another. For example, suppose your
business requires you to ship products within 30 days and, if you don't ship within that
time, you must refund part of the purchase price to your customer. You can define a
Modeling Data Objects version 1.0 Year 2019 prepared By: Ermias Page 13
LOGO INFORMATI UNIT Database Administration
ON SHEET MODULE Modeling Data Objects
If the syntax for validation rules looks cryptic, the tables in the section What you can put in a
validation rule explain the syntax and provide some example validation rules.
You can define validation rules for tables and for controls on forms. When you define rules for
tables, those rules apply when you import data. To add validation rules to a table, you open the
table in Design view and set various table properties. To add validation rules to a form, you open
the form in Design view and add rules to the properties of individual controls.
The steps in the section Validate data during entry in table fields explain how to add validation
rules to the properties in table fields. The steps in the section Validate data during entry in forms,
later in this article, explain how to add rules to the properties in individual controls.
Your validation rules can contain expressions — functions that return a single value. You can
use expressions to perform calculations, manipulate characters, or test data. When you create
validation rules, you use expressions primarily to test data. For example, an expression can check
for one of a series of values, such as "Addiss Ababa" Or "Moscow" Or "Paris" Or
"Helsinki". Expressions can also perform mathematical operations. For example, the expression
<100 forces users to enter values less than 100. The expression ([OrderDate] - [ShipDate])
calculates the number of days that elapsed between the time an order was placed and the time it
shipped.
Modeling Data Objects version 1.0 Year 2019 prepared By: Ermias Page 13
LOGO INFORMATI UNIT Database Administration
ON SHEET MODULE Modeling Data Objects
The following tables provide reference information for validation rules, including the syntax that
the most common rules use, links to information about using wildcard characters in your rules,
and examples that you can adapt for use with your data.
The following table provides examples of field-level and record-level validation rules, plus
explanatory validation text. You can adapt these examples to fit your content.
>=0
-or-
Modeling Data Objects version 1.0 Year 2019 prepared By: Ermias Page 13
LOGO INFORMATI UNIT Database Administration
ON SHEET MODULE Modeling Data Objects
For more information about expressions, see the article Create an expression. For more
information about functions, see the article Functions (arranged by category).
Surround the names of table fields with square brackets, like so:
[RequiredDate]<=[OrderDate]+30.
Surround dates with pound signs (#), like so: <#01/01/2007#
Surround text values with double quotation marks, like so: IN
("Tokyo","Paris","Moscow"). Also, note that you separate items with commas, and
you place lists inside parentheses.
In addition to those rules, the following table shows the common arithmetic operators and provides
examples of how you can use them.
NOT Tests for converse values. Use before any NOT > 10 (the same as <=10).
Modeling Data Objects version 1.0 Year 2019 prepared By: Ermias Page 13
LOGO INFORMATI UNIT Database Administration
ON SHEET MODULE Modeling Data Objects
LIKE Matches pattern strings in Text and Memo fields. LIKE "Geo*"
= Equal to.
Modeling Data Objects version 1.0 Year 2019 prepared By: Ermias Page 13
LOGO INFORMATI UNIT Database Administration
ON SHEET MODULE Modeling Data Objects
Modeling Data Objects version 1.0 Year 2019 prepared By: Ermias Page 13
Self-Check 1
Answer the questions on the following questionnaire; provide the answer sheet to your
trainer.
Check your answers by looking at the feedback sheets; ask for the assistance of the
trainer whenever necessary.
Satisfactory
Questions
Response
The trainee should answer the following questions YES NO
No Validation rule Validation text
2 >=0
5 >=Int(Now())
7 LIKE "[A-Z]*@[A-Z].com" OR
"[A-Z]*@[A-Z].net" OR "[A-
Z]*@[A-Z].org"
I. Write the Correct Answer
1. What are the ER-Model Components?
2. In ER-Modeling _____________ is represented by Oval.
3. Types of Relationships
4. In ER-Modeling Relationship represented by ___________
Shapes
5. What is DATABASE NORMALIZATION
6. The logical associations between data items that point the
database designer in the direction of a good database
design are referred to as ___________
7. What are the Data modeling validation criteria?
8. Write at least four information gathering methods in order
to Design the ER-Model
9. this Represents
10. What is Data Validation?
11. What are the three Anomalies of Database
12. ______________rule limits or controls what users can
enter in a table field or a control (such as a text box) on a
form
Feedback to Trainee:
a. Entities
b. Attributes
c. Relationships
d. Constraints
2. Attribute
3. Relationship
4. Types of Relationships
a. One-to -One Relationship
b. One-to-Many Relationship
c. Many-to-Many Relationship
5. Is a series of steps followed to obtain a database design that allows for consistent storage
and efficient access of data in a relational database.
6. Information gathering Methods
9. Database Anomalies
o Insertion Anomalies
Performance Criteria
Satisfactory
Assessment Criteria
Response
The trainee will be assessed through the following criteria: YES NO
Answered all the interview questions clearly
Performed all activities accordingly
Followed all instructions in the activities
Feedback to Trainee: