Theoretical Questions Flashcards

1
Q

What is a database?

A

A database is a system that stores data and makes it possible for users to work with that data OR an organised collection of structured information or data, stored electronically

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

What was the first kind of database?

A

Navigational Database / Integrated Database Systems IDS

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

What is the query language for navigational databases?

A

CODASYL (Conference/Committee on Data System Languages)

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

What is the primary benefit of a navigational data base over reading data sequentially?

A

Allow to navigate directly from record to record following relations

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

Who invented relational databases?

A

Dr. Edgar Codd

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

What is the entity-relationship model used for?

A

To model data in database using relationships and to help navigating a database OR abstract logical model devoid of any implementation details OR physical models of relational databases

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

What are the three subcomponents of a relationship in data bases?

A

Entities, Attributes, and Relationships

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

How many cardinality types an entity-relationship can have?

A

4 (Zero or One, Exactly One, Zero or More, One or More)

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

What is the sign of an optional one (zero or one) cardinality type in crow’s foot notation?

A

ol

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

What is the sign of a mandatory (exactly one) cardinality type in crow’s foot notation?

A

||

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

What is the sign of a mandatory many (one or more) cardinality type in crow’s foot notation?

A

|{ or}|

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

What is the sign of an optional many (zero or more) cardinality type in crow’s foot notation?

A

o{ or }o

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

What is the data type for missing data in relational databases?

A

Null

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

What is the query language used for relational databases?

A

Structured Query Language (SQL)

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

What does DDL stand for?

A

Data Definition Language

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

What does DML stand for?

A

Data Manipulation Language

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

What does DCL stand for?

A

Data Control Language

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

How do you create a table in SQL?

A

create table a (a integer);

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

How do you read data from a table in SQL?

A

select * from a

20
Q

How do you add data to an SQL table?

A

Insert into a (a) values (1), (2);

21
Q

How do you delete data from an SQL table?

A

Delete from a where a = 1

22
Q

How do you modify data in an SQL table?

A

Update a set a=”new” where a=1

23
Q

How do you investigate what a query actually does in SQL?

A

Explain Query plan select * from a

24
Q

What is an attribute in SQL?

A

What’s referred to as a column and stores one single datapoint per entry in the database

25
Q

What is a tuple in SQL?

A

What’s referred to as a row in a table, individual entry in the database

26
Q

What is a primary key in SQL?

A

Primary key is a unique identifier with which an entry can be identified

27
Q

What is a composite key in SQL?

A

Combination of two or more primary keys and foreign keys in a joining table used to secure the uniqueness of entries into the joining table

28
Q

What is a candidate key in SQL?

A

Natural, Domain or business key. Candidate key is unique, might be primary and can be null, which is why it can’t be a primary key

29
Q

What are the two criteria of the first normal form?

A
  • Contains only atomic values

- There are no repeating groups

30
Q

How many join types does the ANSI SQL standard have?

A

5

  • Inner Join
  • Left Outer
  • Right Outer
  • Full Outer
  • Cross Join
31
Q

What does a cross join of two tables return in set theory terms?

A

A Cartesian Product

32
Q

What does an inner join of two tables return?

A

Returns the set of records that match in both tables

33
Q

What does a full outer join of two tables return?

A

Returns every record from all tables, if no matching record can be found to a record, it will be matched with a null value

34
Q

What concepts does a simple key-value store have to store data?

A

Keys and values

35
Q

What are the three concepts of a graph database?

A

Nodes, edges and properties

36
Q

What does OLTP stand for?

A

Online Transaction Processing

37
Q

What does OLAP stand for?

A

Online Analytical Processing

38
Q

What does ACID stand for?

A

Atomicity, Consistency, Isolation, Durability

39
Q

What are the two most popular data storage options?

A

Row oriented and Columnar oriented Data Storage

40
Q

What are the advantages of row-oriented data storage?

A
  • Easy to Insert a new row
  • Transactions are concerned about a single row
  • Row level security can be used with this design
41
Q

What are the disadvantages of row-oriented data storage?

A

Reading an entire row while only needing a single column

42
Q

What are the advantages if columnar-oriented data storage?

A
  • Reading a single column results in reading the minimum amount of data
  • Advanced techniques can be applied using the columnar approach
43
Q

What are the disadvantages if columnar-oriented data storage?

A
  • Hard to update

- Hard to insert into

44
Q

Which data storage is better suited for OLTP use cases?

A

Row Data Storage

45
Q

Which datas storage is better suited for OLAP use cases

A

Columnar Data Storage

46
Q

What do the letters in CAP theorem stand for?

A

Consistency, Availability, Partition Tolerance

47
Q

What does ETL stand for?

A

Extract, Transform, Load