Relational information model is the number one statistics version, that's used extensively round the arena for facts garage and processing. This version is straightforward and it has all of the houses and abilties required to technique statistics with garage efficiency.
standards
Tables − In relational facts model, relations are stored within the format of Tables. This format stores the relation amongst entities. A table has rows and columns, wherein rows represents facts and columns represent the attributes.
Tuple − A single row of a desk, which incorporates a unmarried report for that relation is called a tuple.
Relation example − A finite set of tuples inside the relational database gadget represents relation example. Relation times do now not have duplicate tuples.
Relation schema − A relation schema describes the relation name (desk name), attributes, and their names.
Relation key − each row has one or greater attributes, called relation key, that can become aware of the row inside the relation (desk) uniquely.
characteristic area − every attribute has a few pre-described value scope, known as attribute area.
Constraints
every relation has some situations that have to maintain for it to be a legitimate relation. these situations are referred to as Relational Integrity Constraints. There are three predominant integrity constraints
- Key constraints
- domain constraints
- Referential integrity constraints
- Key Constraints
There should be at least one minimal subset of attributes inside the relation, which can identify a tuple uniquely. This minimum subset of attributes is referred to as key for that relation. If there are more than one such minimum subsets, those are called candidate keys.
Key constraints force that −
- in a relation with a key characteristic, no tuples can have same values for key attributes.
- a key attribute can not have NULL values.
- Key constraints are also known as Entity Constraints.
Area Constraints
- Attributes have specific values in real-international scenario. for instance, age can simplest be a high quality integer. The identical constraints were tried to appoint on the attributes of a relation. each attribute is sure to have a specific variety of values. for example, age cannot be much less than zero and phone numbers can't incorporate a digit out of doors 0-9.
Referential integrity Constraints
- Referential integrity constraints work at the concept of foreign Keys. A foreign key's a key attribute of a relation that may be referred in different relation.
- Referential integrity constraint states that if a relation refers to a key attribute of a extraordinary or identical relation, then that key element ought to exist.