Dbms Ca2

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 11

Different types of Attribute

DEPARTMENT OF COMPUTER APPLICATION


CONTAI COLLEGE OF LEARNING & MANAGEMENT
SCIENCE

NAME: Bikram Adak


UNIVERSITY ROLL NO.: 34001222017
STREAM: BCA
SEMESTER: 4th
PAPER: Database Management System
PAPER CODE: BCAC401
SESSION: 2022-2025
ABSTRACT
Attributes play a fundamental role in structuring and organizing data
within Database Management Systems (DBMS). This abstract
explores the various types of attributes prevalent in DBMS and their
significance in data modeling and management. The types of
attributes discussed include key attributes, composite attributes,
derived attributes, single-valued attributes, multi-valued attributes,
and stored attributes. Each type serves a distinct purpose in
representing the characteristics of entities and relationships within
a database schema. Key attributes uniquely identify each entity
instance and are crucial for establishing relationships and enforcing
integrity constraints. Composite attributes aggregate multiple
simple attributes into a single unit, enhancing data organization and
reducing redundancy. Derived attributes are computed from other
attributes, offering dynamic insights into the database without
requiring explicit storage. Single-valued attributes hold atomic
values, while multi-valued attributes accommodate multiple values
within a single attribute instance, offering flexibility in representing
complex data structures. Stored attributes are persisted in the
database, while virtual attributes are computed on-demand.
Understanding the nuances of these attribute types is essential for
designing efficient and effective database schemas, ensuring data
integrity, and facilitating accurate querying and manipulation of
data. This abstract serves as a primer for database practitioners and
enthusiasts seeking to delve deeper into the intricate landscape of
attributes within DBMS.
INTRODUCTION
DBMS consists of an ER (Entity Relationship) model, and we
generally use it to describe data elements and study their
relationships within the specified system. These data elements are
also known as entities which are real-world objects with self-
existence. We always represent entities in rectangle shapes in
DBMS. These entities have their own properties and characteristics
defined with the help of attributes. Basically, attributes provide
additional information and describe the characteristics & properties
of an entity in DBMS. An entity may contain any number of
attributes while one of the attributes is considered to be a primary
key attribute. An attribute can take its values from a set of possible
values for each entity instance in an ER model in DBMS.
LITERATURE REVIEW
DEFINATION:
Attributes are the distinguishing characteristics that define an entity
in a relational database. The attributes are further divided into six
categories: Composite, Atomic, Single, Multi-Valued, Stored, and
Complex Attributes. When applied to each column cell in a
relational database, attributes are the defining characteristics that
characterize all the objects falling under a particular category. The
values utilized to describe a particular member or attribute as a
column in an entity table are known as attributes. If there are
several students in a class, we may use attributes like a student's roll
number, name, branch, age, etc., to identify each one of them
uniquely. Students can use these qualities to describe an object.
In DBMS, there are various types of attributes available:

 Simple Attributes
 Composite Attributes
 Single Valued Attributes
 Multi-Valued Attributes
 Derived Attributes
 Complex Attributes (Rarely used attributes)
 Key Attributes
 Stored Attributes

Now, we will study all of these different types of attributes in DBMS


in detail along with their diagrams and examples:

1.Simple Attributes:
Simple attributes in an ER model diagram are independent attributes
that can't be classified further and also, can't be subdivided into any
other component. These attributes are also known as atomic
attributes.
Example Diagram:

As we can see in the above example, Student is an entity represented


by a rectangle, and it consists of attributes: Roll_no, class, and Age.
Also, there is a point to be noted that we can't further subdivide the
Roll_no attribute and even the other two attributes into sub-
attributes. Hence, they are known as simple attributes of the Student
entity.
2.Composite Attributes:
Composite attributes have opposite functionality to that of simple
attributes as we can further subdivide composite attributes into
different components or sub-parts that form simple attributes. In
simple terms, composite attributes are composed of one or more
simple attributes.
Example Diagram:

As we can see in the above example, Address is a composite attribute


represented by an elliptical shape, and it can be further subdivided
into many simple attributes like Street, City, State, Country,
Landmark, etc.
3.Single-Valued Attributes:
Single valued attributes are those attributes that consist of a single
value for each entity instance and can't store more than one value.
The value of these single-valued attributes always remains the same,
just like the name of a person.
Example Diagram:

As we can see in the above example, Student is an entity instance,


and it consists of attributes: Roll_no, Age, DOB, and Gender. These
attributes can store only one value from a set of possible values. Each
entity instance can have only one Roll_no, which is a unique, single
DOB by which we can calculate age and also fixed gender. Also, we
can't further subdivide these attributes, and hence, they are simple
as well as single-valued attributes.

4.Multi-Valued Attributes:
Multi-valued attributes have opposite functionality to that of single-
valued attributes, and as the name suggests, multi-valued attributes
can take up and store more than one value at a time for an entity
instance from a set of possible values. These attributes are
represented by co-centric elliptical shape, and we can also use curly
braces { } to represent multi-valued attributes inside it.
Example Diagram:

As we can see in the above example, the Student entity has four
attributes: Roll_no and Age are simple as well as single-valued
attributes as discussed above but Mob_no and Email_id are
represented by co-centric ellipse are multi-valued attributes. Each
student in the real world can provide more than one email-id as well
as a mobile contact number, and therefore, we need these attributes
to be multi-valued so that they can store multiple values at a time for
an entity instance.

5.Derived Attributes:
Derived attributes in DBMS are those attributes whose values can be
derived from the values of other attributes. They are always
dependent upon other attributes for their value.
For example, As we were discussing above, DOB is a single-valued
attribute and remains constant for an entity instance. From DOB, we
can derive the Age attribute, which changes every year, and can
easily calculate the age of a person from his/her date of birth value.
Hence, the Age attribute here is derived attribute from the DOB
single-valued attribute.
Example Diagram:

Derived attributes are always represented by dashed or dotted


elliptical shapes.
6.Key Attributes:
Key attributes are special types of attributes that act as the primary
key for an entity and they can uniquely identify an entity from an
entity set. The values that key attributes store must be unique and
non-repeating.
Example Diagram:

7.Complex Attributes:
Complex attributes are rarely used in DBMS. They are formed by the
combination of multi-valued and composite attributes. These
attributes always have many sub-sections in their values.
Example Diagram:

As we can see in the above example, Address_EmPhone (which


represents Address, Email, and Phone number altogether) is a
complex attribute. Email and Phone number are multi-valued
attributes while Address is a composite attribute which is further
subdivided as House number, Street, City & State. This combination
of multi-valued and composite attributes altogether forms a complex
attribute.
8.Stored Attributes:
Values of stored attributes remain constant and fixed for an entity
instance and also, and they help in deriving the derived attributes.
For example, the Age attribute can be derived from the Date of Birth
attribute, and also, the Date of birth attribute has a fixed and
constant value throughout the life of an entity. Hence, the Date of
Birth attribute is a stored attribute.
Example Diagram:
CONCLUSION
In conclusion, understanding the different types of attributes in a
database management system (DBMS) is crucial for designing
efficient and effective databases.
1. Key Attributes: These uniquely identify each record in a table
and are essential for maintaining data integrity and enabling
efficient data retrieval through indexing.
2. Composite Attributes: Comprising multiple atomic attributes,
they provide a structured way to represent complex data within
a single attribute.
3. Single-Valued and Multi-Valued Attributes: Single-valued
attributes contain only one value for each record, while multi-
valued attributes can contain multiple values. Proper handling
of multi-valued attributes is important to avoid data
redundancy and ensure database normalization.
4. Derived Attributes: Calculated from other attributes within the
database, derived attributes can streamline data management
and enhance data consistency by ensuring that related
information remains accurate.
5. Null Attributes: Representing missing or unknown data, null
attributes require careful handling to avoid ambiguities and
maintain data quality.
6. Stored and Derived Attributes: Stored attributes are physically
stored within the database, while derived attributes are
calculated dynamically based on other attribute values.
By recognizing the characteristics and roles of these attribute types,
database designers can develop well-structured databases that
efficiently store, manage, and retrieve data to meet the requirements
of diverse applications and users. Additionally, adherence to best
practices in attribute definition and management ensures data
integrity, consistency, and reliability within the DBMS.
REFERENCES
1. "Database Management Systems" by Raghu Ramakrishnan and
Johannes Gehrke: This textbook provides a comprehensive overview of
database management systems, covering fundamental concepts as well
as advanced topics.

2. "Database System Concepts" by Abraham Silberschatz, Henry F. Korth,


and S. Sudarshan: Another popular textbook in the field, covering the
basics of database systems along with more advanced topics.

3. "Fundamentals of Database Systems" by Ramez Elmasri and Shamkant


B. Navathe: This book is widely used in university courses and provides a
solid foundation in database systems.

4. "Modern Database Management" by Jeffrey A. Hoffer, Ramesh


Venkataraman, and Heikki Topi: This book emphasizes the latest trends
and technologies in database management, making it suitable for those
interested in contemporary practices.

5. "Database Management Systems: Designing and Building Business


Applications" by Gerald V. Post : This book focuses on the practical
aspects of designing and building database systems for business
applications.

You might also like