Data Objects, Attributes and Relationship in DBMS


Data Objects

Data objects refers to a collection of various attributes which are combined to make it understandable. Data object values have their own unique id, attribute and data types.

The most common type is the data table. Data objects are mostly represented in data models, which resolve with the relationship among the data objects.

Types of Data Objects

Array is a one-dimension data object. i.e, can be a single column in a table.

Example

Student

Name

Aman

Naman

Monu

Records

Records refers to a single row for every dimension in a table.

Example

Student

Name

id

roll_no

branch

Pointers

It helps in memory location of other entities in a table.

Files

It is used to confirm the correct structure of other data objects. Files help us with data integrity by taking entities having the same types.

Scalar

Scalar means single i.e. It indicates single values rather than tables,arrays and records.

Attributes

Attribute describes the characteristics of data objetct. It derives the type of entity. Every attribute has a unique data types. Attributes helps in making database searchable by organising the data meaningfully and thus provide data accuracy with clear definition of entered data in database.

Types of attributes

Simple attribute

They are simple in nature and can be further divided into sub-attributes.

Example

Composite attributes

It is made by combination of two or more simple attributes.

Single Valued Attribute

It can only have a single value and is used to provide a uniqueness to entities.

Multivalued Attribute

It can be used to have more than one value. Information about entities, and relationships are often stored through a multivalued attribute. Multivalued attributes also represent hierarchical data.

Here, mail id and mob_no are multi-valued attributes.

Derived Attributes

Derived Attributes depend upon other attributes and are not directly stored in the database.

Here, age will be derived from DOB, therefore age is a derived attribute.

Complex Attributes

It consists of both composite and multivalued attributes and are used to represent relationships between entities.

Key Attribute

It is used to uniquely get the rows in a table. There is primary key and foreign key which helps connect the table.

Stored Attribute

They are the attributes that are constant for an instance.

Relationship

A Relationship is where two or more tables are linked through a specific relation.

Types of relationship are −

One-to-One(1:1)

In a one-to-one relationship,the single record of table_1 is related to the single record of tbale_2 and vice-versa.

Example −There are two entities department and HOD. Now, every department will have only one HOD and every HOD will handle only one department.

One-to-Many

In a One-to-Many relationship, a single record of table_1 is related to one or more records of table_2.

Example −There are two entities, HOD() and Faculty(). Now, every HOD can be of one or more than one faculty but faculty cannot have more than one HOD.

Many-to-One

In a Many-to-One relationship, multiple records of table_1 are related to a single record of table_2.

Example −There are two entities, course() and Faculty(). Now, multiple courses can be taught by single faculty comes under this relation.

Many-to-Many

In a Many-to-Many relationship, one record of table_1 is related to multiple records of table_2 and vice-versa

Example −There are two entities, students and courses. Now, one student can enrol in multiple courses and one course can be taken by multiple students.

Conclusion

This Article consists of three parts. First is data objects which refers to the collection of attributes to make data clear. Types of data objects are Array, records, pointer, files and scalar. Second is Attributes which refer to characteristics of data object and describe entity types. Types of attributes are simple, composite, single-valued, multivalued, derived, complex, key and stored attributes. Third is relationship which tells the relation between data objects or tables. types of relationship are one-to-one,one-to-many,many-to-one and many-to-many.

Updated on: 22-Aug-2023

526 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements