4.10 - Fundamentals of databases Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is an entity in a database? (2 points)

A

Something used to represent an object in the real world that can be distinguished from other objects

Can be a physical object (such as a person or a place) or a concept (such as an activity or a task) for which we need to record data in the database

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

What is an attribute in a database? (2 points)

A

Something used to represent a property, a quality or a characteristic that describes an entity

E.g. the name of an employee, or the date and time that a booking was submitted

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

What are the 2 types of identifiers in a databse?

A

Entity identifier/key attribute - an attribute/set of attributes used to uniquely identify each instance of an entity

Composite entity identifier - a set of the minimum number of possible key attributes combined together

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

What are the 3 types of database relationships?

A

One-to-one - whenoneinstance of an entity is associated withonly oneinstance of another entity
E.g. each school is run by one head teacher

One-to-many - whenoneinstance of an entity is associated withmore than one instance of another entity
E.g. each student books many appointments

Many-to-many - whenmore than one instance of an entity is associated withmore than one instance of another entity
E.g. many students are taught by many teachers

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

Define ‘relational database’.

A

A database where separate tables are made for each entity, and
relationships between entities are represented by foreign keys

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

What are the 3 types of keys used in a database?

A

Primary key - a unique identifier that identifies each record in a table

Composite primary key - a primary key made up from two or more other keys

Foreign key - a linking attribute that joins two tables in a relational database by being a primary key in one and a foreign key in the other

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