0% found this document useful (0 votes)
21 views2 pages

SQL Day1

SQL Notes

Uploaded by

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

SQL Day1

SQL Notes

Uploaded by

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

-- database : collection of data

-- security
-- easy and fast access
-- large amount data
-- constraints/rules/limitations
-- concurrency

/*
emp : table
empid, empname,salary, loc CONTACT :
columns/features/attributes/fields
1001. rahul. 70000. pune 9028299590. : rows/records

project:
proj_id,proj_name,no_of_emp,empid
10. axis. 30. 1001
20. hdfc. 20
*/

-- DBMS : database management systems


-- to store and manage the data
-- read /retrieve data for analytics

-- relational database : structured data is stored in the form of


tables/relations
-- RDBMS : relational database management system

-- oracle
-- mysql
-- DB2
-- sql server
-- postgreSQL

-- MySQL:
-- database server
-- user interface (workbench/shell)
-- connection

-- SQL : structured query language


-- domain specific language
-- non procedural language
-- non case sensitive language
-- sql statement/insrtuction is called as QUERY, each query we should end
with a semicolan(;).
-- syntax

-- to understand the data


-- data gathering

-- types of commands :
-- DDL (data definition language) : CREATE,ALTER,TRUNCATE,DROP --
auto_committed
-- DML ( data manipulation language) : INSERT,UPDATE,DELETE
-- DCL ( data control language) : GRANT,REVOKE (DBA)
-- TCL (transaction control language):
COMMIT(save),ROLLBACK(undo),SAVEPOINT
-- DQL (data query language) : SELECT

/*
customer :cust_id,cust_name,ac_no,ac_balance
1234. dhiraj. 9028. 9000
1234. dhiraj. 9028. 8000
transaction :tran_id,tran_type,amount,cust_id
10. debit. 5000. 1234
*/

/*
insert
insert
update
delete
commit;
insert
savepoint A;
insert
rollback;
rollback to savepoint A;

1000 : 900 : 901 : savepoints at 200 records


*/

-- single line comments


/*
multiline
comment
*/

You might also like