Basics Flashcards

1
Q

What are the tables for in databases?

A

Tables contain rows of data.

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

What are rows in databases?

A

Row is a single recordno of data, belonging to a single table or query result.

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

Relations

A

‘A set of tuples, where each element d(j) is an element od data domain D(j)’

Associations between tables that are created using join statements to retrieve data.

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

Types of relations (cardinalities)

A

One-to-one (one side has unique FK)
One-to-many(one side has FK that can repeat)
Many-to-many(implemented with intermediary table)

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

What is a primary key in db?

A

1) A unique column in a table used to identify any row in that table. It’s a special unique index.
CANNOT BE NULL.

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

What is a foreign key in database?

A

A column/columns in a table which contain a primary key (usually) of a different table. They providatw a link between data in separate tables.

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

Transaction

A

A series or reads/writes performed in a database by a single user.

A sequence or multiple operations performed on a database

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

What does ACID stand for in db?

A

Atomicity (All or nothing)
Consistency
Isolation
Durability

Those are principles for transactions to follow to ensure data reliability and integrity

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

What is Atomicity in ACID in db?

A

Atomicity “All or nothing” means that each transaction is treated as a single unit made of multiple statements, if one fails then all fail and db gets rolled-back to original

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

What does ‘Consistency’ stand for in ACID in dbs?

A

Any transaction can only bring db from one consistent state to another. All of data must always be valid according to defined ‘rules’. It prevents corruption

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

What does Isolation stand for in ACID in db?

A

Ensures that concurrent executions of transactions don’t interfere with each other. Each transaction is independent and ‘invisible’ until commited.

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

What does ‘Durability’ stand for in ACID in db?

A

Ensures that changes made from transactions executed successfully are saved even in a case of a system failrue.

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

What is OLTP (online transactional processing)

A

A way of handling data with a system enebling real-time execution of large number of db transactions by large number or people, typically over internet.

It usually has lots of small/simple requests accessing smaller datasets.

Examples: online stores, ATMs

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

What is OLAP (online analytical processing)

A

System for performing multi-dim analysis at high speeds on large volumes of data.
It usually has big/comples requests accessing large datasets.
Examples: Data warehouses

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