0% found this document useful (0 votes)
13 views

Scope of SQL

The document discusses different types of database management systems including RDBMS, HDBMS, and ODBMS. It covers SQL commands and clauses, data types, constraints, joins, and other database concepts. It also provides examples of changing user passwords and using savepoints in transactions.

Uploaded by

Krishna Mahato
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Scope of SQL

The document discusses different types of database management systems including RDBMS, HDBMS, and ODBMS. It covers SQL commands and clauses, data types, constraints, joins, and other database concepts. It also provides examples of changing user passwords and using savepoints in transactions.

Uploaded by

Krishna Mahato
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

DBMS

TYPES OF DBMS - RDBMS, HDBMS, ODBMS, TFMS


EXAMPLES OF DBMS - Oracle, MS Access, MySQL, SQLServer, InnoDB, H2 Database.....
TYPES OF DATA - number(5), number(10,2), varchar(20), varchar2(20), date,
timestamp, time, LOP - CLOB, BLOB, RAW

ER DIAGRAMS - Entity - Relationship, Attribute types, Cardinality .......


CLASS DIAGRAM - ATTRIBUTES access/scope (public (+), private (-),
Protected(inherited) - (#)

SQL
SQL COMMANDS
a. DDL - CREATE, ALTER, DROP, RENAME, TRUNCATE
b. DML - UPDATE, ALTER, INSERT
c. DCL - GRANT, REVOKE
d. TCL - COMMIT, ROLLBACK, SAVEPOINT
e. DQL - SELECT
CONSTRAINTS
1. PRIMARY KEY (UNIQUE + NOT NULL)
2. FOREIGN KEY
3. UNIQUE
4. NOT NULL
5. CHECK
COMPOSITE PK = MORE THAN ONE COLUMN AS PK - EACH COLUMN = CANDIDATE KEY
HOW TO ADD - CREATE TABLE
ALTER TABLE
IN LINE, OFF THE LINE

DUAL - Dummy table with one row and one column - used for manipulation with Math,
Sysdate etc
D
-
X

CLAUSES - WHERE , HAVING

ORDER BY, GROUP BY

AGGREGATE FUNCTIONS - min(), max(), avg(), sum(), count()

BUILT IN FUNCTIONS - Character manipulation, Date manipulation, number manipulation

NESTED QUERY
NULL - NVL , DECODE

JOINS - INNER JOIN - matching data only - INNER JOIN, EQUI JOIN
OUTER JOIN - non matching data also - LEFT, RIGHT, FULL
SELF JOIN, CARTESIAN PRODUCT (CROSS JOIN)

SET OPERATORS - UNION, UNION ALL, INTERSECT, MINUS

NORMALIZATION - 1NF, 2NF, 3NF, BCNF

REFERENTIAL INTEGRITY - combination of PK & FK - concept - used to avoid wrong data

DISTINCT - used to avoid duplicate data retrieval

change user password:


=====================
create user brendan identified by pass1;//create user with an initial password

alter user brendan identified by pass2; //change password

system- select * from session_roles; //list of available roles

creates roles rolename;

grant CONNECT to enduser;

grant ALTER,INSERT on emp to enduser;

grant rolename to username;

SAVEPOINT
=========

SAVEPOINT savepoint_name; //give unique name

some updates

ROLLBACK TO SAVEPOINT savepoint_name;

You might also like