Fundamentals of Database Systems - Lecture Notes Review (DBMS, ER, Normalization, Keys)

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

1/66

flashcard set

Earn XP

Description and Tags

Flashcards covering DBMS concepts from the notes (DBMS basics, data models, architecture, ER models, normalization, keys, relational algebra, and ER-to-relational mapping).

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

67 Terms

1
New cards

What are the two main parts of a Database System?

1) Database (where data is stored) and 2) Database Management System (DBMS) which helps manage and use the database.

2
New cards

In the online library analogy, what does the Database represent?

A digital library where books' information (titles, authors, genres, availability) is stored.

3
New cards

In the online library analogy, what does the DBMS represent?

A librarian that helps you find, borrow, return, and manage books efficiently.

4
New cards

Name the three basic DBMS operations described in the notes.

Storage (store data), Modification (update data), Extraction (retrieve data).

5
New cards

What are the levels of Abstraction in DBMS?

Physical Level, Logical Level, and View Level.

6
New cards

What do data abstraction and data independence refer to in DBMS?

Hiding the details of data storage and organization from users; changes in storage do not affect how users interact with data.

7
New cards

List the main data models discussed in the notes.

Hierarchical Model, Network Model, Relational Model, Entity-Relationship (ER) Model, Object-Oriented Model.

8
New cards

What is a Data Model?

A framework for organizing and structuring data, defining how data is connected, stored, and processed.

9
New cards

What is the Relational Model?

Data organized into tables (relations) with rows (tuples) and columns (attributes).

10
New cards

What is the ER Model?

Uses entities and relationships, often visualized with ER diagrams.

11
New cards

What is the Object-Oriented Model in DBMS?

Stores data as objects, integrating object-oriented programming concepts with databases.

12
New cards

What are the main purposes of data models?

Design, Documentation, Efficiency, and Integrity of data management.

13
New cards

What is database architecture?

The overall structure and organization of a database system, including components, their relationships, and design/operational principles.

14
New cards

Name the six components of Database Architecture.

Data Storage, Data Access, Data Management, Security, Scalability, Flexibility.

15
New cards

Describe Single-Tier Architecture with an example.

Application and database reside on the same machine; example: Microsoft Access.

16
New cards

Describe Two-Tier Architecture with an example.

Separate client application and database server; example: client-desktop app querying a central SQL Server.

17
New cards

Describe Three-Tier Architecture with an example.

Presentation (client), Application processing (middle tier), Data management (database server); example: Online Shopping Website.

18
New cards

What are the advantages of Single-Tier, Two-Tier, and Three-Tier architectures?

Single-Tier: simple setup/low cost; Two-Tier: efficient for small to medium apps; Three-Tier: scalable, flexible, secure for large-scale web apps.

19
New cards

What is Relational Algebra and its nature?

A procedural query language that provides a theoretical foundation for relational databases and SQL.

20
New cards

List the basic operations of Relational Algebra.

Selection (σ), Projection (π), Union (U), Set Difference (-), Cartesian Product (×), Rename (ρ).

21
New cards

What does the Selection operation do in Relational Algebra?

σ(condition)(R) returns the subset of R that satisfies the condition.

22
New cards

What does the Projection operation do in Relational Algebra?

π(attributes)(R) returns only the specified attributes from R.

23
New cards

What does Union in Relational Algebra do?

U combines the tuples from two relations with the same schema, removing duplicates.

24
New cards

What does Set Difference do in Relational Algebra?

R1 - R2 returns tuples that are in R1 but not in R2.

25
New cards

What does Cartesian Product do in Relational Algebra?

R1 × R2 pairs every tuple of R1 with every tuple of R2.

26
New cards

What is Rename (ρ) in Relational Algebra used for?

Renames the attributes or relation to new labels.

27
New cards

What is Join (in extended Relational Algebra) used for?

Combines related tuples from two relations based on a common attribute, often followed by a join with another relation.

28
New cards

What is Intersection (∩) in Relational Algebra?

Returns the tuples that appear in both relations.

29
New cards

What is Division (÷) in Relational Algebra used for?

Finds tuples in one relation that are related to all tuples in another relation (e.g., students enrolled in all required courses).

30
New cards

What is an ER Diagram?

A diagram that represents entities, attributes, and relationships to model database structure.

31
New cards

Why are ER Diagrams useful in DBMS design?

They help conceptualize the database, identify necessary fields, reduce complexity, and preview the logical structure.

32
New cards

What shapes/notations are used in ER Diagrams?

Rectangles for entities, ellipses for attributes, diamonds for relationships; lines connect entities/attributes; primary keys are underlined; double ellipses indicate multi-valued attributes.

33
New cards

What is a Weak Entity in ER Diagrams?

An entity that depends on another entity and has no key attribute of its own; represented by a double rectangle.

34
New cards

What is Generalization in ER Modeling?

Bringing several entities together into a generalized entity based on shared characteristics (e.g., Birds).

35
New cards

What is Specialization in ER Modeling?

Dividing a group of entities into sub-groups based on characteristics (e.g., Person into Employee, Customer, etc.).

36
New cards

What is Inheritance in DBMS context?

A mechanism where lower-level entities inherit attributes from higher-level entities; related to generalization/specialization.

37
New cards

Define Entity, Attribute, and Relationship in ER terms.

Entity: a thing of interest; Attribute: property of an entity; Relationship: association between entities.

38
New cards

What is a Key Attribute?

An attribute that uniquely identifies an entity within an entity set; it is underlined.

39
New cards

What is a Composite Attribute?

An attribute composed of multiple attribute components; shown as connected ellipses.

40
New cards

What is a Multivalued Attribute?

An attribute that can have multiple values for a single entity; shown with a double ellipse.

41
New cards

What is a Derived Attribute?

An attribute whose value can be derived from other attributes; shown with a dashed ellipse.

42
New cards

What is a Primary Key and how is it chosen?

A Candidate Key selected by the designer as the main unique identifier; it must be non-null and unique; only one primary key per relation.

43
New cards

What is a Super Key?

A set of attributes that can uniquely identify each tuple; may include extra attributes.

44
New cards

What is a Candidate Key?

A minimal superkey; a minimal set of attributes that can identify each tuple uniquely.

45
New cards

What is an Alternate Key?

Candidate keys not chosen as the primary key.

46
New cards

What is a Foreign Key?

An attribute in a referencing relation that refers to the primary key of a referenced relation; can be NULL; not necessarily unique.

47
New cards

What is a Partial Key?

A key that cannot identify all records by itself but can select a subset of related tuples.

48
New cards

What is a Composite Key?

A primary key that consists of multiple attributes.

49
New cards

What is a Unique Key?

A key that is unique for all records, may be NULL, and is non-updatable in many cases.

50
New cards

What is a Surrogate Key?

An artificial, unique, non-null, updatable key used when no natural key is suitable.

51
New cards

What is a Secondary Key?

A key used for indexing to speed up approximate searches.

52
New cards

What is the first step to finding candidate keys (essential attributes)?

Identify essential attributes: attributes not present on the RHS of any functional dependency.

53
New cards

In the example R(A,B,C,D,E,F) with A→B, C→D, D→E, which attributes are essential?

A, C, and F.

54
New cards

In that same example, which combination forms the candidate key after verifying closure?

CE is the candidate key (the only possible candidate key).

55
New cards

How many candidate keys and how many super keys exist for that CE example?

Only one candidate key (CE); total super keys = 16 (2^4, since there are 4 non-essential attributes).

56
New cards

What is Rule-01 in ER-to-Relational Mapping?

A strong entity set with only simple attributes requires only one table in the relational model.

57
New cards

What is Rule-03 in ER-to-Relational Mapping?

A strong entity set with multi-valued attributes requires two tables (one for simple attributes; another for the multi-valued attributes with the key).

58
New cards

What is Rule-04 in ER-to-Relational Mapping?

Translating a relationship set into a table: the table includes primary keys of participating entities and descriptive attributes.

59
New cards

What is Rule-05 in ER-to-Relational Mapping for binary relationships with m:n cardinality?

Three tables are required: A, R, and B.

60
New cards

What is Rule-06 about in ER-to-Relational Mapping with participation constraints?

If there is total participation, the foreign key becomes NOT NULL (cannot be null).

61
New cards

What is Rule-07 about in ER-to-Relational Mapping for weak entities?

A weak entity set requires two tables in the relational model (the identifying relationship plus the weak entity table).

62
New cards

Why is normalization used in DBMS?

To reduce data redundancy, structure data into related smaller tables, and improve data integrity.

63
New cards

What are the Normal Forms mentioned and their quick definitions?

1NF: atomic values; 2NF: 1NF and all non-key attributes fully functionally dependent on the primary key; 3NF: 2NF and no transitive dependencies; BCNF: stronger form of 3NF; 4NF: no multi-valued dependencies; 5NF: no join dependencies (join is lossless).

64
New cards

What are some advantages of Normalization?

Reduces redundancy, improves organization and data consistency, supports relational integrity, and enables flexible design.

65
New cards

What are some disadvantages of Normalization?

Hard to start design without user needs, higher normal forms can degrade performance, time-consuming for complex decompositions, risk of poor design if misapplied.

66
New cards

What is a Candidate Key vs a Primary Key vs a Super Key?

Candidate Key: any minimal superkey that could serve as a primary key; Primary Key: the chosen candidate key; Super Key: any set of attributes that uniquely identifies a tuple (not necessarily minimal).

67
New cards

What distinguishes a Foreign Key from other keys?

A Foreign Key refers to a primary key in another relation; it enforces referential integrity but may be NULL and is not necessarily unique.