SQL Introduction


DBMS
    The Beginning...

Course Designed by Shubham Game.

Objective :
1. Concept of Database 
2. Database Management System(DBMS)
3. Relational Database Management System(RDBMS)
4. Difference Between DBMS and RDBMS 
5. Normalization
6. SQL
7. Basic Principles of Table in SQL
8. Constraints in SQL

Database :
 Data is collection of raw facts, truths and maybe useless until gets organised.
 So, The Database can be called as the collection of meaningful data. It must have
 some point to understand. 
For ex: 
 A car, car would generally consist of-
  • Brand name
  •  
  • Color
  •  
  • Type (SUV, Hatchback)
  •  
  • Model number
  •  
The collection of details of all cars can be considered as database, and the above
 type of data will fill that database.

Database Management System(DBMS)
 When we collect the data, we must arrage it in order to give it some meaning.
For that pupose and for maintaining the data we have Database management
System(DBMS). 
 A databse is a logical collection of data, with some connection.
Def: DBMS is a application software system which allows the user to create
and  manipulate the data to give it some meaning which is  stored in the database.
 DBMS provides datatypes, constraints for the data wich will stored in it.

Advantages: 
1.     Data is independent.
2.      
3.     Data flexibility is increased.
4.      
5.     User can monitor performance of database.
6.      
7.     Data security is provided.
8.      
9.     Data quality is maintained.
10.                         

Disadvantages:
1.     There are some problems with centralized data.
2.      
3.     There are some problems with backup and recovery.
4.      
5.     Cost of S/w and H/w is more.
6.      

Users:
1.     Database designer:
2.      
This includes two persons:
A.               Database Manager:
B.                
 
B.   Database Administrator:
C.    

2.                 Application programmer
3.                  

3.                 Sophisticated user
4.                  

4.                 End user
5.                  

Relational Database Management System(RDBMS)
 Relational Database Management System(RDBMS) is a Database
Management System(DBMS) that is based on relational model.
This concept was introduced by Dr. Edgar F. Codd with 12 rules for it.
But there is no such DBMS that satisfies all tose 12 rules. 
 RDBMS stores the data in the form of related tables. It has advatage that
same data can be viewed in many different ways.
 It has some important features of RDBMS is that a single database can be
spread across several tables. 
 Oracle, Microsoft SQL Server, Sybase SQL Server, and IBM’s DB2 are
some popular cmommercial releases of RDBMS. MySQL, PostgreSQL are free  and commonly used RDBMS.

Difference Between DBMS and RDBMS
Parameters   DBMS      RDBMS
Storage 
DBMS stores data as a file. 
Data is stored in the form of tables. 
Database structure 
DBMS system, stores data in either a navigational or hierarchical form. 
RDBMS uses a tabular structure where the headers are the column names, and the rows contain corresponding values 
Number of Users 
DBMS supports single user only. 
It supports multiple users. 
ACID 
In a regular database, the data may not be stored following the ACID model. This can develop inconsistencies in the database. 
Relational databases are harder to construct, but they are consistent and well structured. They obey ACID (Atomicity, Consistency, Isolation, Durability). 
Type of program 
It is the program for managing the databases on the computer networks and the system hard disks. 
It is the database systems which are used for maintaining the relationships among the tables. 
Hardware and software needs. 
Low software and hardware needs. 
Higher hardware and software need. 
Integrity constraints 
DBMS does not support the integrity constants. The integrity constants are not imposed at the file level. 
RDBMS supports the integrity constraints at the schema level. Values beyond a defined range cannot be stored into the particular RDMS column. 
Normalization 
DBMS does not support Normalization 
RDBMS can be Normalized. 
Distributed Databases 
DBMS does not support distributed database. 
RBMS offers support for distributed databases. 
Ideally suited for 
DBMS system mainly deals with small quantity of data. 
RDMS is designed to handle a large amount of data. 
Dr. E.F. Codd Rules 
Dbms satisfy less than seven of Dr. E.F. Codd Rules 
Dbms satisfy 8 to 10 Dr. E.F. Codd Rules 
Client Server 
DBMS does not support client-server architecture 
RDBMS supports client-server architecture. 
Data Fetching 
Data fetching is slower for the complex and large amount of data. 
Data fetching is rapid because of its relational approach. 
Data Redundancy 
Data redundancy is common in this model. 
Keys and indexes do not allow Data redundancy. 
Data Relationship 
No relationship between data 
Data is stored in the form of tables which are related to each other with the help of foreign keys. 
Security 
There is no security. 
Multiple levels of security. Log files are created at OS, Command, and object level. 
Data Access 
Data elements need to access individually. 
Data can be easily accessed using SQL query. Multiple data elements can be accessed at the same time. 
Examples 
Examples of DBMS are a file system, XML, Windows Registry, etc. 
Example of RDBMS is MySQL, Oracle, SQL Server, etc. 


No comments:

Post a Comment