Three level architecture, data models Flashcards

(30 cards)

1
Q

What is the three level architecture also known as

A

ANSI-SPARC architecture.

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

What are the three levels of architecture

A
  • External (how users see the database)
  • Conceptional (logical structure)
  • Internal (physical storage)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does the external view describe

A

the part of the data base relevant to users

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

What does the conceptual level describe

A

What data is stored and the relationships among the data

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

What does the internal level describe

A

How data is stored, include file organisation, indexes and access paths

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

What are the two main objectives of the thee level architecture

A

data abstraction
data independence

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

What is data abstraction

A

Hiding storage details and presenting users with a conceptual view of the data base

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

what is data independence

A

The capacity that upper levels are unaffected by changes to lower level.

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

What are the levels of abstraction in a DBMS

A
  • Physical level (internal schema)
  • Logical level (conceptual scheme)
  • view level (External schema)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the internal schema

A

the lowest level of abstraction and describes how the data is physically stored

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

what is conceptual schema

A

the middle level of abstraction and describes what data is stored and the relationships between them

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

What is external schema

A

the top level of abstraction and describes what a specific user sees

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

Give an ATM as an example of data abstraction

A

Analogy: Think of an ATM.
- Physical level: The cash, circuitry, and storage hardware.

  • Logical level: The bank database defines accounts, balances, and transactions.
  • View level: You only see your own balance and transaction history.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Define physical data independence

A

Change internal schema without having to change conceptual schema.

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

Define logical data independence

A

Change internal schema without having to change conceptual schema.

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

give an example for physical data independence

A

Example:
- The DB admin moves data from hard drives to SSDs, or changes file indexing.

  • Applications using tables like Customer(CustomerID, Name, Email) still work.
17
Q

give an analogy for example data indepepednance

A

Example:
- You add a new attribute PhoneNumber to Customer.

  • The HR app still works because it only queries CustomerID and Name.
  • Users don’t need to rewrite their code.
18
Q

What is a database schema

A

the description of the structure of the database

19
Q

What is the data base state

A

The content of a DB at a moment in time.

20
Q

Give an example of schema vs. state.

A

Schema: Employee(emp_id, emp_name, address, dept_id)

State: the actual list of employees stored at a given time.

21
Q

What is a data model

A

a set of concepts to describe data, relationship among data and constraints

22
Q

What are the three categories of data models

A
  • Conceptual
  • Logical
  • Physical
23
Q

What is a conceptual data model

A

A conceptual data model is the highest-level view of a database.
It describes the big picture: what entities exist, what attributes they have, and how they relate to one another.

24
Q

Wet is a logical data model

A

Describes data structures (records, sets, tables, objects), independent of physical storage.

25
What are examples of logical data models
- Hierarchical - Network - relational
26
How is data organised in the hierarchical model
as a tree; each mode only has one parent
27
How is data organised in the network model
as a graph; a node can have more than one parent
28
Why did COdd propose the relational model in 1970
Because hierarchical and network models lacked data independence and had poor inconsistency management.
29
What does the relational model organise data into
Tables (relations) with rows (tuples) and columns (attributes).
30
What is a physical data model
Describes how data is actually stored, record structures, orderings, and access paths; DBMS-dependent.