Home >>DBMS Tutorial >DBMS Relation Data Model

DBMS Relation Data Model

DBMS Relation Data Model

The primary data model is the Relational Data Model, which is commonly used for data storage and processing around the world. This model is simple and has all the features and capabilities needed to process data with efficiency in storage.

Concepts

Tables − Relations are saved in the Tables format in the relational data model. The relation between entities is stored in this format. A table includes rows and columns, where rows represent records, and attributes are represented by columns.

Tuple − A single table row is called a tuple, which includes a single record for that relation.

Relation instance:The relation case is a finite set of tuples in the relational database system. There are no duplicate tuples for relation instances.

A relation schema:specifies the name of the relation (table name), attributes, and their names.

Realtion key- A row has one or more attributes, referred to as the relation key, which can uniquely identify the row in the relation (table).

Domain attribute − Each attribute has a predefined scope of values, known as the domain attribute.

Constraints

A relation has certain conditions that must be true for it to be a valid relation . Relational Integrity Constraints are called these conditions. There are three key constraints of constraints -

  • Key Constraints
  • Constraints of the domain
  • Referential constraints on integrity

Key Constraints

At least one minimal subset of attributes must exist in the relation, which can uniquely define a tuple. For that relation, this minimal subset of attributes is called the key. If more than one of these minimal subsets occurs, they are called candidate keys.

Key constraints force the −

  • No two tuples can have identical values for key attributes in a relation with a key attribute.
  • There can be no NULL values for a key attribute.

Key constraints are also known as Entity Constraints.

Domain Constraints

In real-world situations, attributes have specific values. Age can only be a positive integer, for instance. They also tried to use the same constraints on the features of a relation. Each attribute is bound to have a particular value range. Age may not be less than zero, for instance, and telephone numbers may not contain a digit outside 0-9.

Referential integrity Constraints

On the concept of Foreign Keys, referential integrity constraints work. A foreign key is a key feature of a relation where another relation may be referred to.

The constraint of referential integrity states that if a relation refers to a key attribute of another or the same relation, then there must be that key element.


No Sidebar ads