DELETE and TRUNCATE
DELETE
TRUNCATE
Subsets of SQL

What do you mean by DBMS? What are its different types?
Hierarchial
Network
Relational
Object-Oriented
What do you mean by table and field in SQL?
Table refers to a collection of data in an organised manner in form of rows and columns
Field refers to the number of columns in a table
What are joins in SQL?
A JOIN clause is used to combine rows from two or more tables, based on a related column between them. It is used to merge two tables or retrieve data from there.
Inner Join
Full Join
Left Join
Right Join
CHAR and VARCHAR2 datatype difference
Char is used for strings of fixed length
Varchar2 is used for character strings of variable length
What is a Primary key?
A specific choice of a minimal set of attributes that uniquely specify a tuple in a relation.
What are constraints?
Constraints are used to specify the limit on the data type of the table. It can be specified while creating or altering the table statement.
NOT NULL
UNIQUE
CHECK
DEFAULT
INDEX
What is the difference between SQL and MySQL?
Structured Query Language
MySQL is an open-source relational database management system that works on many platforms. It provides multi-user access to support many storage engines and is backed by Oracle.
What is a unique key?
Uniquely identifies a single row in the table.
Multiple values allowed per table.
Null values are allowed.
Duplicate values are not allowed.
What is a foreign key?
Foreign key maintains referential integrity by enforcing a link between the data in two tables.
The foreign key in the child table references the primary key in the parent table.
The foreign key constraint prevents actions that would destroy links between the child and parent tables.
What do you mean by data integrity?
Accuracy of data
Consistency of data
Integrity Constraints to enforce buisness rules on data
What is the difference between clustered and non clustered index in SQL?
Clustered Index
Non Clustered Index
Write a SQL query to display the current date?
GetDate()
SELECT GETDATE();
Result: ‘2019-03-18 18:17:26.160’
What are the different type of joins?
Inner Join
Full Join
Left Join
Right Join

What do you mean by Denormalization?
What are Entities?
A person, place, or thing about which data can be stored in a database. Tables store data that represents one type of entity.
What are relationships?
Relation or links between entities that have something to do with each other.
What is an index?
Explain different types of index.
Unique Index
Clustered Index
Non-clustered Index
What is Normalization and what are the advantages of it?
What is the difference between DROP and TRUNCATE commands?
DROP removes a table and it cannot be rolled back from the database
TRUNCATE removes all rows from the table and cannot be rolled back into the database
Explain the different types of Normalization.
divides larger tables into smaller tables and links them together
1 NF
2 NF
3 NF
BCNF
Stricter than 3 NF
A table is in BCNF if every functional dependency X → Y, X is the super key of the table.
What is ACID property in a database?
Atomicity
Consistency
Isolation
Durability