Database Concepts - Pps
Database Concepts - Pps
Topics Covered…
DATABASE
DBMS & RDBMS
DATABASE MODELS
DATABASE OBJECTS
NORMALIZATION
SQL COMMANDS & FUNCTIONS
JOINS
DWH Team
Database
DWH Team
Database Management System[DBMS]
MSAccess, Foxpro,DBase
DWH Team
Relational Database Management System[RDBMS]
DWH Team
Database Model
Hierarchical Model
Network model
Relational Model
DWH Team
Hierarchical Model
DWH Team
Network Data Model
DWH Team
Relational Data Model
DWH Team
Database Objects
Table
Table is a database object or structure where the
data is stored.A table will contains rows and
columns. A row in a table is called 'tuple' and the
column in the table is called 'Attribute'.
View
• A view is a virtual, dynamic or logical table
computed or collated from data in the database.
• Changing the data in a table alters the data shown
in the view.
DWH Team
Database Objects
Stored Procedure
A stored procedure is a subroutine available to
applications accessing a relational database
system. Stored procedures are actually stored in
the database.
Trigger
A database trigger is procedural code that is
automatically executed in response to certain
events on a particular table in a database. Triggers
can restrict access to specific data, perform
logging, or audit data modifications.
DWH Team
Database Objects
• Index
A database index is a data structure that improves the
speed of operations in a table.Indexes can be created
using one or more columns.The disk space required
to store the index is typically less than the storage of
the table , or audit data modifications.
Primary Key
• It is a unique and non-nullable attribute of the table
• The primary key of a relational table uniquely
identifies each record in the table.
Foreign key
• It is a field in a relational table that matches the
primary key column of another table.
• Foreign key is used to establish and enforce a link
between the data in two tables.
DWH Team
Keys in a table
Candidate Keys
• A key that uniquely identifies rows in a table. Any of
the identified candidate keys can be used as the
table's primary key.
Super Key
• A Candidate Key as a Super Key that contains only
the minimum number of columns necessary to
determine uniqueness.
DWH Team
Database Normalization
DWH Team
Database Normalization
DWH Team
Database Normalization
DWH Team
Database Normalization
DWH Team
Database Normalization
DWH Team
Structured Query Language[SQL]
DWH Team
Data Definition Language [DDL]
DWH Team
Data Manipulation Language [DML]
DWH Team
Data Control Language[DCL]
DWH Team
Transaction Control Language[TCL]
DWH Team
Select Options…
DWH Team
Functions in SQL
DWH Team
String Functions
DWH Team
Conversion Functions
DWH Team
Aggregation Functions
DWH Team
Date Functions
DWH Team
Some other Commands / Functions
DWH Team
Set Operations in Database
DWH Team
Joins
DWH Team
Inner Joins
DWH Team
Inner Joins
DWH Team
Outer Joins
DWH Team
Outer Joins
Left outer join : The resultant table will contain all the
records from the first table plus the records from second table
which satisfying the join condition.
Right outer join : The resultant table will contain all the
records from the second table plus the records from first table
which satisfying the join condition
Full outer join : A full outer join combines the results
of both left and right outer joins. The joined table will contain
all records from both tables
DWH Team
Joins Diagrams
DWH Team
DWH Team