- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Explain attributes and the different types of attributes in DBMS?
Attributes are the properties which describe an entity.
Example
The attributes of student entity are as follows −
-
Roll number
-
Name
-
Branch
-
Age
Types of attributes
The different types of attributes are as follows −
Composite attribute
It can be divided into smaller sub parts, each sub part can form an independent attribute.
For example −
Name FirstName MiddelName LastName
Simple or Atomic attribute
Attributes that cannot be further subdivided are called atomic attributes.
For example −
Phone number PIN code
Single valued Attribute
Attributes having a single value for a particular item is called a single valued attribute.
For example: Room Number
Multi-valued Attribute
Attribute having a set of values for a single entity is called a multi-valued attribute.
For example −
e-mail Tel.No Hobbies
Derived Attributes or stored Attributes
When one attribute value is derived from the other is called a derived attribute.
For example: Age can be derived from date of birth, where,
-
Age is the derived attribute.
-
DOB is the stored attribute.
Complex Attribute
Nesting of composite and multi-valued attributes forms a complex attribute.
For example
If a person has more than one house and each house has more than one phone. Then, that attribute phone is represented as a complex attribute.