Relational Model: Relational model represents data in the form of relations or tables.
Relational Schema: Schema represents structure of a relation. e.g.; Relational Schema of STUDENT relation can be represented as:
STUDENT (STUD_NO, STUD_NAME, STUD_PHONE, STUD_STATE, STUD_COUNTRY, STUD_AGE)
Relational Instance: The set of values present in a relation at a particular instance of time is known as relational instance as shown in Table 1 and Table 2.
Attribute: Each relation is defined in terms of some properties, each of which is known as attribute. For Example, STUD_NO, STUD_NAME etc. are attributes of relation STUDENT.
Domain of an attribute: The possible values an attribute can take in a relation is called its domain. For Example, domain of STUD_AGE can be from 18 to 40.
Tuple: Each row of a relation is known as tuple. e.g.; STUDENT relation given below has 4 tuples.
NULL values: Values of some attribute for some tuples may be unknown, missing or undefined which are represented by NULL. Two NULL values in a relation are considered different from each other.
Table 1 and Table 2 represent relational model having two relations STUDENT and STUDENT_COURSE.
Codd rules were proposed by E.F. Codd which should be satisfied by relational model.
- Foundation Rule: For any system that is advertised as, or claimed to be, a relational data base management system, that system must be able to manage data bases entirely through its relational capabilities.
- Information Rule: Data stored in Relational model must be a value of some cell of a table.
- Guaranteed Access Rule: Every data element must be accessible by table name, its primary key and name of attribute whose value is to be determined.
- Systematic Treatment of NULL values: NULL value in database must only correspond to missing, unknown or not applicable values.
- Active Online Catalog: Structure of database must be stored in an online catalog which can be queried by authorized users.
- Comprehensive Data Sub-language Rule: A database should be accessible by a language supported for definition, manipulation and transaction management operation.
- View Updating Rule: Different views created for various purposes should be automatically updatable by the system.
- High level insert, update and delete rule: Relational Model should support insert, delete, update etc. operations at each level of relations. Also, set operations like Union, Intersection and minus should be supported.
- Physical data independence: Any modification in the physical location of a table should not enforce modification at application level.
- Logical data independence: Any modification in logical or conceptual schema of a table should not enforce modification at application level. For example, merging of two tables into one should not affect application accessing it which is difficult to achieve.
- Integrity Independence: Integrity constraints modified at database level should not enforce modification at application level.
- Distribution Independence: Distribution of data over various locations should not be visible to end-users.
- Non-Subversion Rule: Low level access to data should not be able to bypass integrity rule to change data.
Given the basic ER and relational models, which of the following is INCORRECT? [GATE CS 2012]
A. An attribute of an entity can have more than one value
B. An attribute of an entity can be composite
C. In a row of a relational table, an attribute can have more than one value
D. In a row of a relational table, an attribute can have exactly one value or a NULL value
Answer: In relation model, an attribute can’t have more than one value. So, option C is the answer.
This article is contributed by Sonal Tuteja. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- Difference between E-R Model and Relational Model in DBMS
- Difference between Relational model and Document Model
- Mapping from ER Model to Relational Model
- Relational Model in DBMS
- Difference between Relational Algebra and Relational Calculus
- Difference between Tuple Relational Calculus (TRC) and Domain Relational Calculus (DRC)
- Boyce-Codd Normal Form (BCNF)
- OLAP Guidelines (Codd's Rule)
- Introduction of Relational Algebra in DBMS
- Various rules of Object Oriented DBMS
- Types of Keys in Relational Model (Candidate, Super, Primary, Alternate and Foreign)
- Difference between Hierarchical and Relational data model
- Difference between Network and Relational data model
- Difference between Hierarchical, Network and Relational Data Model
- Anomalies in Relational Model
- Constraints on Relational database model
- Tuple Relational Calculus (TRC) in DBMS
- Domain Relational Calculus in DBMS
- Difference between Bottom-Up Model and Top-Down Model
- Neo4j | Naming rules and recommendations