Semantic Object and Semantic Object Attributes:
Definition and Explanation:
The word semantic means "meaning" and semantic
object is one that represents "the meaning of the user's data". CAR, COMPUTER,
and STUDENT are examples of objects. The word semantic is used along with the
object to distinguish objects used in semantic model from the objects defined in
object-oriented programming (OOP) languages. It is important to note that OOP
objects are programming objects whereas semantic objects in this case are real
world objects.
The semantic object diagram, or object diagram is
used to show the semantic objects. A vertical rectangle is used to represent the
semantic object. The name of object and its attributes are written inside the
rectangle. The name of the object appears at the top (in capital letters) and
.attributes of the semantic object are written under it.
Defining Semantic Objects:
Entities and objects are similar. Like an entity an object has a collection of attributes. For example, the STUDENT object could
have attributes like Name, Address, and Marks etc. The attributes represent all
of the characteristics that are required to create the data model.
Like entities, semantic objects are grouped into
classes and each object class has a unique name. For example, in a college
"STUDENT" and "TEACHER" represent different object classes. It must be noted
that the object class "STUDENT" and object class "TEACHER" have unique names.
Like entity name, object name is also written in capital letters."
Semantic Object Attributes:
A semantic object has a collection of attributes
that define its characteristics. For example, the STUDENT object could have
attributes like Roll-No, Name, Address, and Marks etc.
There are three types of
attributes of semantic object:
(i) Simple Attributes
(ii) Group Attributes
(iii) Semantic Object Attributes

(i) Simple Attribute:
The attributes of semantic object that are not
divisible are called simple attributes. A simple attribute is also known as
atomic attribute. It contains a single value. For example, the color, marks .and
roll number of student are examples of simple attributes.
(ii) Group Attribute:
The attribute of semantic object that can be
divided into smaller subparts that represent more basic attributes with
independent meanings is called group attribute. For example, student's name can
be divided into: first-name, middle-name and last-name. Similarly, student's
address can be divided into Zip-code, City, Street-address etc. The group
attribute is similar to composite attribute of E-R model.
(iii) Semantic Object Attributes:
Semantic object attributes are the attributes
that establish a relationship between one semantic object to another.
Typically, the object attributes are complete semantic objects.
The University object diagram given in figure 5.1
clears the concept of three types of attributes of semantic object. In this
figure:
- 'Name' represents the simple attribute of
University object, which is not further divided into simple or atomic
attributes.
- 'Address' represents the group attribute,
because it is further divided into simple attributes such as City and Phone.
- DEPARTMENT and STUDENT specify the semantic
object attributes. These objects can be used to create relationships from
one semantic object to another. They are logically contained in University
and are its other objects. Each semantic object is written in capital
letters inside a small rectangle.
The attributes 'Name' and 'Address' are very easy
to understand because 'Name' specifies the name of University, while the
'Address' specifies the address of the university.
Attribute Cardinality:
The cardinality of an attribute represents the
number of instances of an attribute that can exist in an instance of semantic
object. Each attribute of semantic object has two types of cardinalities. These
are:
(i) Minimum Cardinality:
It indicates the minimum number of instances of the attribute that must exist.
Usually, this number is either 0 or 1. If it is 0, then the attribute is not
compulsory to have a value If it is 1, then the attribute must have a value.
(ii) Maximum Cardinality:
It indicates the maximum number of instances of the attribute that may exist.
Usually, this number is either 1 or N. If it is 1, then the attribute cannot
have more than 1 instance. If it is N, then the attribute can have many values
(i.e. any number of instances). Sometimes, the maximum cardinality can have a
specific value such as 10.
The attribute cardinalities are written in the
format N.M, where N indicates the minimum cardinality while M maximum
cardinality. For example, the value for both the minimum and-maximum
cardinalities of attribute 'Name' is 1 ,as shown in figure 5.2. It means that
exactly one value of attribute 'Name' is required. The cardinality of 'Phone' is
l.N, which means that the University is required to have at least one phone
number but may have many. The cardinality of l.N in DEPARTMENT means that a
university is required to have at least one department but may have many. The
UNIVERSITY object diagram with cardinalities of the attributes is given in
figure 5.2.

Object Instance:
A particular semantic object with each
attribute's value is called the object instance. The object diagram for
university as shown in figure 5.2, is a general structure that can be used for
any university. An instance of the university object is shown in figure 5.3,
with each attribute's value for a particular University. The values of the
attributes are shown in figure 5.3.
In the figure, there are three values for 'Phone'
attribute, These values show that the University has three phone numbers.
Similarly STUDENT object attribute has four values. The DEPARTMENT and STUDENT
object attributes are complete objects and each has its own attributes. In the
object diagram, only the names of these objects are shown just to make the
diagram simple.
Paired Attributes:
The semantic object model has two-way objects relationships. If an object
contains another object, the second object, will contain the first. For example,
if UNIVERSITY object contains the object attribute DEPARTMENT, then DEPARTMENT
will contain the matching object attribute UNIVERSITY. These object attributes
are called paired attributes, since they always occur as a pair.

Object Identifier:
The object identifier is one or more attributes
of the object, which is used to identify the object instances. The Roll-No, or
StdCode of the Student object is a best example of object identifier. Usually,
those attributes are used as identifier that can uniquely identify the instances
of the object. For example, Address of student or marks of student are not valid
identifiers.
An identifier that has more than one attribute is
called group identifier. For example, a student can be identified by using its
Roll-No, and its Class attributes.
In semantic object diagrams, object identifiers
are denoted by the letters ID in front of the attribute. If the identifier is
unique., ID is underlined. The cardinality of an ID attribute is 1.1.
Attribute Domains:
The description about the possible values that
can be assigned to the attribute of an object is called the domain of the
attribute. The domain of a simple attribute consists of a physical and semantic
descriptions.
- Physical Description: indicates the type of data
such as numeric, character etc., the length of data, and other constraints such
as first character must be alphabetic, or value must be between 0 and 200. In
some cases, the physical description of a simple attribute domain has a list of
predefined values. For example, the sex attribute of the student object might
have predefined values {'Male', 'Female'}.
- Semantic Description: indicates the purpose or
meaning of the attribute.
The domain of a group attribute also has a physical and a semantic description.
The physical description is a list of all of the attributes in the group and the
order of those attributes. The semantic description indicates the purpose or
meaning of the group. The domain of an object attribute indicates the object
instances of that type. For example, in the UNIVERSITY object the domain of the
STUDENT object attribute is the set of all student object instances in the
database.
Semantic Object Views:
The users of the DBMS access the values of object
attributes through database applications that provide data entry forms, reports,
and queries. In most cases, there is no need to access all attributes of the
object. A figure is shown below that shows two application views of the
UNIVERSITY object.
It is noted that the attribute 'Name' of
UNIVERSITY object is visible in both application views (i.e. Student View and
Department View). The STUDENT object attribute is visible in Student View, where
as Department object attribute is visible in Department view. Therefore, the
semantic object view is defined as:
The portion of an object that is visible to a
particular application is known as semantic object view or simply the view. A
view consists of the name of the object and the list of attributes that are
visible from that view.

|