Lectures Flashcards

To go over everything in the lectures

1
Q

What is a database?

A

A database is a collection of data. For example, a database could have names, addresses, birthdays, and much more.

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

What is a database server AKA database management server (DBMS)?

A

The place where the database can be accessed and updated. Without this, we can’t see the data. The DBMS is persistent meaning the information never leaves.

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

What is the database language?

A

It’s the language used to communicate with the database. Sometimes more than one language is used but usually just one.

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

What does integrity mean to the database server?

A

It means that the information in the server can’t contradict each other. Can’t have two people with the same PK.

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

What is another term for tables?

A

Relation which is why we call the table a relational model

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

What is the order of the rows?

A

There is no order to the rows. It’s all just one unit.

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

What is a Primary Key?

A

A PK is a unique value that identifies individual things. There can be a replication of the PK.

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

What is a candidate key?

A

There can only be one PK so when there is another thing that acts as a PK it is called a candidate key.

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

What is a foreign key?

A

A foreign key is a value that comes from the PK but is used in another table.

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

What are the rules of a relational model?

A
  • Ordering of rows doesn’t matter
  • Ordering of columns doesn’t matter
  • A cell has only one value
  • No duplicate rows
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a cell with repeating values called?

A

A repeating group.

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

What is a composite key?

A

When two values of a column come together to create a PK. Remember: The whole table has to depend on the Composite key, not part of it.

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

How do you get rid of data redundancy?

A

By creating a composite PK.

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

If there is data not dependent on the composite key.

A

The data should be removed to get rid of data redundancy. (This is the same when there’s just a PK.

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

What is Null?

A

When the value is = to nothing not even itself.

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

Can a PK be null?

A

No, but a foreign key can be.

17
Q

What are the rules of a foreign key?

A

They have to be part of the PK, or null.

18
Q

What is the child and parent?

A

The parent is the PK, while the child is the FK.

19
Q

What is an entity?

A

A user is interested in our data. For example, a customer.

20
Q

What is an occurrence?

A

It is the entity in the entity. For example, a single customer.

21
Q

What is the attribute?

A

Data involving the occurrence. For example, entity: customer. Occurrence: Name, address, age…

22
Q

Difference between entity/attribute type and entity/atrribute occurence?

A

The Entity would be the person using the database, while the attribute would be information to do with the entity.
The type being the main subject. Ex, entity type = person and attribute type = shovel. While the entity occurrence would be the. details of the person and the attribute occurrence would be the details of the shovel such as the price.

23
Q

How is the attribute and entity linked?

A

The entity will say what the subject is while the attribute will focus on the specifics.

24
Q

What’s is a relationship?

A

A link between PKs such as a film being assigned a classification. The word that links them is important.

25
Q

Why does a verb give classification to a relationship?

A

So that you can clarify the action with these relationships.

26
Q

What is a participation condition?

A

The rules at which something is assigned to each other, usually using the Howe/Chen notation.

27
Q

What to do when primary keys have an M-M relationship?

A

You have to add a proxy to create a different relationship. (single relationships are also better)

28
Q

Why Is having an M-M a bad thing.

A

It causes no foreign keys to be made.

29
Q

Order in which tables should be made?

A

Drop table.
Create table.
insert table.