RDBMS
RDBMS
SUNNY
INTRODUCTION TO RDBMS
What is a column/attribute?
A column is a vertical entity in the table which contains all information associated with a specific field in a table.
For example, "name" is a column in the above table which contains all information about a student's name.
Properties of an Attribute:
Every attribute of a relation must have a name.
Null values are permitted for the attributes.
Default values can be specified for an attribute automatically inserted if no other value is specified for an attribute.
Attributes that uniquely identify each tuple of a relation are the primary key.
DEGREE & CARDINALITY
DEGREE : The total number of attributes that comprise a relation is known as the degree of the table.
CARDINALITY : The total number of tuples at any one time in a relation is known as the table's cardinality.
The relation whose cardinality is 0 is called an empty table.
DIFFERENCE BETWEEN DBMS AND RDBMS
DBMS RDBMS
1) DBMS applications store data as file. 1) RDBMS applications store data in a tabular form.
2) In DBMS, data is generally stored in either a 2) In RDBMS, the tables have an identifier called
hierarchical form or a navigational form. primary key and the data values are stored in the form of
tables.
3) Normalization is not present in DBMS. 3) Normalization is present in RDBMS.
4) DBMS does not apply any security with regards to 4) RDBMS defines the integrity constraint for the
data manipulation. purpose of ACID (Atomocity, Consistency, Isolation and
Durability) property.
5) DBMS uses file system to store data, so there will 5) in RDBMS, data values are stored in the form of
be no relation between the tables. tables, so a relationship between these data values will
be stored in the form of a table as well.
6) DBMS does not support distributed database. 6) RDBMS supports distributed database.
7) Examples of DBMS are file systems, xml etc. 7) Example of RDBMS are mysql, postgre, sql
server, oracle etc.
DBMS ARCHITECTURE
Database architecture can be seen as a single tier or multi-tier. But logically, database architecture is of two types
like:
2-tier architecture
and 3-tier architecture.
Types of DBMS Architecture
o 1-Tier Architecture : In this architecture, the database is directly available to the user. It means the user can
directly sit on the DBMS and uses it.
o 2-Tier Architecture : The 2-Tier architecture is same as basic client-server. In the two-tier architecture,
applications on the client end can directly communicate with the database at the server side.
o 3-Tier Architecture : The 3-Tier architecture contains another layer between the client and server. In this
architecture, client can't directly communicate with the server.
THREE SCHEMA ARCHITECTURE
1. Internal Level : The internal level has an internal schema which describes the physical storage
structure of the database.
o The internal schema is also known as a physical schema.
o It uses the physical data model. It is used to define that how the data will be stored in a block.
o The physical level is used to describe complex low-level data structures in detail.
2. Conceptual Level : The conceptual schema describes the design of a database at the conceptual
level. Conceptual level is also known as logical level.
o The conceptual level describes what data are to be stored in the database and also describes what
relationship exists among those data.
o Programmers and database administrators work at this level.
3. EXTERNAL LEVEL
At the external level, a database contains several schemas that sometimes called as subschema. The subschema is
used to describe the different view of the database.
An external schema is also known as view schema.
DATA MODEL SCHEMA AND INSTANCE
SCHEMA :
o The overall design of a database is called schema.
o A database schema is the skeleton structure of the database. It represents the logical view of the entire database.
o A schema contains schema objects like table, foreign key, primary key, views, columns, data types, stored
procedure, etc.
INSTANCE : The data which is stored in the database at a particular moment of time is called an instance of the
database
DATA INDEPENDENCE
Data Independence : Data independence refers characteristic of being able to modify the schema at one level of
the database system without altering the schema at the next higher level.
There are two types of data independence :
1. Logical Data Independence : Logical Data Independence says that users should be able to manipulate the
Logical View of data without any information of its physical storage.
2. Physical Data Independence : Physical Data Independence means changing the physical level without
affecting the logical level or conceptual level.
NORMALIZATION
Normalization : Normalization is a process of organizing the table in a database in such a way that helps in
minimal data redundancy , insertion , deletion and updation anomalies.