R D B M S: Elation Ata Ase Anagement Ystem
R D B M S: Elation Ata Ase Anagement Ystem
Name:
Class:
Section:
Roll No:
----------------------------------------------------- --RDBMS -----------------------------------------------------------------------------------------
* What is DBMS?
A Database Management System is system software that is used to Create, Maintain and provide
controlled access to the user databases. (OR)
* What is Data?
The actual data stored in the database is called DATA. For example, the student database may
contain data like Student Roll No, Student Name, Student Address, etc….
* What is Database?
We define the information as data that it would be processed, so the user may easily identify the
data.
Mohan 20518 40
Arun 30198 70
The above data remains useless. We have no idea what the entire data means.
For example, we will place some data in the context form. Now it is useful data for some users.
Rahul 12465 60
Mohan 20578 40
Arun 30198 70
------------------------------------------------------------------------------------------------------------------------------------------------Page | 2
Designed by S.V.NIKETHAN 8019958900 RDBMS
----------------------------------------------------- --RDBMS -----------------------------------------------------------------------------------------
* Metadata:
The data that describes the properties or characteristic features of other data is called Metadata.
For example, consider the Metadata for the about student data on listed below.
* RDBMS:
A database that represents data as a collection of tables in which all the data relationships
can be maintained by the actual values in the related tables.
* What is SQL?
Basically a Structure Query Language is a non procedural language. i.e.; the user needs to
specify the problem and not the procedure to same it. SQL is a very simple language that can be
learned and maintained easily.
* Procedural Language:
Example:
Example:
------------------------------------------------------------------------------------------------------------------------------------------------Page | 3
Designed by S.V.NIKETHAN 8019958900 RDBMS
----------------------------------------------------- --RDBMS -----------------------------------------------------------------------------------------
* What are the features of SQL?
Ans: Go to start menu. Select All programs. In that, select Oracle – OraHome81. Then select Application
Development. Then click on SQL plus option.
Start All programs Oracle - OraHome Application Development SQL Plus Enter
An “Oracle SQL Plus” window is open with a small “Logon” textbox. In that, enter “username” as “scott”
and password as “tiger”. Then click on “OK” button.
Ans: The SQL commands are categorized into different types. They are:
S.Name varchar2(20),
Sub 3 Number(3),
Sub 4 Number(3),
------------------------------------------------------------------------------------------------------------------------------------------------Page | 4
Designed by S.V.NIKETHAN 8019958900 RDBMS
----------------------------------------------------- --RDBMS -----------------------------------------------------------------------------------------
Sub 5 Number(3),
B.ALTER:
I. ADD
ALTER
II. MODIFY
III. DROP
ADDMODIFYDROP
I.ADD:
Syntax:
ALTER table < table name> ADD <colname> < Data type> < size>);
Example:
II.MODIFY:
This command is used to modify the data type or size of the column.
Syntax:
ALTER table < table name> MODIFY <colname> < Data type> < size>);
Example:
III.DROP:
Syntax:
Example:
------------------------------------------------------------------------------------------------------------------------------------------------Page | 5
Designed by S.V.NIKETHAN 8019958900 RDBMS
----------------------------------------------------- --RDBMS -----------------------------------------------------------------------------------------
2. DML commands:
DML commands are used to insert, update and delete the data in the database. The commands
used are “INSERT”, “UPDATE” and “DELETE”.
A. INSERT:
This command is used to insert record into the table. This command has Three (3)
syntaxes.
Syntax 1:
INSERT into <table name > values (value 1, value 2 … value n);
Example:
INSERT into Student values ( 1008,’Nikethan’, 60, 77, 86, 98, 99, 91);
Syntax 2:
INSERT into <table name> (colname 1, colname 2 ... colnamen) values (value1, value2...value n);
3. DQL commands:
SQL has only one Query statement. The command used is “SELECT”.
SELECT:
This command is used to retrieve the required data from the database.
Syntax:
Example:
This command is used to display the data in ‘Descending order’ & ‘Ascending order’ in the user
specify column name. In this, we have two (2) Syntaxes.
Syntax:
To see data in
SELECT astric (*) from <table name> ORDER BY <colane> DESC;
Descending order
Example:
Syntax:
SELECT astric (*) from <table name> ORDER BY <colane>; To see data in
------------------------------------------------------------------------------------------------------------------------------------------------Page | 6
Designed by S.V.NIKETHAN 8019958900 RDBMS
----------------------------------------------------- --RDBMS -----------------------------------------------------------------------------------------
2. Using SELECT command by using GROUP BY:
Syntax:
Example:
This command is used to specify the data by the user require condition.
Syntax:
Example:
SELECT Dept No, SUM(SAL) from EMP GROUP BY Dept no HAVING SUM(SAL) > 15,000;
4. DCL commands:
DCL commands is used to manage the data that the manipulation performed by the DML
commands. The DCL commands are “COMMIT”, “ROLLBACK” and “SAVEPOINT”.
Ex: COMMIT;
Ex: ROLLBACK;
C. SAVEPOINT: This command is used to “SAVE” the table in the form of modules.
5. TCS commands:
TCS commands are used to control the user access to the database. The commands are “GRANT”
and “REVOKE”.
B. REVOKE: This command is used to call off (cancel) the permission to the user.
6. DAS commands:
DAS commands are used to perform auditing. The commands used are “START AUDIT” and “STOP
AUDIT”.
Type as follows:
user created.
------------------------------------------------------------------------------------------------------------------------------------------------Page | 8
Designed by S.V.NIKETHAN 8019958900 RDBMS
----------------------------------------------------- --RDBMS -----------------------------------------------------------------------------------------
Message: Permission granted.
------------------------------------------------------------------------------------------------------------------------------------------------Page | 9
Designed by S.V.NIKETHAN 8019958900 RDBMS