Skip to content
We areTOP 1%

What are the different types of attributes in an ER model?

EasyConceptER Model
Track your progress
First attempt
Re-solve after a few days
Final pass before interviews

Answer

Attributes are classified by their structure, by how many values they hold and by how their values are obtained.

  • Simple vs composite: a simple attribute cannot be divided, such as age; a composite attribute has parts, such as name (first, last) or address (street, city, pin).
  • Single-valued vs multivalued: a single-valued attribute has one value per entity, such as dob; a multivalued attribute can have several, such as phones, and is drawn as a double oval.
  • Stored vs derived: a derived attribute is computed from another one, such as age from dob, and is drawn as a dashed oval.
  • Key attribute: uniquely identifies the entity, such as emp_id, and is underlined.

Example: Employee(emp_id, name{first, last}, {phones}, dob, age)

  • emp_id is the key, name is composite, phones is multivalued and age is derived from dob.
  • In tables, name becomes the columns first_name and last_name, and phones moves to a separate table employee_phones(emp_id, phone), because a column must hold a single value.

More in ER Model

Sign in to track your progress

Your checkboxes, streak and activity heatmap are saved to your account and sync across devices. It is free.
Sign in with email

New here? Create an account