Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

DBMS Lab Report

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Lab Report

Introduction to SQL
Pronounced as SEQUEL: Structured English QUERY Language
 Pure non-procedural query language
 Designed and developed by IBM, Implemented by Oracle
 1978 System/R IBM- 1st Relational DBMS
 1979 Oracle and Ingres
 1982 SQL/DS and DB2 IBM
 Accepted by both ANSI + ISO as Standard Query Language for any RDBMS
 SQL86 (SQL1) : first by ANSI and ratified by ISO (SQL-87), minor revision on 89
(SQL-89)
 SQL92 (SQL2) : major revision
 SQL99 (SQL3) : add recursive query, trigger, some OO features, and non-scholar type
 SQL2003 : XML, Window functions, and sequences (Not free)
 Supports all the three sublanguages of DBMS: DDL, DML, DCL
 Supports Aggregate functions, String Manipulation functions, Set theory operations, Date
Manipulation functions, rich set of operators ( IN, BETWEEN, LIKE, IS NULL,
EXISTS)
 Supports REPORT writing features and Forms for designing GUI based applications
Data Definition in SQL
CREATE, ALTER and DROP
table…………………………………….……relation
row……………………………………..…….tuple
column………………………………….……attribute
DATA TYPES
Numeric: NUMBER, NUMBER(s,p), INTEGER, INT, FLOAT, DECIMAL
Character: CHAR(n), VARCHAR(n), VARCHAR2(n), CHAR VARYING(n)
Bit String: BLOB, CLOB
 Boolean: true, false, and null

List of Contents
1. Draw E-R diagram and convert entities and relationships to relation table for a given scenario.

a. Two assignments shall be carried out i.e. consider two different scenarios (eg. bank,

college)

2. Write relational algebra queries for a given set of relations.

3. Perform the following:

a. Viewing all databases, Creating a Database, Viewing all Tables in a Database,

Creating Tables (With and Without Constraints), Inserting/Updating/Deleting

Records in a Table, Saving (Commit) and Undoing (rollback)

4. Perform the following:

a. Altering a Table, Dropping/Truncating/Renaming Tables, Backing up / Restoring a

Database.

5. For a given set of relation schemes, create tables and perform the following

Simple Queries, Simple Queries with Aggregate functions, Queries with Aggregate

functions (group by and having clause), Queries involving- Date Functions, String

Functions , Math Functions

Join Queries- Inner Join, Outer Join

Subqueries- With IN clause, With EXISTS clause

6. For a given set of relation tables perform the following

a. Creating Views (with and without check option), Dropping views, Selecting from a

view

You might also like