Technical(SQL) Flashcards

1
Q

What is SQL?

A

Structured Query Language is a DB computer language designed to retrieve and manage data, create and modify DB schema, etc

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

What is Database?

A

Db is an organized collection of data; space for storing information

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

What is Query?

A

Request to DB to retrieve info

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

What is DBMS?

A

Database Management System is a software that controls organization, storage, retrieval, security and integrity of data in DB

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

What is relational DB?

A

DB that stores data in separate tables, rather than putting all the data in one table

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

What is Schema?

A

Logical container for DB objects that is created by user; a visual or logical representation of a relational database’s logical and visual configuration

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

What is Table?

A

Set of data elements that is organized using columns (fields) and rows (records)

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

What is Field?

A

A DB storage simplest unit

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

What is record?

A

One row of the table, represents single structured data set in a table

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

What is Report?

A

Result that you get after running query

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

Name popular DBs

A

Oracle, MS SQL Server, PostgreSQL, MySQL

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

What did you use SQL for?

A

Getting data for testing; saving data generated during testing activities; data verification in DB (find data, ensure data integrity, manipulate test data for specific tests); testing DBs

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

What is PK?

A

Primary Key is a unique identifier assigned to every record in a table

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

What is DB Normalization?

A

Process of organizing fields and tables of relationship DB to minimize redundancy and dependency including dividing large tables into smaller tables and defining relationships between them

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

What is a Foreign Key (FK)?

A

Column or combination of columns that is used to establish a relationship between tables; usually not unique and always points to a primary key of related table

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

How to create table in DB?

A

CREATE TABLE table_name(col_name1 data_type, col_name2 data_type, etc)

17
Q

What does DESC do?

A

DESC table_name used to verify created table or find column names and datatypes

18
Q

What is used to delete table?

A

DROP TABLE table_name

19
Q

How to add, delete, modify columns in existing table?

A

ALTER TABLE table_name
ADD col_name datatype;
ALTER TABLE table_name
DROP COLUMN col_name;
ALTER TABLE table_name
MODIFY col_name datatype

20
Q

How to add record into table?

A

INSERT INTO table_name VALUES ()

21
Q

What is Constraint?

A

Used to define data integrity (restrict values in DB); e.g.: not null constraint, unique constraint, PK constraint (not null + unique), FK constraint (values in one table matches values in another), etc

22
Q

What is UPDATE used for?

A

To change data in a table. UPDATE table_name SET col1 = val1, [col2 = val2, etc] [WHERE conditions]

23
Q

How to delete records from table?

A

DELETE FROM table WHERE conditions

24
Q
A