Semantic Data Models - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

Semantic Data Models

Description:

Su, Semantic Association Model. Shipman, Functional Data Model. We will ... 'What are the names of all students taking EE courses from assistant professors? ... – PowerPoint PPT presentation

Number of Views:443
Avg rating:3.0/5.0
Slides: 19
Provided by: davidala3
Category:

less

Transcript and Presenter's Notes

Title: Semantic Data Models


1
Semantic Data Models
  • David Nelson
  • October 2001

2
Contents
  • Introduction to Semantic Data Models
  • Examples of Semantic Data Models
  • The Functional Data Model
  • Introduction to DAPLEX
  • Data Definition
  • Data Manipulation
  • Derived Data
  • System Considerations
  • Further Reading

3
Introduction
  • Relational Model has certain failings due to
    limited modelling capabilities
  • Many models appeared which attempted to
    represent the real world more closely
  • These are known as semantic data models
  • Can be seen as the basis of object data models
    which we discuss in the following sessions

4
Semantic Data Models
  • First semantic model was the E-R model by Chen
    in 1976
  • However, this is not a true data model
  • Why not?
  • Data model structure rules manipulation
  • Now a widely accepted modelling tool for
    relational database design
  • But not a data model

5
Semantic Data Models
  • In 1979, Codd devised RM/T
  • an extended version of the relational model
  • varying types of relations (one-to-many and
    subtyping)
  • Other semantic data models
  • Kuper and Vardi, Logical Data Model
  • Hammer and McLeod, Semantic Data Model
  • Su, Semantic Association Model
  • Shipman, Functional Data Model
  • We will look at Shipmans model

6
The Functional Data Model
  • Devised by Shipman in 1981
  • Defined functional data model with manipulation
    language DAPLEX
  • No original implementation, but used in research
    projects
  • ADAPLEX language based on ADA
  • EFDM by Atkinson et. al. in Glasgow
  • P/FDM by Gray, et. al. in Aberdeen
  • Iris Object-Oriented Database

7
Introduction to DAPLEX
  • DAPLEX is a database language which
    incorporates1
  • A formulation of data in terms of entities
  • A functional representation for both actual and
    virtual (derived) data relationships
  • A rich collection of language constructs for
    expressing entity selection criteria
  • A notion of subtype/supertype relationships among
    entity types

8
Quote!
  • The DAPLEX language is an attempt to provide a
    database system interface which allows the user
    to more directly model the way he thinks about
    the problems he is trying to solve.

9
DAPLEX
  • A data definition and manipulation language for
    database systems based on the functional data
    model
  • Conceptually natural database interface language
  • Basic constructs
  • entity and function
  • Derived functions
  • Separate user views of the database

10
University Database
  • declare student -gtgt entity
  • declare name(student) -gt string
  • declare dept(student) -gt department
  • declare course(student) -gt course
  • key_of student is name
  • declare course -gtgt entity
  • declare name(course) -gt string
  • declare modules(course) -gtgt modules
  • key_of course is name

11
Data Definition DECLARE statement
  • Single Valued Functions
  • declare name(student) -gt string
  • declare dept(student) -gt department
  • These functions return a singleton set
  • Multi Valued Functions
  • declare student -gtgt entity
  • declare course(student) -gtgt course
  • Multi Argument Functions
  • declare grade(student, course) -gt integer

12
DECLARE Statement
  • Function Inversion
  • define course(instructor) -gt inverse of
    instructor(course)
  • Inverse functions are automatically defined in
    P/FDM
  • e.g. course_inv(instructor)
  • Subtypes and supertypes
  • declare person -gt entity
  • declare student -gt person

13
Data Manipulation
  • What are the names of all students taking EE
    courses from assistant professors?
  • for each s in student
  • such that some c in course(s) has
  • name(dept(c))EE and
  • rank(instructor(c)) ASSISTANT PROFESSOR"
  • print(name(s))

14
Data Manipulation
  • Aggregate operators include
  • average, total, count, maximum, minimum
  • Updating
  • normally performed in P/FDM using a load utility
  • Original definition of DAPLEX provided an update
    facility which allowed updating of both single
    and multi-valued functions

15
Derived Data DEFINE statement
  • Defining new properties of objects based on the
    values of other properties
  • e.g. define instructor(s in student) gt
  • instructor(course(s))
  • Can be used as primitive functions
  • Similar to the concept of view
  • Special operations
  • inverse of, transitive of, intersection of, union
    of, difference of, compound of
  • E.g. define enrolment() -gtgt compound of student,
    course(student)

16
Object Data Models
  • Object models are attempts to provide models
    which more closely model the real world
  • Developed to address the increasing complexity of
    database applications
  • DAPLEX could be seen as a query language for
    object databases
  • Object-oriented database system Iris uses form of
    DAPLEX as query language

17
Using P/FDM
  • P/FDM is the version of DAPLEX we use in the
    university, based on Prolog
  • You will be given a tutorial sheet showing how to
    use it
  • To load a database, e.g. university database
  • daplex(unidb.sch)
  • pfdm_load(unidb.loa)
  • daplex(unidb.d)
  • Then daplex. enters the Daplex interpreter.

18
Further Reading
  • Shipman, The Functional Data Model and the Data
    Language Daplex. ACM TODS, volume 6, no. 1,
    1981.
  • Gray, Kulkarni, Paton, Object-Oriented Databases,
    1992
Write a Comment
User Comments (0)
About PowerShow.com