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?

22
Q

T/F: NULL values can be unique

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
"As long as Y is a subset of X, then X determines Y" refers to which axiom?
Reflexivity
26
"If X determines Y, then we can add the same attribute on both the LHS and RHS" refers to which axiom?
Augmentation
27
"If X determines Y, and Y determines Z, then we can have X determine Z" refers to which axiom?
Transitivity
28
Anomalies are caused by...
bad schema design in general
29
Anomalies are removed by _______
replacing the schema
30
This breaks down a relation schema into a set of relation schemas to remove redundancy, anomalies, and inconsistencies
Decomposition
31
Which process aims to avoid insertion, deletion, and update anomalies?
Normalisation
32
"All attribute values must be atomic, and no multi-valued composite attributes, or nested relations are allowed" refers to which normalisation?
1NF
33
Which normalisation allows full and partial functional dependency?
2NF
34
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?
3NF
35
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?
Boyce-Codd Normal Form
36
The ____ the normal form, the _____ the relaion.
higher, smaller
37
TINYINT, SMALLINT, BIGINT is a _____ data type
numeric
38
A string can be defined in a database by using
VARCHAR(size)
39
NOT NULL and CHECK are _____ constraints
Attribute
40
PRIMARY KEY and FOREIGN KEY are ____ constraints
integrity
41
What does % mean in the context of a database query?
% means any number of characters
42
SUM, MIN, MAX, AVG, COUNT and COUNT DISTINCT are what type of functions?
Aggregation functions
43
The _______ clause allows to define a subset of values of a particular field and to apply an aggregate function to the subsets
GROUP BY
44
If a field is unknown but we need to query it, which operator can we use?
IS NULL