SQL ORDER by

Introduction to RDBMS Concepts

What is Data?

It is stored representation of OBJECTS and EVENTS that have some useful meaning and importance in user’s environment. A data can be of  two types Structure and Unstructured.

  • Structured Data : It can be easily organised and stored in database and have some structured form. e.g. Name, Address, ID etc.
  • Unstructured Data : It can not be easily organised into database like pictures, videos, Map, Sensors data etc.

What is Information?

Processed form of data is called as information such that it increases the knowledge of the person who uses the data.

What is Metadata? 

In simple term a metadata is data about data, means the data which describes the properties and characteristics end user data and context of the data. Metadata enables the architect  and programmers to understands exactly in which form data should exist within the system. Metadata can include information such as:

  • Data Name
  • Data Definitions
  • Length or Size
  • Allowed values
  • Data sources
  • Data Owner

Database Management System :  DBMS is a software or tool that is used to create, manage and provide controlled access to the the databases.

Basically DBMS used to :

  • Creating the database.
  • Updating/Modifying the database.
  • Storing data into the database.
  • Retrieving the data from the database.

Different DBMS Models:

  • Flat File DBMS.
  • Hierarchical DBMS.
  • Network DBMS.
  • Relational DBMS.
  • Object – Oriented DBMS.
  • Object – Relational DBMS.
  • Data warehousing.
  • Web – enabled DBMS

 

RDBMS :-  RDBMS stands for relational database management system, which  is based on relational data model introduced by E. F Codd MS is basis of SQL and used by all modern databases like Oracle, DB 2, MS SQL Server, My SQL, MS Access etc.

Components of the Model are:

  • Collection of Objects or Relations that stored the data.
  • A set of Operators that can act on Relations to produce other relations.
  • Data Integrity for Accuracy and Consistency.
  • And should use a relation or two – dimensional Table to store the data.

RDBMS Concepts


 

What is a Table?

Table is an object of RDBMS which is used to store information/data in a two-dimensional matrix form. Table is a collection of related attributes which stores information/data in Rows and Column.

Fig 1. Example of a SQL Table

What is a Field?

A field is a specific column in a table, which is used to hold a particular information about every row/records in a relational database. For example in Fig 1. Student_ID, Name, Contact, Address represents the Field.

What is Row/Tuple?

It represents all data required to represent a particular instance of a table. Each row in a table can be uniquely identified by declaring a PRIMARY KEY or UNIQUE KEY. For e.g.  101, Suman, 0912727814, Delhi all together represents a Row.

What is Column?

A column is a vertical entity in a table that contains all information associated with a particular field in a table.

SQL Constraints:

SQL constrains are the rules that used to limit the type of the data that will store in the database as well as ensures the accuracy and reliability of the data. Constraints could be of two types Column level constraint (applied on a particular column) and Table level constraints (applied on whole table ).

  • Unique Constraints :  Used to uniquely identify each record in a table.
  • NOT NULL :  Ensures that a column can not have null values.
  • DEFAULT :  To assign a default value to a column.
  • PRIMARY KEY :  It is also used to uniquely identify each record/rows in a table and can not be NULL.
  • FOREIGN KEY :  It acts as a primary key in one table and a column in another table.
  • CHECK Constraints :  It is used to check that all values in a column satisfy certain conditions.
  •  INDEX :  Used to create and retrieve data from the database very quickly.

Data Integrity :

Data Integrity refers to maintaining and assuring the consistency and accuracy of data over its entire life cycle. Followings are the data integrity exists in each RDBMS.

  • Entity Integrity : There should not be duplicate rows in a table.
  • Referential Integrity : The rows which are used by other records can not be deleted.
  • Domain Integrity : Ensures the valid entries for a given column by restricting the type, the format, or the range of values.
  • User Defined Integrity : Ensures some specific business rules that do not fall into entity, domain or referential integrity.

Database Normalization :

Normalization is the process of organizing data into database efficiently by removing redundant data and assuring data dependencies.

  • First Normal Form (1st NF)
  • Second Normal Form (2nd NF)
  • Third Normal Form (3rd NF)
  •  Boyce and Codd Normal Form (BCNF).

Leave a Reply