Data Models Flashcards

File System, Hierarchical & Network, Relational, Similarities & Diff between data models

1
Q

Data model

A

Different levels of complexity/detail will be specified in the
conceptual & logical models, for schemas, and the
physical models

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

Entities

A

anything about which data are to
be collected and stored - each instance is unique and distanct

nouns (ex: teacher, student)

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

Attribute

A

characteristic of an entity

organized as columns in a table that is
about the entity and describes the entity

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

Relationship

A

association among entities

Between any two entities there is some type of
relationship (it could be “none”).

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

Types of relationships

A

one-to-one, one-to-many, many-to-many

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

One-to-one relationship

A

each record in Table1 is related to one record in Table2; each record in Table2
is related to one record in Table1

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

One-to-many relationship

A

each record in Table1 may be related to several records in Table2. Each
record in Table2 is related to one record in Table1

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

Many-to-many relationship

A

each record in Table1 may be
related to several records in Table2, and each record in Table2 may be
related to several records in Table1

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

How are relationships formed?

A

through common attributes

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

key attributes

A

primary key & forgein key

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

primary key

A

attribute (or combination of attributes) that
uniquely identifies any given row

each table must have this type of attribute

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

forgein key

A

attribute whose
values match the primary key values in a
related table

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

True or False: It is harder to achieve logical data independence than physical data independence

A

True

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

Constraint

A

restriction placed on the data

this helps ensure data integrity

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

Data Model Types

A

hierarchical (parent-child), network, entity-relational

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

hierarchical (parent-child)

A

This model organizes data in a tree-like structure, where each record has a single parent, and each parent can have multiple child records. This creates a strict hierarchy

Pros: Simple, fast, and efficient for hierarchical data.

Cons: Lack of flexibility, as each child can have only one parent, making it difficult to model more complex relationships.

17
Q

network

A

The network model is more flexible than the hierarchical model. It uses a graph-like structure where entities are represented as nodes, and the relationships between them are shown as arcs or links. Unlike the hierarchical model, an entity can have multiple parents and multiple children.

pros: Flexible and supports complex relationships like many-to-many.

cons: More complicated to implement and manage than hierarchical models.

18
Q

entity-relational

A

The ER model is a conceptual and high-level model for representing data. It uses entities (objects or things) and relationships between them. Entities are connected by relationships, and each relationship can have attributes.

Pros: Conceptual and flexible, useful for designing databases, and easy to visualize with ER diagrams.

Cons: It’s abstract and doesn’t describe how data is physically stored.

19
Q

data modeling steps

A
  1. Business rules, use cases (human-readable description of data)
  2. Conceptual model (global view of entire DB w/entities, relationships, and constraints)
  3. Logical Model (ER diagram)
20
Q

Differences between all data models?

A
  • hierarchy = rigid
  • network = flexible & allows M-M relationships
  • er = abstract & conceptual