SQL Flashcards

1
Q

An organized collection of data or information

A

Database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A set of computer programs for organizing the information in a database

A

Database Management System

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

A DBMS provides tools for data input, storage, retrieval and manipulation

A

x

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Where are Database applications

A

everywhere from Banking, online ticket booking, online retailer, etc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does DBMS do?

A

DBMS controls all functions of capturing, processing, storing, retrieving data and generates various forms of data output

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Data is organized in

A

tables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Table contains

A

rows and columns

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Tables can be related to one another through common values called

A

Keys

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Uniquely identifies each row of the table

A

Primary Key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Column in one table that serves as a primary key in another

A

Foreign Key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are different types of relationship exist

A

One to One, One to Many, Many to Many

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

A set of rules to help designers to reduce redundancy and avoid data update anomalies

A

Normalization

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Entity and Attributes

A

X

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Language for accessing and manipulating the data

A

DML

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Language for Create, Alter, Drop, Truncate, Comment and Rename

A

DDL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

DDL stands for

A

Data Definition Language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Which language is used for the control of data

A

Data Control Language DCL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What operations can you perform using DCL

A

Grant and Revoke

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What are transaction control statements

A

Commit, Rollback, Savepoint

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Restore database to original from the last COMMIT

A

Rollback

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Save work done

A

Commit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Data Types in SQL

A

Character, Varchar, Boolean, Integer, Float, Date, Time, Timestamp

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Fixed width character string

A

Char

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Variable width character string

A

Varchar

25
Q

Whole numbers

A

int

26
Q

Floating precision number

A

float

27
Q

Syntax for creating a table

A

Create Table table_name (column1 data_type (size), column2 data_type (size));

28
Q

What are the different types of Operators in SQL

A

Arithmetic Operator, Relational Operator, Logical Operator and Comparison Operator

29
Q

+ - * / are

A

Arithmetic Operators

30
Q

=, != and <>, >, =, <=, !

A

Relational Operators

31
Q

AND OR NOT

A

Logical Operators

32
Q

IN BETWEEN LIKE

A

Comparison Operators

33
Q

Used to temporarily rename a table or a column heading. to make them more readable

A

Alias

34
Q

Where Clause

A

It’s a condition to select particular rows or data from the table

35
Q

Delete command

A

Used to delete the rows from the table

36
Q

This command removes all rows from the table

A

Truncate

37
Q

This command removes table from the database

A

Drop

38
Q

Drop Command

A

Drop Table

39
Q

Delete Command

A

Delete Table where

40
Q

Truncate Command

A

Truncate Table

41
Q

Drop and Truncate are

A

DDL commands

42
Q

Delete is a

A

DML command

43
Q

SQL INSERT INTO syntax

A

INSERT INTO table_name (column1, column2, colum3) Values (value1, value2, value3);

44
Q

Create Table Statement

A

Used to create table in a database

45
Q

Create Table Syntax

A

Create Table (column1 data type (size), column2 data type (size), column3 data type (size));

46
Q

Instructions used to communicate with the database to perform specific task that with data

A

SQL commands

47
Q

Create Alter and Drop; Grant and Revoke

A

DDL commands

48
Q

Select, Insert, Update, and Delete

A

DML commands

49
Q

These SQL commands are used for storing, retrieving, modifying and deleting data

A

DML

50
Q

A clause used to combine records from two or more tables in a database

A

JOINS

51
Q

What are the different types of Join available in SQL

A

Inner Join, Left Join, Right Join, Full Join, Self Join, Cartesian Join

52
Q

What’s the most frequently used Join statement

A

Inner Join

53
Q

Inner Join creates a new result table by combining column values of two tables

A

table 1 and table 2

54
Q

Basic Syntax of Inner Join

A

Select table1.column1, table2.column2 from table1 inner join table2 ON table1.common_filed = table2.commond_field

55
Q

Left Join returns all rows from the left table even if there are no matches in the right table

A

x

56
Q

Basic Syntax for Left Join

A

Select column1, column2, column3 from table 1 left join table 2 On table1.common_field = table2.common_field

57
Q

Right Join returns all the rows from the right table even if there are no matches in the left table

A

x

58
Q

Basic Syntax for Right Join

A

Select column1, column2, column3 from table1 right join table 2 on table1.common_field = table2.common_field