Sunteți pe pagina 1din 15

Database Concepts

Created by: Tapas Mishra


Approved by: Venugopal Gopinathan
Date of Release: 29-MAY-2009
Version No:1
Duration in Hours: 10

Agenda
What is Database
Why Database
What is DBMS

What is RDBMS
DBMS Vs RDBMS
Normalization
Importance of Normalization

De-normalization
SQL Statements(DQL,DDL,DML,TCL and DCL)
SQL Joins
Sub-queries
SQL Objects
Overview of T-SQL/PL-SQL
DEMO

2
2

What is Database ?
A database is a collection of information that is
organized so that it can easily be accessed,
managed, and updated. It allows fast storage
and retrieval of the data.

3
3

Database Features
The redundancy can be reduced
The inconsistency can be avoided
The data can be shared
Security restriction can be applied

Standards can be enforced

4
4

What is DBMS?
Database management software manages how the data is
written to the disk and how it can be retrieved.
There are several categories of data models, including
relational,object-relational,flat data or network models
etc,etc.These models can be used to distinguish different types
of management software.

5
5

What is RDBMS ?

Relational Data Base Management System adds the additional


condition that the system supports a tabular structure for the
data, with enforced relationships between the tables. This
excludes the databases that don't support a tabular structure or
don't enforce relationships between tables

6
6

DBMS Vs RDBMS
DBMS does not impose any constraints or security with regard to data
manipulation it is user or the programmer responsibility to ensure the ACID
PROPERTY of the database whereas the RDBMS is more with this regard
bcz RDBMS define the integrity constraint for the purpose of holding ACID
PROPERTY.
Atomicity
Consistency
Isolation

Durability

7
7

What is Normalization ?
Normalization is a design technique of reducing a complex data structure into
its simplest and most stable form by eliminating redundant attributes, keys,
and relationships
The goal of normalization is to create a set of relational tables that are free of
redundant data and that can be consistently and correctly modified

Functional Dependencies :- The concept of functional dependencies is


the basis for the first three normal forms. A column, Y, of the relational table R
is said to be functionally dependent upon column X of R if and only if each
value of X in R is associated with precisely one value of Y at any given time
A short-hand notation for describing a functional dependency is: R.x >; R.y

8
8

Basic Normal Forms


First Normal Form :- A relation is said to be in First Normal Form (1NF) if
and only if each attribute of the relation is atomic. More simply, to be in 1NF,
each column must contain only a single value and each row must contain the
same columns.
Second Normal Form :- A relational table is in second normal form (2NF) if it
is in 1NF and every non-key column is fully dependent upon the primary key.
Third Normal Form :- A relational table is in third normal form (3NF) if it is
already in 2NF and every non-key column is non transitively dependent upon
its primary key. In other words, all non-key attributes are functionally
dependent only upon the primary key.

9
9

What is De-normalization?
De-normalization is a technique to move from higher to lower normal forms of
database modeling in order to speed up database access
De-normalization is usually done to decrease the time required to execute
complex queries
Online Analytical Processing (OLAP) databases usually do batch updates
followed by many reads, and they often gain in performance by denormalization, i.e. moving back from complete normalization towards a design
that requires fewer tables

10
10

SQL Statements
SELECT
INSERT
UPDATE
DELETE
CREATE
ALTER
DROP
TRUNCATE
COMMIT
ROLLBACK
SAVEPOINT
GRANT
REVOKE

Data retrieval

Data manipulation language (DML)

Data definition language (DDL)

Transaction control

Data control language (DCL)


11

SQL JOINS

JOINS

INNER JOINS

EQUI
JOINS

NON-EQUI
JOINS

OUTER JOINS

LEFT
OUTER
JOINS

CROSS
JOINS

RIGHT
OUTER
JOINS
FULL
OUTER
JOINS

12
12

Introduction to T-SQL Concepts

Cursor

Procedure
Function
Trigger

13
13

Q&A?

Any Questions ?

14
14

THANK YOU

Tapas Mishra
15
15

S-ar putea să vă placă și