Data Modelling Flashcards

(22 cards)

1
Q

What is Data Modeling?

A

The process of creating a visual representation of data and its relationships in a system to support database design and business requirements.

Purpose: Organize data logically, reduce redundancy, support accurate data storage and retrieval.

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

Define Conceptual Data Model.

A

A high-level, abstract representation of organizational data, focusing on business concepts and rules rather than technical details.

Characteristics: Shows entities and relationships, no technical or database implementation details, used for understanding business requirements.

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

What are the entities in a Conceptual Data Model example?

A
  • Customer
  • Order
  • Product

Relationship: Customer places Order; Order contains Product.

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

Define Logical Data Model.

A

A detailed representation of data requirements, independent of physical database structure, focusing on attributes, keys, and relationships.

Characteristics: Defines entities, attributes, primary keys, and foreign keys.

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

What is the primary key for the Customer entity in a Logical Data Model?

A

Customer_ID

Example: Customer (Customer_ID, Name, DOB).

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

What is the difference in purpose between Conceptual and Logical Models?

A
  • Conceptual Model: Understand business requirements
  • Logical Model: Define data structure in detail

Detail Level: Conceptual is high-level, Logical is medium-level.

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

True or false: The Logical Model is DBMS-independent.

A

TRUE

However, it is more structured compared to the Conceptual Model.

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

What is the audience for the Conceptual Model?

A

Business stakeholders

The Logical Model is aimed at data architects and developers.

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

What is the summary of the three types of data models?

A
  • Conceptual Model: Focus on business entities and relationships
  • Logical Model: Focus on attributes, keys, and constraints without worrying about the database
  • Physical Model: Focus on DBMS-specific implementation

Always start with conceptual → logical → physical.

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

What does an ER diagram represent?

A

Used for conceptual and logical modeling

It visually depicts entities and their relationships.

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

What SQL command is used to create the Customer table?

A

CREATE TABLE Customer (
Customer_ID INT PRIMARY KEY,
Name VARCHAR(50),
DOB DATE
);

This is part of the Logical Model with attributes and keys.

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

What is the primary key in the Order_Product table?

A

PRIMARY KEY (Order_ID, Product_ID)

This table establishes a many-to-many relationship between Orders and Products.

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

What is the main part in the design of a database?

A

the creation of a data model

This step culminates in a graphical representation of entities and records for the database schema.

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

What is the best-known way to create a data model?

A

Entity-Relationship Diagram (ERD)

The Entity-Relationship model is a structured way of data modeling for relational databases.

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

True or false: Changing the data model as you go along is easy and requires little work.

A

FALSE

Changing the data model usually requires a lot of work, especially in relational databases.

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

What are the three design phases recommended for database design?

A
  • Conceptual
  • Logical
  • Physical

These phases help manage the design process effectively.

17
Q

In the Conceptual phase, what do we map out?

A

main entities, relationships, and attributes

This phase does not consider how to store them in the database yet.

18
Q

During the Logical phase, what do we decide regarding entities and relationships?

A

which will be stored in a relational database

Each entity is associated with a table containing attributes as columns.

19
Q

What does the Physical phase determine?

A

how each table should be stored in a computer

This phase relies on familiarity with the specific database management system.

20
Q

What is the consequence of changing the data structure mid-way through development?

A

requires rewriting many lines of code

All code relies on the initial data structure created.

21
Q

What is a critical step before embarking on any new application that requires a database?

A

build your data model structure or ERD

This preparation is essential for effective database design.

22
Q

What is the difference between relational and non-relational databases?

A

relational databases have a well-defined, rigid structure

Non-relational databases offer more flexibility in data storage.