Professional Documents
Culture Documents
Database Management
Database Management
Annexure No:
CASE STUDY
DATABASE MANAGEMENT
SYSTEM(203105251)
4TH SEMESTER
COMPUTER SCIENCE DEPARTMENT
1
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
TABLE OF CONTENTS
1. IBM DB2
Introduction
Structure
Components
Features & Funtionalities
Drawbacks
Tools
Real life example
2. MS SQL
Components
Features &Functionalities
Structure
Introduction
Drawbacks
Tools
Real life example
3. MY SQL
Introduction
Structure
Components
Features &Functionalities
Drawbacks
Real life example
4. PL/SQL
Introduction
Structure
Components
Features &Functionalities
Drawbacks
Reallife example
2
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
Introduction :
Db2 is a family of data management products, including database
servers, developed by IBM. They initially supported the relational
model, but were extended to support object-relational features and
non-relational structures like JSON and XML. The brand name was
originally styled as DB/2, then DB2 until 2017 and finally changed to
its present form.
When IBM released its first relational-database product, they wanted
to have a commercial-quality sublanguage as well, so it overhauled
SEQUEL, and renamed the revised language Structured Query
Language (SQL) to differentiate it from SEQUEL and also because
the acronym "SEQUEL" was a trademark of the UK-based Hawker
Siddeley aircraft company.
IBM bought Metaphor Computer Systems to utilize their GUI
interface and encapsulating SQL platform that had already been in use
since the mid 80's.
In parallel with the development of SQL, IBM also developed Query
by Example (QBE), the first graphical query language.
Structure :
SQLMA_DB2
3
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
Instance related information.
SQLMA_DBASE
Database related information for a particular database. If you use
the SQLMA_DBASE value, you must provide the database name in the
object parameter of sqlm_obj_struct structure.
SQLMA_APPL
Application information for an application that matches the provided
application ID. If you use the SQLMA_APPL value, you must provide an
application ID in the object parameter of sqlm_obj_struct structure.
SQLMA_AGENT_ID
Application information for an application that matches the provided agent
ID. If you use the SQLMA_AGENT_ID value, you must provide an agent
ID in the agent_id parameter of sqlm_obj_struct structure.
SQLMA_DBASE_TABLES
Table information for a particular database. If you use
the SQLMA_DBASE_TABLES value, you must provide the database name
in the object parameter of sqlm_obj_struct structure.
SQLMA_DBASE_APPLS
Application information for all applications connected to a particular
database. If you use the SQLMA_DBASE_APPLS value, you must provide
the database name in the object parameter of sqlm_obj_struct structure.
SQLMA_DBASE_APPLINFO
Summary application information for connections to a particular database. If
you use the SQLMA_DBASE_APPLINFO value, you must provide the
database name in the object parameter of sqlm_obj_struct structure.
SQLMA_DBASE_LOCKS
List of locks held on a particular database. If you use
the SQLMA_DBASE_LOCKS value, you must provide the database name
in the object parameter of sqlm_obj_struct structure.
SQLMA_APPL_LOCKS
4
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
List of locks held by an application with the matching application ID. If you
use the SQLMA_APPL_LOCKS value, you must provide an application ID
in the object parameter of sqlm_obj_struct structure.
SQLMA_APPL_LOCKS_AGENT_ID
List of locks held by an application with the matching agent ID. If you use
the SQLMA_APPL_LOCKS_AGENT_ID value, you must provide an agent
ID in the agent_id parameter of sqlm_obj_struct structure.
SQLMA_DBASE_ALL
Database information for all active databases in the instance.
SQLMA_APPL_ALL
Application information for all database connections in the instance.
SQLMA_APPLINFO_ALL
Summary application information for all connections to the instance.
SQLMA_DCS_APPLINFO_ALL
List of Database Connection Services (DCS) connections to the instance.
SQLMA_DYNAMIC_SQL
Dynamic SQL statement information for a particular database. If you use
the SQLMA_DYNAMIC_SQL value, you must provide the database name
in the object parameter of sqlm_obj_struct structure.
SQLMA_DCS_DBASE
Information for a particular Database Connection Services (DCS) database.
If you use the SQLMA_DCS_DBASE value, you must provide the database
name in the object parameter of sqlm_obj_struct structure.
SQLMA_DCS_DBASE_ALL
Information for all active Database Connection Services (DCS) databases.
SQLMA_DCS_APPL_ALL
Database Connection Services (DCS) application information for all
connections.
SQLMA_DCS_APPL
Database Connection Services (DCS) application information for an
application that matches the provided application ID. If you use
5
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
the SQLMA_DCS_APPL value, you must provide an application ID in the
object parameter of sqlm_obj_struct structure.
SQLMA_DCS_APPL_HANDLE
Database Connection Services (DCS) application information for an
application that matches the provided agent ID. If you use
the SQLMA_DCS_APPL_HANDLE value, you must provide an agent ID
in the agent_id parameter of sqlm_obj_struct structure.
SQLMA_DCS_DBASE_APPLS
Database Connection Services (DCS) application information for all active
connections to a particular database. If you use
the SQLMA_DCS_DBASE_APPLS value, you must provide the database
name in the object parameter of sqlm_obj_struct structure.
SQLMA_DBASE_TABLESPACES
Table space information for a particular database. If you use
the SQLMA_DBASE_TABLESPACES value, you must provide the
database name in the object parameter of sqlm_obj_struct structure.
SQLMA_DBASE_BUFFERPOOLS
Bufferpool information for a particular database. If you use
the SQLMA_DBASE_BUFFERPOOLS value, you must provide the
database name in the object parameter of sqlm_obj_struct structure.
SQLMA_BUFFERPOOLS_ALL
Information for all bufferpools.
SQLMA_DBASE_REMOTE
Remote access information for a particular federated database. If you use
the SQLMA_DBASE_REMOTE value, you must provide the database
name in the object parameter of sqlm_obj_struct structure.
SQLMA_DBASE_REMOTE_ALL
Remote access information for all federated databases.
COMPONENTS:
The two primary types of storage structures in DB2 are table spaces and index
spaces.
6
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
DB2 databases
DB2 databases are a set of DB2 structures that include a collection of tables,
their associated indexes, and the table spaces in which they reside. You define a
database by using the CREATE DATABASE statement.
DB2 table spaces
A DB2 table space is a set of volumes on disks that hold the data sets in which
tables are actually stored. Every table is stored in table space.
DB2 index spaces
An index space is a DB2 storage structure that contains a single index.
Annexure No:
3) SQL compatibility
4) Advanced storage optimization
5) Disaster Recovery
Hybrid Flex
FUNCTIONALITIES:
The following table shows DB2 server editions and their features:
Editions Features
Workgroup Server Edition It is designed for Workgroup or mid-size business organizations. Using this
(WSE) WSE you can work with - High Availability Disaster Recovery (HARD)
Online Reorganization Pure XML Web Service Federation support DB2
Homogeneous Federations Homogeneous SQL replication Backup
compression
Express -C It provides all the capabilities of DB2 at zero charge. It can run on any physical
or virtual systems with any size of configuration.
Express Edition It is designed for entry level and mid-size business organizations. It is full
featured DB2 data server. It offers only limited services. This Edition comes
with - Web Service Federations DB2 homogeneous federations Homogeneous
SQL Replications Backup compression
Enterprise Developer It offers only single application developer. It is useful to design, build and
Edition prototype the applications for deployment on any of the IBM server. The
8
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
software cannot be used for developing applications.
Tools :
1) IBM DB2 Augmented Dta Explorer
2) IBM DB2 Connect
3) IBM Data Studio
4) IBM Lift
5) IBM DB2 tools for z/OS.
9
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
Advantages :
2 The need for data replication decreases because all of the systems can
access all of the data.
5 When growth is needed, you can redistribute the file across more
systems, and applications can run unchanged on the new systems.
With DB2 Multisystem, you can use the same input/output (I/O) methods (GETs,
PUTs, and UPDATEs) or file access methods that you have used in the past. No
additional or different I/O methods or file access methods are required.
Annexure No:
2) Quicker and more reliable claims processing
3) Reducing downtime and refining operations to supply a
community of millions with clean water
4) Simplified IT to deliver “everywhere and always on” customer
service.
11
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
The second topic of our case study is MS SQL:
Introduction :
MS SQL Server is a relational database management system (RDBMS)
developed by Microsoft. This product is built for the basic function of storing
retrieving data as required by other applications. It can be run either on the same
computer or on another across a network. This tutorial explains some basic and
advanced concepts of SQL Server such as how to create and restore data, create
login and backup, assign permissions, etc. Each topic is explained using
examples for easy understanding.
Structure :
SYSTEM Displays virtual systems tables and other metaschema tables. These tables cannot be altered.
TABLE
TABLE Displays all application tables. Table nodes expand to show columns, indexes, and
triggers.When you select a table name, data and meta-data appear in the DB Details view.
Note: Since tables are displayed in ASCII order and sorting is case-sensitive, all lowercase
table names sort after the uppercase table names.
PROCEDURE Displays all procedures that are stored in the database and available for reuse.
12
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
TRIGGER Displays all triggers, which execute in response to a predefined event or activity.
FUNCTIONS Displays all functions, or pieces of a program that you can use separately from the remainder
of the program.
Components:
FEATURES:
1)To create databases.
13
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
3)To analyze the data through SQL Server Analysis Services (SSAS).
5)To carry out ETL operations through SQL Server Integration Services (SSIS)
TOOLS:
MySQL Workbench.
phpMyAdmin.
HeidiSQL.
Toad Edge.
Navicat
14
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
15
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
MS SQL
INTRODUCTION:
Introduction :
MySQL is a fast, easy-to-use RDBMS being used for many small
and big businesses. MySQL is developed, marketed and supported by
MySQL AB, which is a Swedish company. MySQL is becoming so
popular because of many good reasons −
MySQL is released under an open-source license. So you have
nothing to pay to use it.
MySQL is a very powerful program in its own right. It handles
a large subset of the functionality of the most expensive and
powerful database packages.
16
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
MySQL uses a standard form of the well-known SQL data
language.
MySQL works on many operating systems and with many
languages including PHP, PERL, C, C++, JAVA, etc.
MySQL works very quickly and works well even with large
data sets.
MySQL is very friendly to PHP, the most appreciated language
for web development.
MySQL supports large databases, up to 50 million rows or more
in a table. The default file size limit for a table is 4GB, but you
can increase this (if your operating system can handle it) to a
theoretical limit of 8 million terabytes (TB).
MySQL is customizable. The open-source GPL license allows
programmers to modify the MySQL software to fit their own
specific environments.
Structure :
The terms literal refer to a fixed data value. MySQL evaluates seven types of
literal values numeric, character string, date and time, hexadecimal, boolean,
bit-field, and NULL Values
Numeric Literals
17
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
can use the integer notation in expressions, conditions, SQL functions, and
SQL statements. The examples of integer is as follows :
Valid integers :
0
1254
-256
132.45
12.00
-21032.6309e+10
18
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
Features :
19
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
Functionality:
Function Description
20
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
21
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
another string
22
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
a string
23
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
Function Description
24
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
25
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
26
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
27
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
Function Description
28
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
ADDDATE Adds a time/date interval to a date and then returns the date
DATE_ADD Adds a time/date interval to a date and then returns the date
29
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
30
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
LAST_DAY Extracts the last day of the month for a given date
31
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
QUARTER Returns the quarter of the year for a given date value
32
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
TO_DAYS Returns the number of days between a date and date "0000-
00-00"
33
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
YEARWEEK Returns the year and week number for a given date
Function Description
CASE Goes through conditions and return a value when the first
condition is met
34
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
CURRENT_USER Returns the user name and host name for the MySQL
account that the server used to authenticate the current
client
Annexure No:
NULL
SESSION_USER Returns the current MySQL user name and host name
SYSTEM_USER Returns the current MySQL user name and host name
USER Returns the current MySQL user name and host name
Tools :
1) Dbforge
2) MY SQL Workbench
3) Php MyAdmin
4) Heidi SQL
5) Toad Edge for MY SQL
36
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
Advantages :
Data Security. ...
On-Demand Scalability. ...
High Performance. ...
Round-the-clock Uptime. ...
Comprehensive Transactional Support. ...
Complete Workflow Control. ...
Reduced Total Cost of Ownership. ...
The Flexibility of Open Source.
37
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
PL/SQL
INTRODUCTION:
It combines the data manipulation power of SQL with the processing power of
procedural language to create super powerful SQL queries.
PL/SQL means instructing the compiler 'what to do' through SQL and 'how to do'
through its procedural way.
Similar to other database languages, it gives more control to the programmers by the
use of loops, conditions and object-oriented concepts.
STRUCTURE:
38
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
Figure 7 PL/SQL Architecture Diagram
COMPONENTS:
1. PL/SQL block
2. PL/SQL Engine
3. Database Server
PL/SQL engine is the component where the actual processing of the codes takes
place.
PL/SQL engine separates PL/SQL units and SQL part in the input (as shown in the
image below).
The separated PL/SQL units will be handled by the PL/SQL engine itself.
39
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
The SQL part will be sent to database server where the actual interaction with
database takes place.
It can be installed in both database server and in the application server.
This is the most important component of Pl/SQL unit which stores the data.
The PL/SQL engine uses the SQL from PL/SQL units to interact with the database
server.
It consists of SQL executor which parses the input SQL statements and execute the
same.
FEATURES& FUNCTIONALITIES:
DISADVANTAGES OF PL/SQL:
Proprietary to Oracle
PL/SQL is proprietary to Oracle which means if you were to change database vendors
then you would have to re-write all your Oracle PL/SQL programs.
Poor I/O Features
The other limitation of PL/SQL is that there is very little support for i/o either to
read/write files or to read from or write to a user interface. The rationale behind this is
that PLSQL is designed for manipulating information from the database and not for
processing files or communicating with users.
40
Faculty of Engineering &Technology
Subject Name : DBMS
Subject Code : 203105251
B.Tech :CSE, Year : 2, Semester : 4
Annexure No:
41