Tuesday 28 August 2012

What is DBMS?

DBMS stands for ... Database Management System.

This system is assisting us to manage/store the Data accurately and very easiest way

DBMS is a collection of programs which helps to handle the data in following ways..
    * Adding Data
    * Deleting Unnecessery Data
    * Modifying the Existing Record

A DBMS support various functions like data security, data integrity, data sharing, data concurrence, data independence, data recovery etc. However, all database management systems that are now available in the market like Sybase, Oracle, and MS-Access do not provide the same set of functions, though all are meant for data management.

Tuesday 21 August 2012

How to Create Database?

Database can be created using following ways:-
  1. Using SQL Script
  2. Using Wizard
SQL Script:-
Create Database statement is used to create a database in SQL Server.

Syntax: 
Following SQL Syntax helps to create a database
 

CREATE DATABASE <database_Name>
 
Sample:
Execute the following Query at SQL Server management studio, it will create a Database named as “TestDB”
 
CREATE DATABASE TestDB

Wizard:-
 
Database can be created using SQL Server management studio, follow the steps given below to create a DB
 
1.    Open SQL Server management studio from Program menu (start Menu)
 
 
2.    Login/connect to the SQL Server by providing proper credentials
 
 
3. After connected to the server, Select the Database Node in the Object Explorer --> Right Click on the Database node, Select “New Database” (refer the Exhibit given below for further reference)
 
 
4.    New Database Wizard will appear as shown below,
5.    Enter the name of the database in “Database name” text field.
 

6.    Click Ok to create the database 

7.    Once it is created, it will be display under database node as shown below

 To Know More about Database, Refer the Article posted at,
http://blog-sqllearning.blogspot.in/2012/08/what-is-database.html
 

Saturday 18 August 2012

What is Database?

Database is a system in which we can store and manage the data in the organized way. It is abbreviated as DB.

It is a Repository in which we can store the collections of data. data are stored in database in the form of tables and other database objects as mentioned below:-
  • Table - Combination of rows and columns
  • Tables - Collections of Table
  • Views - Virtual Table
  • Stored procedure & function - collection of logical scripts
  • etc.,
Relational Database Management System (RDBMS) helps to access the data information from the database.

Following are the examples of the RDBMS:-
  • MsAccess
  • SQL Server
  • Oracle
  • etc.,
Refer the article given below to know about "How to Create a Database"
http://blog-sqllearning.blogspot.in/2012/08/how-to-create-database.html

What is DCL?


DCL stands for.. Data Control Language

DCL Provides the access permission over the data which is stored in the database.

DCL Commands Includes,
  • Grant - Command will permission to the user to do specific operations.
  • Revoke - command will remove the given permission from the user.
As mentioned above, DCL commands will allow or deny the following operations..
CONNECT
SELECT
INSERT
UPDATE
DELETE
EXECUTE

Monday 13 August 2012

What is TCL?


TCL Stands for...Transaction Control Language
  • TCL is a subset of SQL,
  • TCL helps to control the Transaction process in RDBMS.
TCL commands includes,
  • Begin Transaction - Marks the starting point of transaction.
  • Commit Transaction - Marks the end of a successful implicit or explicit transaction.
  • Rollback Transaction - Rolls back an explicit or implicit transaction to the beginning of the transaction

What is Transaction in SQL?

A transaction is a sequence of operations performed as a single logical unit of work, usually a group of DML statements.

A logical unit of work must follow four properties to qualify as a transaction,
  • Atomicity,
  • Consistency,
  • Isolation,
  • and Durability
These Properties are called as Transaction Property, Some people will call as ACID Property.

Atomicity: A transaction must be an atomic unit of work; either all of its data modifications are performed or none of them is performed.

Consistency: When completed, a transaction must leave all data in a consistent state. In a relational database, all rules must be applied to the transaction's modifications to maintain all data integrity. All internal data structures, such as B-tree indexes or doubly-linked lists, must be correct at the end of the transaction.

Isolation: Modifications made by concurrent transactions must be isolated from the modifications made by any other concurrent transactions. A transaction either sees data in the state it was in before another concurrent transaction modified it, or it sees the data after the second transaction has completed, but it does not see an intermediate state. This is referred to as serializability because it results in the ability to reload the starting data and replay a series of transactions to end up with the data in the same state it was in after the original transactions were performed.

Durability: After a transaction has completed, its effects are permanently in place in the system. The modifications persist even in the event of a system failure.

Sunday 12 August 2012

What is DML?


DML Stands for... Data Manipulation Language
  • DML is a language of SQL, It will be supported by RDBMS System
  • DML is helps to manipulate the data into relational database
  • DML modify the stored data (not the structure of DB object) in the database
  • DML is purely handling the data in the database in different ways like loading/removing/modifying the data in the database
Following SQL commands are part of DML
SELECT
SELECT ... INTO (It is exists in DDL & DML)
INSERT INTO
UPDATE
DELETE
TRUNCATE
Data manipulation languages are mainly classified as 2 type, procedural programming and declarative programming.

Procedural Programming : Collection of SQL Statements
Declarative Programming: The individual SQL statements are declarative

Tuesday 7 August 2012

What is DDL?


DDL Stands For...
Data Definition Language (or)
Data Description Language

Ø  DDL is a kind of programming language which helps to create Database objects like ...
Table
Columns
object Relationships
Views
Procedures
Functions
Indexes
Packages
Triggers
Types
Synonyms
Database
Linked Objects
Security
etc.,
Ø  The Script which is used to create db objects like above also called as Schema which will be stored in Data Dictionary
Ø  DDL will be supported by Database Management Systems (DBMS)
Ø  The script which helps to create/define/Modify/Remove an objects in DB will be part of DDL
Ø  Following are the general DDL Commands...
o    CREATE - To create New objects in a database
o    ALTER - Modify the structure of Existing objects database
o    DROP - Delete/Remove an objects from the database
o    TRUNCATE - Remove the data page which is attached to a table object,
o    COMMENT - Add comments to the Data dictionary
o    RENAME - rename an Existing DB object
o    SELECT ... INTO - Creating new object by using existing object schema, it will not capture identity definition and field relationship