Lecture2 - Relational Models and Database Schema

0.0(0)
studied byStudied by 0 people
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/35

flashcard set

Earn XP

Description and Tags

Flashcards covering key concepts from Lecture 2: Relational Models and Database Schema, including data models, ER and relational models, keys and constraints, schema vs state, three-schema architecture, data independence, DBMS languages, and client-server architectures.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

36 Terms

1
New cards

What is a data model?

A collection of high-level description concepts for describing data; it hides low-level storage details and defines the structure and constraints of the data.

2
New cards

What is a schema in a data model context?

A description of a particular collection of data using the given data model.

3
New cards

Name the three broad categories of data models.

Conceptual (high-level), Physical (low-level internal), and Implementation/Relational (between, e.g., relational) data models.

4
New cards

What are the characteristics of a conceptual data model?

High-level, semantic; uses concepts like entities, attributes, and relationships; close to how users perceive data.

5
New cards

What is the ER (Entity-Relationship) model used for?

A model for database design using entities and relationships; usually converted to a relational design for storage.

6
New cards

What is the relational data model?

Data stored in relations (tables); schema defined as RelationName(field1:type1, …, fieldn:typen); supported by SQL.

7
New cards

What is a schema diagram?

A diagrammatic display of a database schema showing relation names, attributes, keys, and constraints.

8
New cards

How is a relation defined in the relational model?

As a table with columns (attributes) and rows (tuples).

9
New cards

What is a domain in relational terms?

The set of allowable values for a given attribute.

10
New cards

What is the degree of a relation?

The number of attributes (columns) in the relation.

11
New cards

What is the cardinality of a relation?

The number of tuples (rows) in the relation.

12
New cards

What is a primary key?

A candidate key selected to uniquely identify tuples in a relation.

13
New cards

What is a foreign key?

An attribute or set of attributes in one relation that references the primary key of another relation.

14
New cards

What is a superkey?

An attribute or set of attributes that uniquely identifies a tuple within a relation.

15
New cards

What is a candidate key?

A minimal superkey whose proper subset is not a superkey.

16
New cards

What is an alternate key?

A candidate key that is not chosen as the primary key.

17
New cards

What is a NULL value and its meanings?

Represents unknown or inapplicable data; meanings include value unknown, exists but not available, or not applicable.

18
New cards

What are the main types of database integrity constraints?

Entity integrity, referential integrity, domain constraints, and semantic integrity constraints.

19
New cards

What is entity integrity?

Primary key values cannot be NULL.

20
New cards

What is referential integrity?

Foreign key values must reference an existing primary key value in the referenced relation, or be NULL in certain cases.

21
New cards

What is a domain constraint?

Constraints on the data type and allowed values for an attribute (e.g., integer, date, string).

22
New cards

What are semantic (business) integrity constraints?

Constraints based on application semantics that may require a constraint language to express (e.g., max hours per employee).

23
New cards

What is a database schema vs a database instance/state?

Schema (intension) describes the structure; instance/state (extension) is the actual data at a moment in time.

24
New cards

What is the three-schema architecture?

External (views), Conceptual (logical schema), Internal (physical storage).

25
New cards

What is the purpose of an external schema?

Describe user views and provide customized access to data; multiple external schemas can exist.

26
New cards

What does data independence mean?

The ability to change one level’s schema without affecting higher-level schemas; includes logical and physical independence.

27
New cards

What is the difference between logical data independence and physical data independence?

Logical: change in the conceptual schema without changing external schemas; Physical: change in the internal schema without changing the conceptual schema.

28
New cards

What type of language is SQL considered in DBMS terminology?

A high-level, non-procedural (declarative) language that specifies what data to retrieve, not how to retrieve it.

29
New cards

What are the main components of the DBMS architecture described?

Storage manager and query processor.

30
New cards

What does the storage manager do?

Interacts with the file system to store, retrieve, and update data; translates DDL/DML; manages data dictionary.

31
New cards

What is the query processor responsible for?

DDL interpreter, DML compiler, and the query evaluation engine that executes queries.

32
New cards

What data structures are part of the storage manager?

Data files, data dictionary, and indices.

33
New cards

What is the two-tier client architecture?

First tier: client (user interface); second tier: database server (data storage and validation); enables direct client-server interaction.

34
New cards

What are advantages of the two-tier architecture?

Wider access to databases, simplified deployment, and potential performance benefits; fewer layers can mean lower overhead.

35
New cards

What is the three-tier client architecture?

Three tiers: client (UI), application server (business logic), and database server (data storage and validation).

36
New cards

What are advantages of the three-tier architecture over the two-tier?

Less powerful clients needed, centralized maintenance, easier to modify individual tiers, and better suitability for web environments.