Transcript for:
Relational Data Model Overview

hello everyone and welcome back to a new chapter in the course of dbms in this chapter we are going to learn about relational databases so in this video we will be looking mainly into the basic introduction to relational data model first let us look into a brief history of relational data model the relational data model was first introduced in 1970 by a computer scientist and a mathematician named edgar frank god also called as ted cord he was working for ibm when he invented this relational model in this model he gave a simple way of storing data as well as retrieving data via rows and columns in a table that is this model was all about organizing data into tables with rows and columns this contribution of ted cod had produced a dramatic or a great change and though he has made many other contributions to computer science this invention of his was his biggest achievement the relational data model uses the concept of mathematical relations and theoretically it is based on set theory the first commercial implementations of the relational model was by oracle and slowly even ibm started to implement the same and sqlds or structured query language data system was ibm's first commercial relational database management system the current popular rdbms or relational database management systems are the sql server and access from microsoft db2 and informix from ibm etc an sql query language became the standard language for these commercial rdbms in the later chapters we will be learning sql query language in detail so that is about the history of relational data model next let us learn few terminologies in relation to rdbms as i mentioned earlier a relational database model organizes data in the form of tables or in other words a relational model represents data as a collection of tables and here in rdbms a table is also called a relation so here i can say a relational model represents data as a collection of relations in this table that i have taken student is the relation name or the table name and each row in the table is called a tuple in this relation student we have two tuples or two rows and each column or the column headers are called as attributes or fields in this relation student we have four attributes of four columns hope you have understood these simple terminologies the next terminology that we are going to learn is domain a domain in mathematics is a set of possible values that you can input so similarly in relational database a domain is a set of values that are allowed for an attribute and these values should be atomic that is each value in that domain is not divisible further for example a set of values for the attribute name should be a string of characters that represent the name of persons and here the values has to be atomic another example is domain for the attribute employee ages would be set of atomic values with possible ages of employees of a company allowed to be between 20 and 70 years old so hope you understood what a domain is and domain not only gives a set of values that are allowed for an attribute it also specifies the data type allowed like for example the age has to be a positive integer next what is relation schema a relation schema is used to describe a relation or a table a relation schema is made up of a relation name which is denoted by a capital r and also it is made up of a list of attributes denoted as a1 a2 a3 a4 a5 and a6 you can also write a relation schema by including the data types as given over here where name has to be a string roll number has to be an integer and so on next let us see what is degree or arity of a relation it is defined as the number of attributes in a relation schema we just learned what a relation schema is so in this example of the relation schema that we just saw the number of attributes is 6. therefore the degree of this relation student is 6. next what is cardinality cardinality is the total number of tuples or rows present in a relation here i've taken a student relation with attributes roll number name and age so the cardinality of this student relation is three because there are three rows of three tuples the next terminology that we are going to see is relational database schema a relational database schema is a set of relation schemas and a set of integrity constraints that is if i take a company database the relational database schema of that company would have a collection of relation schemas like the employee relation schema with the employee details the department relation schema the project relation schema and so on so a collection of all these relation schemas along with the integrity constraints make up the relational database schema for a company database next what do you mean by a relation state or relation database instance a relation instance or a relation state is a set of tuples at a given moment of time like for example say at time t 1 this is the set of tuples at that given time so this is the relation state or the relation instance suppose if i am updating this relation by deleting this third row then the set of tuples say at time t2 would be only these two rows so that would be the relation instance or the relation state at that given time so that's it with the terminologies in relation to rdbms with this we come to the end of this video hope you have understood all that we discussed in this video thank you you