Lec3 Advanced Data Model
Lec3 Advanced Data Model
Advanced Data
Models
Introduction
Data Model Integrated collection of concepts for describing
data, relationships between data, and constraints on the
data in an organization.
Data Model comprises:
◦ a structural part;
◦ a manipulative part;
2
Advanced Data Models
DeductiveData Model
Graph Data Model
Document Model
Key-Value and Wide Column Models
3
DEDUCTIVE DATA MODEL
Deductive Data Model
The deductive data model fundamentally
involves the application of formal logic to the
problems of data definition, data manipulation
and data integrity.
Logic can act as a formal basis for expressing in
one uniform manner these three aspects of a
data model.
Logic also provides the capacity to extend the
idea of conventional database with deductive
facilities.
Most of the work on deductive databases has
been done using variants of standard Prolog
known collectively as Datalog.
Datalog is fundamentally a variant of Prolog
specifically designed for databases work. 5
PROPOSITIONS AND RELATIONS
The fundamental data elements in the deductive data
model are propositions.
Propositions may combine to form data structures
called relations.
Example
9
?What is a Graph
• Formally, a graph is just a collection of vertices
and edges—or, in less intimidating(دا. )تعقيlanguage, a
set of nodes and the relationships that connect
them.
• Graphs represent entities as nodes and the ways in
which those entities relate to the world as relationships.
• This general-purpose, expressive structure allows us to
model all kinds of scenarios, from the construction of a
space rocket(.واريخ.)ص, to a system of roads, and from
the supply-chain or provenance(ادر......)مص of
foodstuff(ة.......)األغذي, to medical history for
populations()المجتمعات السكانية, and beyond.
10
Example of Graph
For example, Twitter’s data is easily represented as a graph.
We see a small network of followers. The relationships are
key here in establishing the semantic context: namely, that
Billy follows Harry, and that Harry, in turn, follows Billy. Ruth
and Harry likewise follow each other, but sadly, although
Ruth follows Billy, Billy hasn’t (yet) reciprocated.
Publishing messages
12
Graph Database Model
A graph database management system (a
graph database) is an online database
management system with Create, Read,
Update, and Delete (CRUD) methods that
expose( )عرضa graph data model.
Graph databases are generally built for use with
transactional(OLTP) systems.
Accordingly, they are normally optimized for
transactional performance, and engineered with
transactional integrity and operational availability in
mind.
13
Motivations of Graph
Databases
The necessity to represent, store and
manipulate complex data make RDBMS
somewhat obsolete
◦ Multi-valued attributes
◦ Complex attributes
◦ Complex combination of the previous two
Accommodate( )استيعابChanges
◦ Appears when acquiring data from autonomous
dynamic sources or Web (eg: genexp &
restaurants).
◦ RDBMS may require schema renormalization.
Unified representation for Data
◦ Knowledge (Schemas are a subset of this)
◦ Queries (More generally: Goals) [results + def]
◦ Models (Concepts are a particular example)
14
Data Representation in Graph
Sailors(()البحارةsid:integer,
sname:char(10),
rating()تصنيفه: integer, age:real)
Boats(()قواربbid:integer, bname:char(10),
color:char(10))
Reserve(()حجزsid:integer, bid:integer, day:date)
15
Document Model
16
Document Model
Whereas relational databases store data in rows and columns,
document databases store data in documents.
These documents typically use a structure that is like
19
Key-Value and Wide Column Models