0% found this document useful (0 votes)
43 views28 pages

Selected Topic: Data Modeling and Management: What Are You Thinking of When We Talk About ?

This document provides an introduction to data modeling and management. It discusses different sources of data including machines, people, and organizations. It then defines what a data model is and how it describes data characteristics including structure, operations, and constraints. Some examples of data model structures are given as structured, unstructured, and semi-structured. Common data model operations like subsetting, substructure extraction, union, and join are also outlined. Finally, different types of constraints in data models such as value, uniqueness, cardinality, type, domain, and structural constraints are defined.

Uploaded by

sincere guy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views28 pages

Selected Topic: Data Modeling and Management: What Are You Thinking of When We Talk About ?

This document provides an introduction to data modeling and management. It discusses different sources of data including machines, people, and organizations. It then defines what a data model is and how it describes data characteristics including structure, operations, and constraints. Some examples of data model structures are given as structured, unstructured, and semi-structured. Common data model operations like subsetting, substructure extraction, union, and join are also outlined. Finally, different types of constraints in data models such as value, uniqueness, cardinality, type, domain, and structural constraints are defined.

Uploaded by

sincere guy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

AT71.

9003
Selected Topic:
Data Modeling and Management

Dr. Chutiporn Anutariya


chuti at ait dot asia

I. Intro to Data Modeling & Mgt 1

WARM UP Discussion:
Data …
What are you thinking of when we
talk about data?

2
3

Let’s Discuss:
Sources of Data …
Where do data come from?
Who/what generates data?

4
Three major sources of data...

Machines People Organizations


Data generated from Tweets, status More traditional type
real time sensors, updates, social of data: transaction
machines, vehicles, media data, photos, information,
web logs, etc. videos databases, data
warehouses

6
?

Let’s Discuss:
What is a Data Model?
Why do we care about data model?

Data Model
describes data
characteristics

8
Data Model describes data characteristics

Structure Operations Constraints

Data Model describes data characteristics

Structure Operations Constraints

Employee { Select employee whose Today’s date minus


firstName: string, DOB is after 1990. DOB must be greater
lastName: string, than 20.
DOB: date
}

10
Structure
Data Model Structures

Unstructured

Structured

Semi-structured

11

Structure
Data Model Structures

Structured Unstructured Semi-structured

◎ The data that has a structure, is typed and is well organized


either in the form of tables or in some other way.

◎ It has a high level of organization making it predictable, easy to


organize and very easily searchable using basic algorithms.

12
Structure
Data Model Structures

Structured Unstructured Semi-structured

◎ The data that is unstructured or unorganized.

◎ Operating such type of data becomes difficult


and requires advance tools and softwares to
access information.

13

Structure
Data Model Structures

Structured Unstructured Semi-structured

◎ Semi-structured data lies somewhere


between the two.
◎ It is a form of structured data that
does not conform with the formal
structure of data models associated
with relational databases or other
forms of data tables
◎ But contains tags or other markers to
separate semantic elements and
enforce hierarchies of records and
fields within the data.
◎ It is also known as self-describing
structure.

14
Structure
Data Model Structures

Structured? Unstructured? Semi-structured?

◎ Are the files structured?


◎ Do they have the same structure?

15

Structure
Data Model Structures

Structured? Unstructured? Semi-structured?

◎ Is the file structured or unstructured?


◎ Compressed data like JPEG images, MP3
audio files, MPEG3 video files, encrypted
data, are usually ___________.

16
Operations
Data Model Operations

Subsetting Substructure
extraction

Union Join

17

Operations
Data Model Operations

Subsetting: Given a collection of data, and a condition, find a


subset of data from the collection so that each
element in the subset satisfied

(John, Smith, 10-12-1989, Mechanical, 70000)


(Liz, Spencer, 09-29-1980, Electrical, 65000)
(Marie, Bishop, 11-07-1992, Driver, )
(Steve, Richards, 04-16-1958, 140000)

Field#5 < 90000

(John, Smith, 10-12-1989, Mechanical, 70000)


(Liz, Spencer, 09-29-1980, Electrical, 65000)

18
Operations
Data Model Operations

Substructure extraction: Given a data collection with some


structure, extract from each data item a part of the structure as
specified by a condition.

(John, Smith, 10-12-1989, Mechanical, 70000)


(Liz, Spencer, 09-29-1980, Electrical, 65000)
(Marie, Bishop, 11-07-1992, Driver, )
(Steve, Richards, 04-16-1958, 140000)

Field#1, Field#2

(John, Smith)
(Liz, Spencer)
(Marie, Bishop)
(Steve, Richards)
19

Operations
Data Model Operations

Union: Given two data collections, create a new one with


elements of the two input collections. Duplicate elimination.

(John, Smith, 10-12-1989)


(Liz, Spencer, 09-29-1980)
(Marie, Bishop, 11-07-1992) (John, Smith, 10-12-1989)
(Liz, Spencer, 09-29-1980)
(Marie, Bishop, 11-07-1992)
(Lance, Holt, 04-02-1976)
(Lance, Holt, 04-02-1976)
(Liz, Spencer, 09-29-1980)

20
Operations
Data Model Operations

Join: Given two data collections, create a new one with


elements of the two input collections. Duplicate elimination.

(12, John, Smith, 10-12-1989)


(14, Liz, Spencer, 09-29-1980)
(18, Marie, Bishop, 11-07-1992)
(20, Sue, Daveson, 03-16-1986) (12, John, Smith, 10-12-1989, Mechanical,
70k)
(14, Liz, Spencer, 09-29-1980, Electrical, 65k)
(18, Marie, Bishop, 11-07-1992, Driver, 45k)
(12, Mechanical, 70k)
(14, Electrical, 65k)
(18, Driver, 45k)
(23, Student, 30k)

21

Constraints
Data Model Constraints

◎ Constraints are logical statements that must hold


for data.

A movie has only one title

◎ Different data models have different ways to express


constraints

22
Constraints
Data Model Constraints

Types of Constraints
◎ Value constraint
○ Age is never negative

◎ Uniqueness constraint
○ A movie can have only one title

◎ Cardinality constraint
○ A person can take between 0 and 3 blood pressure
medications at a time

23

Constraints
Data Model Constraints

Types of Constraints
◎ Type constraint
○ Lname:string

◎ Domain constraint
○ Month in (1 … 12) or Month in (‘Jan’, ‘Feb’, …
‘Dec’)

◎ A structural constraint puts restrictions on the


structure of the data rather than the data values
themselves.

24
?

Let’s Discuss:
Modeling Data in your daily life
Think of something in your daily life and explain
what kind of model and constraints you would
design for such data.

25

Different Kinds of
Data Models
List some data models you are
aware or have heard of?
Semi-structured
Data Model
Data Model behind the Web
A Simple HTML Document

29

XML: A Generalization of HTML

XML Data Processing allows query related to both element


structures and values.
30
JSON: Java Script Object Notation

◎ An open standard format that uses human-readable


text to transmit data objects consisting of
attribute–value pairs.
◎ It is used primarily to transmit data between a server
and web application, as an alternative to XML.
◎ JSON has been popularized by web services
developed utilizing REST principles.

31

JSON: Java Script Object Notation

Key-value Pair

Tuple / Object

Array

32
?

How to generalize all these forms


of semi-structured data?

33

Tree Data Structure


A tree has a nested and hierarchical structure
representing complex relationships between
entities!

34
Tree Data Structure

◎ Tree is well-known data structure and


allows navigational access to data
◎ Paper
○ getParent → document
○ getChildren → title, author, source
○ getSibling → report
◎ “Video database”
○ Root-to-Node path →
document/report/author/“video
database”
◎ Queries need tree navigation
○ Author of “XML query data model”
35

Let’s Discuss:
Utilization of XML or JSON on the Internet
● XML (and its lightweight younger sibling JSON) often gets referred to as "the
language of the Internet". That means Web applications talk to each other in XML
or JSON. For instance, they are used to "markup" vast amount of big data on the
Internet for access and retrieval by programs running in applications. They are also
used to send messages through which that programs can talk to each other.
● An example application would be a program using an XML-based data standard
which defines a common way of describing the news items. This application can
use XML (or JSON) to gather news data from multiple web sources and aggregate
them in a news portal for the readers.
● Think of other applications that can use XML and discuss it with your fellow class
mates.

36
Data Management &
Database Technology

How to Manage Data

38
Questions!!

• What is a database?
• Give some examples of database systems
that we encounter in our lives.

39

Introduction: Database

• Database
– Collection of related data
– Data: known facts that can be recorded and
that have implicit meaning
– Represents some aspect of the real world
– Built for a specific purpose

40
Questions!!

• Why Database technology is important?

41

Importance of Database Technology

• Databases crucial for daily operations and


decision making in organizations
• Database management technology
– Major part of software industry
– Revolutionary evolvement over 40 years
– Foundation for management of long term
memory of organizations
• Vibrant field with employment
opportunities 42
Overview: Multimedia databases

• Multimedia databases
– Store textual or numeric information
– Store images, audio clips, and video streams
digitally
• Give examples of Multimedia DB
systems!!

44

45
Overview: Geographic database

• Geographic database
– Store and analyze maps, weather data, and satellite
images
• Give examples of Geographic database!!

46

47
Overview: Data warehouses and OLAP
systems

• Data warehouses and online analytical


processing (OLAP) systems
– Extract and analyze useful business information from
very large databases
– Support decision making

48

Overview: Real-time and active DB tech.

• Real-time and active database technology


– Control industrial and manufacturing processes
– Example:
• An air-traffic control system constantly monitors hundreds
of aircraft and makes decisions about incoming flight paths
and determines the order in which aircraft should land
based on data such as fuel, altitude, and speed. If any of this
information is late, the result could be devastating.
• A stock market changes very rapidly and is dynamic.

49
Introduction: DBMS

• Database management system (DBMS)


– A set of programs
– Enables users to create and maintain a database
– An environment that is both convenient and efficient
to use
– Facilitates the processes of
• Defining,
• Constructing,
• Manipulating, and
• Sharing.

50

Top Enterprise Relational DBMS

51
Introduction: DBMS (cont'd.)

• Defining a database
– Specify the data types, structures, and constraints
of the data to be stored
• Meta-data
– Database definition or descriptive information
– Stored by the DBMS in the form of a database
catalog or dictionary
• Manipulating a database
– Query and update the database miniworld
– Generate reports
52

Introduction: DBMS (cont'd.)

• Sharing a database
– Allow multiple users and programs to access the
database simultaneously
• Application program
– Accesses database by sending queries to DBMS
• Query
– Causes some data to be retrieved

53
Introduction: DBMS (cont'd.)

• Transaction
– May cause some data to be read and some data to
be written into the database
• Protection includes:
– System protection (against HW & SW malfunction)
– Security protection
• Maintain the database system
– Allow the system to evolve as requirements change
over time

54

55
Thank you.
Exit Slip:
Discuss 3 important things / concepts
You have learned today.

56

You might also like