Attributes in DBMS

 Attributes in DBMS


·         properties of entities are called attributes.
·         All attributes are store domain or range of values. example, students' name store alphabetic values, and students' age store positive integer or numeric values, etc.
·         Example, in student entity attributes are name, class, and age.
·         Attribute is represented by ellipses symbol and it is directly connected with its entity (rectangle). 

Types of Attributes

 Simple attribute (simple single-valued attributes) 

  • It stores atomic values (not divided further). example, a student's phone number (10 digits value).
  • example, EMPLOYEE_ID, passport#, driving license#, SSN, etc

 Composite attribute(simple multi-valued attributes) 

  • These are made by more than one simple attribute. example, student's name( first_name and last_name).
  • They make a tree-like structure.
  • Every sub node is connected with its main attribute.

Derived attribute (Stored Attribute)

  • These attributes do not exist in the physical database, but their values are derived from other attributes which are present in the database.
  • Example -  age can be derived from data_of_birth and current date.
  • This is represented by a dashed ellipse. 

Multi-Valued Attribute

  • These attributes can have more than one value.
  • Example: e-mail, a person can have more than one email address,
  • These are represented by a double ellipse.

Descriptive Attribute

  • Relationship Attributes is called a descriptive attribute.
  • Example, employee works for department. Here ‘works for is the relationship between employee and department entities.
Entity-Set and Keys
Key is an attribute/field/column or collection of attributes that uniquely identifies an entity among entity sets.
Example, the roll_number of a student makes him/her identifiable among students.
·        Super Key − A set of attributes (one or more) collectively identifies an entity in an entity set. 
·        Candidate Key − A minimal super key is called a candidate key. An entity set may have more than one candidate key.
·        Primary Key − A primary key is one of the candidate keys in the database. It uniquely identifies the entity set.

Post a Comment