COSC203 - PART | Flashcards

Database stuff

1
Q

A database is

A

an integrated collection of data

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

A DBMS is

A

a system that allows you to access and manage a database, e.g. MySQL Workbench

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

Application program

A

A program that provides access to the database by sending queries and requests for data to the DBMS

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

Data modelling is the _____ in designing a database

A

first step

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

A data model is a _______ that can be used to describe the structure of a database.

A

a collection of concepts

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

This describes the collection of metadata that describes the logical view of a database

A

Database schema

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

This technique models the data in a high level way

A

Conceptual data modelling

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

This is a popular high level diagram

A

Entity Relationship Model

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

An entity is

A

A thing in the real world with independent existence

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

A collection of entities with the same attributes is called an…

A

Entity type

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

These are the properties of an entity

A

Attributes

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

A ____ exists whenever an attribute of one entity type refers to another entity type

A

relationship

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

A weak entity has ______ of its own

A

no attributes

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

Why would somebody allow null values in their schema?

A

To allow the users to have the option to not share private information

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

A ________ is a collection of relations

A

relational database

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

Constraints are restrictions on…

A

the actual values in the database state

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

Constraints are derived from…

A

rules in the mini world that the database represents

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

This type of constraint specifies that each value must be atomic from the domain dom(A)

A

Domain constraint

19
Q

This type of constraint has two types of keys

A

Key constraints

20
Q

A relation schema may have more than one of these

A

key constraints

21
Q

If there is a key constraint, then primary values can’t be what?

A

NULL

22
Q

T/F: NULL values can be unique

A

False

23
Q

This type of constraint is annoying as hell to delete

A

Foreign key

24
Q

Reflexivity, augmentation, transitivity, are all part of…

A

Armstrong’s axioms

25
Q

“As long as Y is a subset of X, then X determines Y” refers to which axiom?

A

Reflexivity

26
Q

“If X determines Y, then we can add the same attribute on both the LHS and RHS” refers to which axiom?

A

Augmentation

27
Q

“If X determines Y, and Y determines Z, then we can have X determine Z” refers to which axiom?

A

Transitivity

28
Q

Anomalies are caused by…

A

bad schema design in general

29
Q

Anomalies are removed by _______

A

replacing the schema

30
Q

This breaks down a relation schema into a set of relation schemas to remove redundancy, anomalies, and inconsistencies

A

Decomposition

31
Q

Which process aims to avoid insertion, deletion, and update anomalies?

A

Normalisation

32
Q

“All attribute values must be atomic, and no multi-valued composite attributes, or nested relations are allowed” refers to which normalisation?

A

1NF

33
Q

Which normalisation allows full and partial functional dependency?

A

2NF

34
Q

Removing nonprime attributes that are transitively dependent on the primary key attribute(s) and placing them in a new relation is part of which normalisation process?

A

3NF

35
Q

For any FD X->A where X is not a superkey, remove A for the original relation and then create a new relation containing both X and A refers to?

A

Boyce-Codd Normal Form

36
Q

The ____ the normal form, the _____ the relaion.

A

higher, smaller

37
Q

TINYINT, SMALLINT, BIGINT is a _____ data type

A

numeric

38
Q

A string can be defined in a database by using

A

VARCHAR(size)

39
Q

NOT NULL and CHECK are _____ constraints

A

Attribute

40
Q

PRIMARY KEY and FOREIGN KEY are ____ constraints

A

integrity

41
Q

What does % mean in the context of a database query?

A

% means any number of characters

42
Q

SUM, MIN, MAX, AVG, COUNT and COUNT DISTINCT are what type of functions?

A

Aggregation functions

43
Q

The _______ clause allows to define a subset of values of a particular field and to apply an aggregate function to the subsets

A

GROUP BY

44
Q

If a field is unknown but we need to query it, which operator can we use?

A

IS NULL