SQL Flashcards
WHAT IS CRUD
CREATE
READ
UPDATE
DELETE
crud CREATE
MAKES NEW DATA
crud READ
ACCESS DATA
crud UPDATE
MAKE CHANGES TO DATA
crud DELETE
REMOVE DATA
SUB LANGUAGES OF SQL
DDL - DATA DEFINITION LANGUAGE DML- DATA MANIPULATION LANGUAGE DQL - DATA QUERY LANGUAGE DCL - DATA CONTROL LANGUAGE TCL TRANSACTION CONTROL LANGUAGE
DDL - DATA DEFINITION LANGUAGE
THE STRUCTURE OF THE DATABASE.
AUTO COMMIT, CAN NOT BE ROLLED BACK
COMMANDS: CREATE ALTER DROP TRUNCATE
DML- DATA MANIPULATION LANGUAGE
THE DATA ENTRIES THEMSELVES
NOT AUTO COMMIT.
COMMANDS
INSERT
UPDATE
DELETE
DQL - DATA QUERY LANGUAGE
USED TO MAKE QUERIES IN DATABASES AND INFORMATION SYSTEMS.
COMMAND
SELECT
DCL - DATA CONTROL LANGUAGE
CONTROLS ACCESS OF WHO CAN SEE / USE DATA
COMMANDS
GRANT
REVOKE
TCL TRANSACTION CONTROL LANGUAGE
CONTROLS TRANSACTIONS
COMMANDS
COMMIT
SAVEPOINT
ROLLBACK
DDL CREATE
A PART OF DDL
CREATES/ADDS A TABLE TO THE DATABASE
CREATE TABLE BEAR(
BEAR_ID INTEGER PRIMARY KEY);
DDL ALTER
PART OF DDL
MAKES CHANGES TO THE TABLE
ALTER TABLE BEAR, DROP COLUMN D;
DDL DROP
PART OF DDL
DELETES A TABLE FROM THE DATABASE
DROP TABLE BEAR;
DDL TRUNCATE
PART OF DDL
DELETES DATA W/O DELETING THE TABLE
TRUNCATE TABLE BEAR_TABLE;
DML INSERT
PART OF DML
INSERTING A ROW (ROW DATA ENTRY)
INSERT INTO BEAR_TYPE VALUES (1, ‘BROWN’);
INSERT DATA FROM ANOTHER TABLE INSERT INTO BEAR_TYPE VALUES (1, 'BROWN') [(COLUMN1, COLUMN2)] SELECT {('COLUMN1', 'COLUMN2')] FROM TABLE_NAME2 [WHERE CONDITIONS]
DML UPDATE
PART OF DML
MODIFY A ROW (DATA MODIFICATION)
UPDATE BEAR BEAR_NAME = DALE ‘DALE’ WHERE NAME = ‘BOB’;
DML DELETE
PART OF DML
DELETE A ROW OR MULTIPLE ROWS
DELETE FROM BEAR WHERE NAME =’BOB’
SELECT
PART OF DQL
GRABS DATA FROM THE DATABASE
SELECT * FROM* - WILL GRAB EVERYTHING
SELECT BEAR_NAME FROM BEAR - WILL JUST GRAB THE NAME.
COMMIT
PART OF TCL
PERMANENT SAVE - NO GOING BACK