Week 2 Flashcards

1
Q

What are the two main components of designing a database

A

Database design and application design

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

What does database design entail

A

designing the conceptual schema

As well as physical and implementation schema

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

What does application design focus on

DONT NEED TO NO MUCH AS IT IS CONSIDERED PART OF SOFTWARE ENGINEERING

A

focuses on the programs and interfaces that ACCESS the database

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

What is the first thing you need before you can even think about designing a schema

A

A specification - The requirements the database must follow

eg:
an employee can only work for one department …

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

What are the main concepts of an entity relationship model

A

.ENTITIES ( the objects)
.ATRIBUTES ( the properties of the entities)
. RELATIONSHIPS ( between 2 or more entities)

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

2 types of entities

A

. physical
. Non physical

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

Features of an attribute

A

.has an associated value
eg :
Name - “Abdullahi Mohamed”
ID - 1234543

. has an associated data type
Integer, double, string …

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

What are the types of attributes and define them

A

Simple attribute - cannot be divided into further components (Atomic)
eg Kings_ID - k123456

composite attribute attribute - can be divided into further components

Name( FirstName_ , MiddleName_ , LastName_ )

Address (Street, postcode city)

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

Employees with the same basic attributes can be grouped into an …

A

Entity type

eg employees can be grouped into entity type EMPLOYEE

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

What is a key attribute

A

an attribute of an entity in an entity type that has a unique value for each entity

eg Student_ID (of STUDENT)

CAN UNIQUELY IDENTIFY EACH ENTITY IN AN ENTITY TYPE

Key attribute underlined in ER diagram

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

How are attributes displayed in the ER Diagram

A

As an oval connected to the entity

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

How are multi valued attributes displayed in ER

A

as a double oval

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

How are key attributes displayed

A

underlined

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

How are composite attributes displayed

A

components connected to the oval representing the composite attribute

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

What is an entity set

A

The current state of entities of that type that are stored in the database

Detailed desciption-
The set of of all the instances that are in the empty set along with the data of all those instances

eg :

Instance - car 1
123(registration) , blue (colour) …

Instance car 2
.
.
.

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

What is the degree of a relationship type and hence what is a binary relation

A

The number of entity types the relationship affects

eg Works_ON - relates EMPLOYEE and PROJECT and so is a binary relation

17
Q

How are relationship types represent in an ER diagram

A

A diamond box where straight lines connect the relevant entity types

18
Q

What is a recursive relationship type

A

relation acts on one entity (unary relation)

eg employee supervises another employee
SUPERVISES is recursive

19
Q

Define and explain what a weak entity type is

A

An entity type that does not have a key attribute

.identified by the PARTICULAR ENTITY (that the weak entity is related to the particular entity)

AND

.a partial key ( that uniquely identifies weak entities that are related to the same owner entity

(participates in an identifying relationship type)

represented by a double rectangular box

eg:
DEPENDENT is a weak entity type
. A DEPENDENT entity is identified by the dependent’s first name,
and the specific EMPLOYEE with whom the dependent is related
. EMPLOYEE is its identifying entity type via the identifying
relationship type DEPENDENT_OF
. Name of DEPENDENT is the partial key

20
Q

what is total participation

A

Total participation in a relationship requires every entity in one set to participate.

In a university database, if “Enroll” has total participation ( where a student enrolls for a course )from “Student,” every student must be enrolled in at least one course.

21
Q

what is partial participation

A

If there is partial participation from the “Student” side in a relationship with “Course,” it means that not every student is required to be enrolled in a course. Some students may not be enrolled in any courses.

partial - some entities required to participate but others are not

22
Q

What is zero participation

A

Entities have the option of whether they want to participate in relationship

In a university database, if there is zero (optional) participation from the “Student” side in a relationship with “Course,” it means that some students may not be enrolled in any courses. They have the option to participate in the relationship, but it’s not mandatory.

23
Q

Instead of using cardinality ratio and existence dependency constrain we can use … instead

A

min , max notation

24
Q

How is total participation display in ER diagram

A

double line

25
Q

How is partial display

A

single line

26
Q

What is a derived attribute

A

An attribute whose value can be derived from one or more other related attributes

eg: Age can be derived from Date of Birth

represented as a dashed attribute in er diagram