Download presentation
Presentation is loading. Please wait.
1
DATABASE MANAGEMENT SYSTEM
Name : Rathwa Yogiraj n. Vasava Sunil b. Roll no : 46,61
2
SQL SQL, a Structured Query Language.
It is a language that provides an interface to relation database system. SQL was developed by IBM in 1970. Oracle, at that time known as Relational software, released first commercially available implementation of SQL. SQL has been accepted as a standard language for RDBMS today. So, any RDBMS product supports minimal set of SQL functionalities along with its own extra functionalities. SQL is used as command language in Oracle products. Oracle SQL contains many extensions provided by SQL *PLUS in form of interactive SQL and PL/SQL.
3
SQL Features :- It is a non-procedural language .
This means that it requires only to specify what operations to be done to retrieve data, without specifying how to perform that operations. It is an English-like language. It can be used by a range of, including those having no programming experience.
4
Tools of Oracle SQL SQL * Plus Features of SQL
Internet Development Server SQL* Loader SQL * DBA Oracle Financials Oracle Web browser Personal oracle
5
Components The commands provided by categorized into four components as described below. DDL (Data Definition language) DML (Data Manipultion Language) DQL (Data query language) DCL (Data control language)
6
DDL (Data Definition Language)
It is a set of SQL commands used to create, modify and delete database objects such as tables, views, indices, etc. It is normally used by DBA and database designers. It provides commands like- CREATE: to create objects in a database. ALTER: to alter the schema, or logical structure, of the database. DROP: to delete objects from the database. TRUNCATE: to remove all records from the table.
7
DML (Data Manipulication Language)
It is set of SQL commands used to insert, modify and delete data in a database. It is normally used by general users who are accessing database via pre-developed applications. It provides commands like- INSERT: to insert data into a table. UPDATE: to modify existing data in a table. DELETE: to delete records from a table. LOCK: to lock tables to provide concurrency control among multiple users.
8
DQL (Data query language)
It is a component of SQL that allows data retrieval from the database. It provides command like SELECT. This command is a heart of SQL, and allows data retrieval in different ways.
9
DCL (Data control language)
It is set of SQL commands used to control access to data and database. Occasionally DCL commands are grouped with DML commands. It provides commands like – COMMIT : to save work permanently. ROLLBACCK : to undo work and restore database to previous state. SAVEPOINT: to indentify a point in a transaction to which work can be undone. GRANT: to give access privileges to users on the database. REVOKE: to withdraw access privileges given to users on the database.
10
Rules of SQL: SQL statement start with an action verb. For example, SELECT statement. Each verb may be followed by number of clauses. For example, WHERE. A space separates key words and clauses. For example, DROP table Employee. A comma ‘ , ‘ separates parameters without a clause. A semicolon ‘ ; ‘ is used to end SQL statement. Statement may be split across lines but keyword cannot be split.
11
Datatypes Character/String Data type Numeric Data type Date Data type
Binary Data type
12
CHARACTER DATA TYPE CHAR v/s VARCHAR v/s VARCHAR2
Sr. No PURPOSE CHAR VARCHAR VARCHAR2 1 STORAGE CAPACITY Up to 255 bytes up to 2000 bytes 4000 bytes 2 SPACE CHAR is fixed length, right padded with spaces. VARCHAR is fixed length, right padded NULL VARCHAR2 is variable length. 3 It will waste space on the disc memory. This type of the data type is used to reserve the space for future usage. The length of the variable string values are stored within the values itself on the disc. 4 STANDARD ANSI standard Oracle standard 5 COMPARE Faster Slower 6 DEFAULT SIZE No
13
NUMERIC DATA TYPE NUMBER(P) NUMBER(P,S) NUMBER
14
DATE DATA TYPE DATE
15
BINARY DATA TYPE RAW LONG RAW
Store binary type data, max length 255 bytes LONG RAW Large number of binary data Often called as Binary Large Object (BLOB) Max length 2GB A LONG RAW column can not be indexed
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.