Week 2 Flashcards

1
Q

What is the Three-level Architecture?

A

View 1 View 2 View 3 1*
\ | /
\ | /
Conceptual Level 2*
|
|
Internal Schema 3*
|
|
Database

1* The way users percieve the data

2* Provide both mapping and desired independance
how to match user view to actual data stored in internal level

3* The way DMBS and the operating system perceive the data

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

What is the External level of Three-Level Architecture?

A

View Level

Describes part of the data that is relevant to users

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

What is the Conceptual Level in Three-Level Architecture?

A

Describes WHAT data are stored in the database and relationships among the data

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

What is the Internal Level in Three-Point Architecture?

A

Describes HOW data is actually stored and how files and indexes are organised and used

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

What is Data Abstraction?

A

Hide storage details and present users with conceptual view of database

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

What is Data Independance?

A

refers to the system’s ability to change the database schema at one level of a database system without having to change the schema at the next higher level

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

What is Database Schema?

A

Description of the structure of Database

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

What is Database State?

A

Content of DB at moment in time

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

What is Initial Database State?

A

Content of the Database when it is created

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

What is a Data Model?

A

Set of concepts to describe:

  • Data and relationships among data
  • Data constraints
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a Conceptual Data Model?

A

Identifies high level data structure

Independant of DBMS, application programs and physical considerations

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

What are the 3 types of Logical Data Models (hint: H,N,R)?

A
  1. Hierarchical
  2. Network
  3. Relational
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a Hierarchical Data Model?

A

Data is organised in tree-like structure

a node only has one parent

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

What is a Network Data Model?

A

Data organised into graph

One node can have more than 1 parent at a time

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

What is a Relational Data Model?

A

Way of structuring data in database that emphasizes relationships between data entities

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

What is a Physical Data Model?

A

Describe how data is stored in the computer, representing record structures, record orderings and access paths

Highly dependant on target DBMS

16
Q

What are the main differences between a File-Based Approach and the Database Approach?

A

In File-Based Approach, each application program defines and manages its own data

While in Database approach, a shared database is stored to control the redundancy and ensure the data consistency and integrity

In the File-Based Approach, each application program directly accesses the data

While in the database approach, all applications access the database through DBMS which provides a few important access control facilities

17
Q

What is the Conceptual Level in the Three-Level Architecture?

A

Describes WHAT data is stored in the database and the relationships among the data

Emphasis on logical structure of the data. Must not contain any storage-dependant details

18
Q

What is the Internal Level in the Three-Level Architecture?

A

Describes HOW data are actually stored and how files and indexes are organized and used

19
Q

What are 3 Categories of Data Model?

A
  1. Conceptual Data Model
  2. Logical Data Model
  3. Physical Data Model
20
Q

What is a Conceptual Data Model?

A

Identifies the high level data structure

Independant of DBMS, application programs and physical considerations

example: Entity-Relationship (ER) Model proposed in 1976

21
Q

What does the Entity-Relationship (ER) model solve?

A

One of the most difficult aspects of database design is that designers, programmers and end-users tend to view data in different ways

Need a model for communication that is non-technical and free of ambiguities

Solution:Entity-Relationship (ER) Model

22
Q

What are the 4 Components in an ER Diagram?

A
  1. Entity
  2. Relationship
  3. Attribute
  4. Constraint
23
Q

What is an Entity (ER Diagram)?

A

A group of objects with the same properties

  • Objects with a physical existence:

eg. student, classroom, book, property

  • Objects with a conceptual existence

eg. Viewing, Inspection, Sale

24
Q

What is a Relationship (ER Diagram)?

A

Relationship (type): meaningful associations among two or more entities

Degree of Relationship: The number of participating entity types in a relationship

25
Q

What is an example of a binary (degree 2) relationship type?

A

. Enrolls on>
Student—————————————–Course

                                     <Views PropertyForRent-----------------------------Client
26
Q

What is an example of a ternary (degree 3) relationship type?

A

An admissions tutor enrolls a student onto a course

Admissions Tutor —-EnrollsOn—-Course
|
|
Student

27
Q

What is an example of a quarternary (degree 4) relationship type?

A

An international student, under the active guidance of his high school tutor, applies for a place at a UK University through a recruiting agent

28
Q

What is a recursive (degree 1) relationship type?

A

A relationship between occurrences of the same entity type

eg. AdademicStaff (professor) supervises AcademicStaff (lecturer)

29
Q

What is a Multiple Relationship?

A

2 Entities are associated through more than one relationship

30
Q

What is an Attribute (ER Diagram)?

A

A property of an entity or a relationship

Student
———–
studentNo {PK} <– (Primary key)
StudentName ]———— ** Attributes**
dOBirth

31
Q

What is a Composite Attribute?

A

An attribute that contains multiple smaller attributes

eg.

studentName
fName
lName

homeAddress
street
city
postcode

32
Q

What is a Derived Attribute?

A

An attribute whose value is calculated or derived from other attributes in the database rather than being stored directly

If you have an attribute “Date of Birth” for an entity “Person,” you could derive the “Age” attribute from the current date and the “Date of Birth”

The “Age” is not stored, but calculated whenever needed

33
Q

What is a Multi-valued Attribute?

A

A multi-valued attribute in an ER (Entity-Relationship) diagram is an attribute that can have multiple values for a single entity

For example:

A “Person” can have multiple phone numbers or email addresses. Here, “Phone Numbers” is a multi-valued attribute because a person can have more than one phone number

34
Q

What is a Candidate Key?

A

A Candidate Key is an attribute or a set of attributes that uniquely identifies each row in a database table.

-A candidate key can not contain a null

eg. National insurance number, staff number

35
Q

What is the Primary Key?

A

The candidate key that is selected to uniquely identify each occurrence of an entity type

Principles of choosing the Primary Key:

-Attribute length
-Minimal num of attributes required
- The future certainty of uniqueness

36
Q

What is the Alternate Key?

A

An alternate key is any other attribute that could also be used to uniquely identify a record, but isn’t selected as the primary key