Database modelling Flashcards

1
Q

Regarding the DBMS component “security manager”:
a) sets-up a database connection
b) it verifies the user granted permissions to execute queries
c) manages the buffer memory to optimize queries
d) none of the above

A

b)

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

Between DDL and DML:
a) DML compiler helps to create tables
b) DDL compiler helps to insert data
c) MySQL only manages DML, not DDL
d) none of the above

A

d)

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

In crow’s foot notation:
a) an entity type is represented by a rectangle
b) the name of entity type should be singular
c) the name of the entity type goes in the upper part of the rectangle
d) all of the above

A

d)

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

About SQL (more than one option can be selected):
a) it is an object oriented programming language
b) it describes the set of data to be retrieved/modified without specifying how to compute it
c) can be embedded in java code
d) SQL means: structured quality language
e) all of the above

A

b) and c)

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

You want to list all the databases existing in the current MySQL server, which command would we use?
a) SELECT DATABASE NAMES FROM MYSQL
b) CREATE DATABASE
c) SHOW DATABASES
d) USE DATABASE NAMES

A

c)

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

About primary key:
a) must be composed by one column only
b) can be composed by multiple columns
c) supports not unique values if defined as varchar type
d) it is bad practice to leave tables without a primary key

A

b) and d)

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

What are the various ways of interacting with the DBMS?

A

DDL statements, interactive query, applications, database tools.

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

What is the connection manager?

A

Provides facilities to set-up a database connection. It can be set-up locally or through a network.

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

What is the security manager?

A

Verifies whether a user has the right privileges to execute the database actions required.

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

What is the DDL compiler?

A

Data Definition Language (DDL) compiler compiles the data definitions specified in DDL. Most relational databases use SQL as their DDL.

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

Examples of database utilities.

A

A loading utility (load data from a variety of sources), reorganization utility (reorganizes the data), user management utilities (support the creation of user groups or accounts), etc.

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

What are the components of the query processor?

A
  • DML compiler
  • Query parser
  • Query rewriter
  • Query optimizer
  • Query executer
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the DML compiler?

A

The Data Manipulation Language (DML) compiler compiles the data manipulation statements specified in DML.

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

What is the query parser?

A

It parses the query into an internal representation format that can then further be evaluated by the system. It checks the query for syntactical and semantical correctness.

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

What is the query rewriter?

A

It optimizes the query, independently of the current database state. It simplifies it using a set of predefined rules and heuristics that are DBMS-specific.

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

What is the query optimizer?

A

It optimizes the query based upon the current database state. It can make use of predefined indexes that are part of the internal data model and provide quick access to the data

17
Q

What is the query executor?

A

It takes care of the actual execution by calling on the storage manager to retrieve the data requested.

18
Q

What are the components of the storage manager?

A
  • Transaction manager
  • Buffer manager
  • Lock manager
  • Recovery manager
19
Q

What is the transaction manager?

A

It supervises the execution of database transactions. Remember, a database transaction is a sequence of read/write operations considered to be an atomic unit.

20
Q

What is the buffer manager?

A

It is responsible for managing the buffer memory of the DBMS. The DBMS checks first the memory when data need to be retrieved. Retrieving data from the buffer is significantly faster than retrieving them from external disk-based storage

21
Q

What is the lock manager?

A

It is an essential component for providing concurrency control, which ensures data integrity at all times.

22
Q

What is the recovery manager?

A

It supervises the correct execution of database transactions. It keeps track of all database operations in a logfile and will be called upon to undo actions of aborted transactions or during crash recovery.

23
Q

How are entities represented in Crow’s foot notation?

A

Are represented by a rectangle, with its name on the top (the name is singular)

24
Q

What do the two indicators in a relationship in Crow’s foot notation represent?

A
  1. The first one refers to the maximum number of times that an instance of one entity can be associated with instances in the related entity.
  2. The second one describes the minimum number of times one instance can be related to others. It can be zero or one, and optional or mandatory.
25
Q

What are primary keys?

A

Are unique identifier of records in each table.

26
Q

What are foreign keys?

A

Establish relationships between tables.

27
Q

How to normalize many-to-many relationships?

A

We create an additional table (linking table) with one to many relationships with the original tables.

28
Q

What is the main problem with file systems?

a) read and write will take much more time than a DBMS
b) use of excessive amount of space in the hard drive.
c) duplicate data
d) none of the above

A

c)

29
Q

About the DB catalog

a) stores the error log of the database
b) contains the data definitions or metadata
c) it is a user’s manual that comes with a new DBMS
d) none of the above

A

b)

30
Q

What is the order in the database design process?

a) conceptual design, requirement collection and analysis, logical design, physical design
b) logical design, conceptual design, requirement collection and analysis, physical design
c) requirement collection and analysis, conceptual design, logical design, physical design
d) the order does not matter, wherever you start the final outcome will be the same

A

c)

31
Q

About the primary keys:

a) the same as foreign keys
b) unique Identifier of Records in each Table
c) only numeric values can be primary key
d) all of the above

A

b)