databases Flashcards

1
Q

what is ACID

A

required properties for database services, ensuring that it is efficient and safe to use.
Atomicity - each dataset is divided into smallest indivisible parts (adress is divided into town and street for example.)
Consistency - ensuring that the service is consistent (if you draw 3000 eur out of your bank account you dont want to get 20 do you.)
Isolation - concurency control; in case few transactions will try to pass at the same time, consistency will ensure that each are treated individually (“first come first served”)
Durability - ensures that the data is not lost (bank explodes ☹️ but you’re still rich with the saved money in it 🤑)

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

data dictionary

A

what fields are what type (phone is TEXT field for example)

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

boolean

A

binary - yes/no; 1/0

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

forms

A

in google forms for example the thing

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

query

A

a type of search - searching “databases” in google docs is a simple query. searching “databases” and adding “used by Jernej Fegus” is a complex query, as it involves simple logic.

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

ERD

A

entity-relationship diagram (the full database tables with the keys attached to eachother)

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

transaction

A

a sequence of operations - entire sequence is one logical unit of work

states:
active comes into either failed or particularly commited. fail ends in aborted.
particularly commited can go into either failed or end in a committed state.

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

table

A

2d array/grid with rows and columns

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

fields and records

A

columns and rows. take time to imagine a form and how answers of it would be organised.

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

primary key

A

unique, like IDs

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

secondary key

A

fiekd categories like Names (there are many names)

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

indexing

A

like indexing book topics

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

foreign key

A

imported primary key

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

super key

A

composite key = key + key

for example costumersID and ordersID make up prices (can be different prices despite the fact that costumers can be same)

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

what kind of relationship are available in databases

A

one to one (one child has one biological mother)
one to many (one mother can have many children)
many to many (TO BE AVOIDED IN GOOD DATABASE DESIGN!!)
orphan data (ALSO TO BE AVOIDED AS IT IS INEFFICIENT)

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

what is the hierarchy of knowing

A

data is meaningless. information is important and knowledge is most important.
like there are yello berries. so what?
yellow berries are poisonous! that is information.
knowledge that some yellow berries are poisonous and why is most important - you will not survive just knowing that some random berries are yellow, you need to know that they are poisonous and which ones are.

17
Q

whats a flat file

A

a simple simple database with only one table

18
Q

what is the role of keys?

A

to join data