2.0 Database System

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

2.

0 Database System
Chapter 2 Part 1: Data Models
Part 1: Data Models

• In this chapter, you will learn:

• About data modeling and why data models are important

• The basic data-modeling building blocks

• What is business rules?

• How the major data models evolved

• How data models can be classified by level of abstraction

Data Modeling and Data Models

1 - Data Modeling and Data Models

Data Models

2 - Data Models

• Data Model:
- A set of concepts to describe the structure of a database, the operations for
manipulating these structures, and certain constraints that the database should
obey.

• Data Model Structure and Constraints:

- Constructs are used to define the database structure

- Constructs typically include elements (and their data types) as well as groups of
elements (e.g. entity, record, table), and relationships among such groups

- Constraints specify some restrictions on valid data; these constraints must be always
enforced

• Data Model Operations:

- These operations are used for specifying database retrievals and updates by referring
to the constructs of the data model.

- Operations on the data model may include basic model operations (e.g. generic
insert, delete, update) and user-defined operations (e.g. compute_student_gpa,
update_inventory)

The Importance of Data Models


• Facilitate interaction among the designer, the applications programmer, and the end user

• End users have different views and needs for data

• Data model organizes data for various users

• Data model is an abstraction

• Cannot draw required data out of the data model

Categories of Data Models


Data Model: Basic Building Blocks

What is data models?


• Data modeling, the first step in designing a database, refers to the process of creating a
specific data model for a determined problem domain.

- A problem domain is a clearly defined area within the real-world environment, with
a well-defined scope and boundaries that will be systematically addressed.

• A data model is a relatively simple representation, usually graphical, of more complex real-
world data structures

Building data models


• When database designers choose or determine the entities, attributes, and relationships that
will be used to build a data model, they may begin by gaining a thorough understanding of
the types of data that exist in an organization, how the data is used, and in what periods it is
used.

• However, such data and information do not provide the essential insight of the overall
business.

• From a database standpoint, data collection is only valuable when it reflects well-specified
business rules.

Business rules
• Descriptions of policies, procedures, or principles within a specific organization

• Apply to any organization that stores and uses data to generate information

• Description of operations to create/enforce actions within an organization’s environment

• Describe characteristics of data as viewed by the company

Example
Discovering Business Rules

Translating Business Rules into Data Model Components

More examples
Practice

Relationship between data models and business rules?


• The data model is built to follow the business rules

• They work together to keep your business information organized and useful.

• The data model is built to follow the business rules.

• They work together to keep your business information organized and useful.

The Evolution of Data Models


The Future of Data Models

Data model terminology

Data Abstraction
• Data Abstraction is a process of hiding unwanted or irrelevant details from the end user.

• It provides a different view and helps in achieving data independence, which is used to
enhance the security of data

• End users’ view of the data environment (represented by ER diagrams)


Data Abstraction Levels

Example: University Database


Summary: Data models
• A data model is an abstraction of a complex real-world data environment

• Database designers use data models to communicate with programmers and end users

• Basic data modeling components:

- Entities

- Attributes

- Relationships

- Constraints

• Business rules are used to identify and define the basic modeling components within a
specific real-world environment

• Types of data model

- Hierarchical model

◦ Set of one-to-many (1:M) relationships between a parent and its children's


segments

- Network data model

◦ Uses sets to represent 1:M relationships between record types

- Relational model

◦ Current database implementation standard

◦ ER model is a tool for data modeling: complements relational model


- Object-oriented data model

◦ object is basic modeling structure

◦ depicted using UML

• Relational model adopted object-oriented extensions: extended relational data model


(ERDM)

• Data-modeling requirements are a function of different data views and abstraction levels

- Three abstraction levels: external, conceptual, internal

• NoSQL databases are a new generation of databases that do not use the relational model
and are geared to support the very specific needs of Big Data organizations.

Practice

You might also like