SlideShare a Scribd company logo
1 of 26
Download to read offline
Generalised fuzzy types and                                  Contents
                                                             Motivation


         querying.                                           Context
                                                             Proposal
                                                             Example

Implementation within the                                    Comparison
                                                             Conclusions and . . .

  Hibernate Framework.                                              Home Page


                                                                     Title Page
        Jos´ Enrique Pons
           e                    Olga Pons Capote
                  Ignacio Blanco Medina
 Department of Computer Science and Artificial Intelligence
               University of Granada, Spain
             {jpons,opc,iblanco}@decsai.ugr.es                      Page 1 of 26

                     October 27, 2011                                  Go Back


                                                                     Full Screen


                                                                        Close


                                                                        Quit
Contents
                                        Motivation

1.     Contents                         Context
                                        Proposal
                                        Example
The structure of the presentation is:   Comparison
                                        Conclusions and . . .
 • Motivation.                                 Home Page


 • Context:                                     Title Page



     – Fuzzy relational databases.
     – Hibernate Framework.
                                               Page 2 of 26
 • Proposal.
                                                  Go Back
 • Comparison.
                                                Full Screen

 • Conclusions and future work.                    Close


                                                   Quit
Contents
                                                       Motivation
                                                       Context

2.    Motivation                                       Proposal
                                                       Example
                                                       Comparison

 • A true standard for fuzzy databases does not ex-    Conclusions and . . .

                                                              Home Page
   ist.
                                                               Title Page
 • Relational databases are usually the base for the
   implementation of fuzzy databases.
 • General model to represent and querying fuzzy
                                                              Page 3 of 26
   types in any relational database.
                                                                 Go Back
 • Implementation within the Hibernate Frame-
                                                               Full Screen
   work.
                                                                  Close


                                                                  Quit
Contents
                                             Motivation
                                             Context
                                             Proposal
                                             Example
3.     Context                               Comparison
                                             Conclusions and . . .


 • 3.1 Fuzzy relational databases (FBD):            Home Page


                                                     Title Page
     – Representation: fuzzy data types.
     – Querying: flexible querying.
 • 3.2 Hibernate Framework:
                                                    Page 4 of 26

     – Architecture.                                   Go Back

     – Querying in the Hibernate Framework           Full Screen


                                                        Close


                                                        Quit
Contents

3.1.   Fuzzy relational databases                  Motivation
                                                   Context
                                                   Proposal
Two main features:                                 Example
                                                   Comparison
 • Fuzzy representation                            Conclusions and . . .

   ”The restaurant X in the database is cheap in          Home Page

   average.”                                               Title Page

   ”The restaurant X in the database is a ham-
   burguer restaurant.”
 • Flexible querying:                                     Page 5 of 26
   ”The user wants to obtain a list with cheap
   restaurants.”                                             Go Back


                                                           Full Screen


                                                              Close


                                                              Quit
3.1.1.            Fuzzy data types
Two main types:
                                                                     Contents
 • Ordered underlying domain:                                        Motivation
   possibility
                                                                     Context
                 Cheap             Middle-price         Expensive
            1                                                        Proposal
                                                                     Example
                                                                     Comparison
                                                                     Conclusions and . . .

                                                                            Home Page
                                                             Price
            0
                         16   18              24   26
                                                                             Title Page
   This data type may be represented as a trapezoid
   in the form: [α, β, γ, δ].
   E.g. Middle-price = [16, 18, 24, 26]
                                                                            Page 6 of 26
 • Non-ordered underlying domain:
              Fast food Hamburger Chinese                                      Go Back


    Fast food     1        0.8      0.6                                      Full Screen

   Hamburger     0.8        1       0.2                                         Close

     Chinese     0.6       0.2       1                                          Quit
3.1.2.   Flexible Querying
The user may query with vagueness in the database:                              Contents

”The user want to obtain a list of cheap restau-                                Motivation
                                                                                Context
rants.”                                                                         Proposal
                                                                                Example

ID    Name                                   AVG      Quality                   Comparison
                                                                                Conclusions and . . .
001   Amadeus                            [15,10,20,5]   5                              Home Page

002   Atlantis                            [11,5,17,6]   3                               Title Page
003   Cafe Theatre                      [20,10,30,10]   2
004   De Graslei                         [23,18,28,5]   5
005   Pakhuis                            [13,11,15,2]   3
006   De 3 Biggetjes                    [45,25,65,20]   4                              Page 7 of 26
             possibility
                           Cheap              Middle-price         Expensive
                      1
                                                                                          Go Back


                                                                                        Full Screen


                                                                        Price              Close
                      0
                                   16    18              24   26

                                                                                           Quit
Contents
                                            Motivation
                                            Context
                                            Proposal
                                            Example

The selected restaurants are:               Comparison
                                            Conclusions and . . .

                                                   Home Page
       ID    Name        AVG      Quality
       001   Amadeus [15,10,20,5]   5               Title Page


       002   Atlantis [11,5,17,6]   3
       005   Pakhuis [13,11,15,2]   3
                                                   Page 8 of 26


                                                      Go Back


                                                    Full Screen


                                                       Close


                                                       Quit
Operators for fuzzy querying:
                                                          Contents
   Possibility Necessity Possibly / Necessarily           Motivation

     FEQ        NFEQ            Fuzzy =                   Context
                                                          Proposal
     FGT        NFGT            Fuzzy >                   Example

    FGEQ       NFGEQ            Fuzzy ≥                   Comparison
                                                          Conclusions and . . .
     FLT        NFLT            Fuzzy.<                          Home Page
    FLEQ       NFLEQ            Fuzzy ≤
                                                                  Title Page
     MGT        NMGT            Much >
     MLT        NMLT            Much <
      F EQ(p1, p2) = sup min(πp1(d), πp2(d))       (1)
                        d∈U                                      Page 9 of 26


Where U is the underlying domain, p1, p2 are two                    Go Back

values of a given fuzzy type (e.g. fuzzy type 2) and              Full Screen

πp1(d), πp2(d) are the associated possibility distribu-              Close
tions.
                                                                     Quit
Contents
                                            Motivation
                                            Context
Context                                     Proposal
                                            Example
 • 3.1 Fuzzy relational databases (FBD):    Comparison
                                            Conclusions and . . .

    – Representation: fuzzy data types.            Home Page


    – Querying: flexible querying.                   Title Page


 • 3.2 Hibernate Framework:
    – Architecture.
    – Querying in the Hibernate Framework         Page 10 of 26


                                                      Go Back


                                                    Full Screen


                                                       Close


                                                       Quit
Contents
                                                  Motivation
                                                  Context

3.2.   Hibernate Framework                        Proposal
                                                  Example

The Hibernate Framework is a collection of open   Comparison
                                                  Conclusions and . . .
source projects that enable developers to make           Home Page

object-relational mapping. Features:                      Title Page

 • Database independent by means of dialects.
 • HQL: an object-oriented query language.
 • Open source.                                         Page 11 of 26


                                                            Go Back


                                                          Full Screen


                                                             Close


                                                             Quit
3.2.1.   Architecture                                 Contents
                                                      Motivation
An application working with Hibernate has 3 layers:   Context
                                                      Proposal

 1. Application layer: CRUD (CReate,Update            Example
                                                      Comparison
    and Delete) operations:                           Conclusions and . . .


  (a) Persistent Objects: A current database state.          Home Page



  (b) Transient Objects: These objects do not rep-            Title Page


      resent a current database state.
 2. Hibernate layer: An abstraction layer be-
    tween the DBMS and the application.                     Page 12 of 26



 3. The database: The running DBMS: MySQL,                      Go Back


    PostgreSQL, Oracle...etc.                                 Full Screen


                                                                 Close


                                                                 Quit
Contents

Hibernate Architecture:                 Motivation
                                        Context
                                        Proposal
                                        Example
                    Application
                                        Comparison
                                        Conclusions and . . .
                Persistent Objects
                                               Home Page
                   HIBERNATE
                                                Title Page

            hibernate.
                          XML mapping
            properties

                                              Page 13 of 26

                    Database
                                                  Go Back


                                                Full Screen


                                                   Close


                                                   Quit
3.2.2.   Querying in Hibernate
 1. Query by criteria:                          Contents
    createCriteria(Person.class).               Motivation

    Add(Restrictions.eq(”login”,”lmmn”));       Context
                                                Proposal
                                                Example
                                                Comparison

 2. Query by example:                           Conclusions and . . .

    Person p.login = ”lmmn”;                           Home Page


                                                        Title Page


 3. HQL:
    Select p from Person p where p.login =
    ”lmmn”;                                           Page 14 of 26


                                                          Go Back

 4. SQL:                                                Full Screen

    Select * from Person as p where p.login =              Close
    ’lmmn’;
                                                           Quit
Contents
                                                 Motivation
                                                 Context
                                                 Proposal
                                                 Example
                                                 Comparison


4.     Proposal                                  Conclusions and . . .

                                                        Home Page



 • Architecture for the general framework for:           Title Page



     – Fuzzy representation.
     – Fuzzy querying.
                                                       Page 15 of 26

 • Implementation within the Hibernate frame-
                                                           Go Back
   work.
                                                         Full Screen


                                                            Close


                                                            Quit
Contents
                                                        Motivation
                                                        Context

4.1.   Fuzzy Representation                             Proposal
                                                        Example

Conditions for portability:                             Comparison
                                                        Conclusions and . . .

 1. The SQL standard is the interface.                         Home Page


                                                                Title Page
 2. The fuzzy types are represented in the database
    by basic SQL types.
 3. The meta-data for managing properly the ex-
    tended types relies outside the database catalog.         Page 16 of 26


                                                                  Go Back


                                                                Full Screen


                                                                   Close


                                                                   Quit
4.1.1.        Architecture for the general model
                                                                   Contents
The architecture for a generalized object-oriented                 Motivation

model needs the following elements:                                Context
                                                                   Proposal
                                                                   Example
                                 Object-Oriented Layer.            Comparison
         O1              ON      (OORL)                            Conclusions and . . .

                                                                          Home Page
                                  Object-Oriented to Relational.
                                  (OO2RL).                                 Title Page



         R1              RN        Relational Layer.
                                   (RRL)

                                                                         Page 17 of 26
                                   Conversion Layer. (CL)
                                                                             Go Back


                                                                           Full Screen
  MySQL         PostgreSQL    Oracle
                                                                              Close


                                                                              Quit
4.1.2.      Implementation                                                        Contents
                                                                                  Motivation
The model has the following layers:                                               Context
                                                                                  Proposal
                                                                                  Example
                         Application                                              Comparison
                                                                                  Conclusions and . . .
 Fuzzy Data Types      Fuzzy Domains            Fuzzy        Representation              Home Page
                                                Constraint
              Values Labels          Constraint
                                                Validator
                                                             Layer (OORL)     F
                                                                              S           Title Page
  Fuzzy Data            Fuzzy Domain                                          Q
  Types Adaptor         Adaptor                              Adaptation       L
                                                             Layer (OO2RRL)
 Type 2   Type 3                                             & (RRL)

                    Hibernate Core                                                      Page 18 of 26

                                                             Conversion
                                                                                            Go Back
                                                             Layer (CL)
                        Database
                                                                                          Full Screen


                                                                                             Close


                                                                                             Quit
4.2.   Fuzzy Querying
The model uses the following elements:
                                                      Contents

 • Declarative implementation for each fuzzy          Motivation
                                                      Context
   operator. This implementation should be done       Proposal

   in the SQL language.                               Example
                                                      Comparison

 • Abstract syntax tree (AST) representa-             Conclusions and . . .

                                                             Home Page
   tion for the query. These representation allows
   a customization process done by the conversion             Title Page


   layer (CL).
 • Conversion Layer: This layer customizes the
   AST for the running database.                            Page 19 of 26


The implementation of the fuzzy querying is done by             Go Back


modifying the HQL language. The fuzzy operators               Full Screen

are implemented in a declarative way in the SQL                  Close

language.                                                        Quit
Query translation:
                                                                Contents
                     Select
                                                                Motivation
                 r
                              from
                                                                Context
                                                                Proposal

                     Restaurant        where                    Example
                                                                Comparison
                                           FEQ
                                                                Conclusions and . . .

                                  r.priceAvg     [15,10,20,5]
                                                                       Home Page


                                                                        Title Page
 • The framework builds an abstract syntax tree
   (AST) once the query passed lexical and syntac-
   tical analysis.
 • The AST represents tokens as nodes. The se-                        Page 20 of 26


   mantic analyzer renders the tree in the into SQL                       Go Back

   sentences. Then the dialect customizes the SQL                       Full Screen

   sentence.                                                               Close


                                                                           Quit
Example:
The user wants restaurants that have an average
price around 15 euro:                                              Contents
                                                                   Motivation
                                                                   Context
SELECT r FROM Restaurant r WHERE                                   Proposal
                                                                   Example
r.PriceAvg FEQ [15, 10, 20, 5];                                    Comparison
                                                                   Conclusions and . . .

The FEQ node is rendered to its implementation in                         Home Page


SQL:                                                                       Title Page




SELECT * FROM Restaurant as r WHERE

1 < CASE WHEN (r.priceAvg.gamma <= beta2)
                                                                         Page 21 of 26
OR (r.priceAvg.beta >= gamma2) THEN 0

WHEN (r.priceAvg.alpha = alpha2) THEN 1                                      Go Back


WHEN (r.priceAvg.gamma > beta2) AND (r.priceAvg.alpha < alpha2)            Full Screen

THEN (r.priceAvg.gamma - beta2) / ( r.priceAvg.delta - delta2 )
                                                                              Close
ELSE (gamma2 - r.priceAvg.beta) / ( r.priceAvg.delta + delta2 );
                                                                              Quit
Contents

5.     Comparison                                                  Motivation
                                                                   Context
                                                                   Proposal

Portability among the proposals:                                   Example
                                                                   Comparison
                                                                   Conclusions and . . .
 • FSQL server: The reference implementation of the FIRST inter-          Home Page
   face on the GEFRED model. The first implementation works with
   Oracle database, although there is an implementation in Post-           Title Page

   greSQL.
 • SQLfi: The implementation for the SQLf language.
 • FDBLL: Fuzzy database language and library . A fuzzy SQL
                                                                         Page 22 of 26
   implementation in C language over a relational DBMS.
                                                                             Go Back
 • PSQL: An extension of the FSQL model. The main features are
   the use of priority fuzzy logic and the portability.                    Full Screen

 • Hibernate FSQL: The proposed implementation.                               Close


                                                                              Quit
Comparison table:
 Fuzzy DB    Catalog        Interface        Query language     Query Processor
 FSQL        Inside DB.     FSQL client      FSQL               Procedural.
                                                                                    Contents
 SQLfi        Inside DB.     Client app.      SQLf               Procedural.
 FDBLL       Inside DB.     Client app.      Fuzzy SQL          Procedural.         Motivation

 PFSQL       Inside DB.     JDBC client      PFSQL              Procedural.         Context

 H. FSQL     Outside DB.    Entity Classes   Fuzzy HQL          Declarative.        Proposal
                                                                                    Example
The main differences are:
                                                                                    Comparison
   • The meta data for the fuzzy types are not stored in the database, therefore,   Conclusions and . . .
     to change the running database is as easy as changing some parameters in              Home Page
     the Hibernate configuration file.
                                                                                            Title Page
   • There is no need to create or modify fuzzy meta tables in the DBMS catalog.




                                                                                          Page 23 of 26


                                                                                              Go Back


                                                                                            Full Screen


                                                                                               Close


                                                                                               Quit
Contents
                                                     Motivation
                                                     Context

6.    Conclusions and Future                         Proposal
                                                     Example


      Work                                           Comparison
                                                     Conclusions and . . .

                                                            Home Page

 • We introduced a general model for the represen-           Title Page
   tation of (fuzzy) types and for fuzzy querying.
 • The implementation within Hibernate is based
   on the portability.
                                                           Page 24 of 26

 • The drawback for the portability is the depen-              Go Back
   dency between the application and the frame-
                                                             Full Screen
   work.
                                                                Close


                                                                Quit
Contents
                                                      Motivation

Future work:                                          Context
                                                      Proposal

 • Fuzzy querying:    bipolar specification in the     Example
                                                      Comparison
   queries                                            Conclusions and . . .


 • Practical applications with the proposed frame-           Home Page


   work.                                                      Title Page



 • Fuzzy temporal representation: representation
   for Fuzzy Validity Periods and implementation
   of temporal comparisons within the Allen’s rela-         Page 25 of 26

   tions.                                                       Go Back


                                                              Full Screen


                                                                 Close


                                                                 Quit
Contents
                               Motivation
                               Context
                               Proposal

Thank you!                     Example
                               Comparison
                               Conclusions and . . .

Questions?                            Home Page


                                       Title Page


Contact:
jpons@decsai.ugr.es
http://decsai.ugr.es/˜ jpons
                                     Page 26 of 26


                                         Go Back


                                       Full Screen


                                          Close


                                          Quit

More Related Content

Recently uploaded

Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....rightmanforbloodline
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxMarkSteadman7
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformWSO2
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...caitlingebhard1
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 

Recently uploaded (20)

Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Generalised fuzzy types and querying.Implementation within the Hibernate Framework

  • 1. Generalised fuzzy types and Contents Motivation querying. Context Proposal Example Implementation within the Comparison Conclusions and . . . Hibernate Framework. Home Page Title Page Jos´ Enrique Pons e Olga Pons Capote Ignacio Blanco Medina Department of Computer Science and Artificial Intelligence University of Granada, Spain {jpons,opc,iblanco}@decsai.ugr.es Page 1 of 26 October 27, 2011 Go Back Full Screen Close Quit
  • 2. Contents Motivation 1. Contents Context Proposal Example The structure of the presentation is: Comparison Conclusions and . . . • Motivation. Home Page • Context: Title Page – Fuzzy relational databases. – Hibernate Framework. Page 2 of 26 • Proposal. Go Back • Comparison. Full Screen • Conclusions and future work. Close Quit
  • 3. Contents Motivation Context 2. Motivation Proposal Example Comparison • A true standard for fuzzy databases does not ex- Conclusions and . . . Home Page ist. Title Page • Relational databases are usually the base for the implementation of fuzzy databases. • General model to represent and querying fuzzy Page 3 of 26 types in any relational database. Go Back • Implementation within the Hibernate Frame- Full Screen work. Close Quit
  • 4. Contents Motivation Context Proposal Example 3. Context Comparison Conclusions and . . . • 3.1 Fuzzy relational databases (FBD): Home Page Title Page – Representation: fuzzy data types. – Querying: flexible querying. • 3.2 Hibernate Framework: Page 4 of 26 – Architecture. Go Back – Querying in the Hibernate Framework Full Screen Close Quit
  • 5. Contents 3.1. Fuzzy relational databases Motivation Context Proposal Two main features: Example Comparison • Fuzzy representation Conclusions and . . . ”The restaurant X in the database is cheap in Home Page average.” Title Page ”The restaurant X in the database is a ham- burguer restaurant.” • Flexible querying: Page 5 of 26 ”The user wants to obtain a list with cheap restaurants.” Go Back Full Screen Close Quit
  • 6. 3.1.1. Fuzzy data types Two main types: Contents • Ordered underlying domain: Motivation possibility Context Cheap Middle-price Expensive 1 Proposal Example Comparison Conclusions and . . . Home Page Price 0 16 18 24 26 Title Page This data type may be represented as a trapezoid in the form: [α, β, γ, δ]. E.g. Middle-price = [16, 18, 24, 26] Page 6 of 26 • Non-ordered underlying domain: Fast food Hamburger Chinese Go Back Fast food 1 0.8 0.6 Full Screen Hamburger 0.8 1 0.2 Close Chinese 0.6 0.2 1 Quit
  • 7. 3.1.2. Flexible Querying The user may query with vagueness in the database: Contents ”The user want to obtain a list of cheap restau- Motivation Context rants.” Proposal Example ID Name AVG Quality Comparison Conclusions and . . . 001 Amadeus [15,10,20,5] 5 Home Page 002 Atlantis [11,5,17,6] 3 Title Page 003 Cafe Theatre [20,10,30,10] 2 004 De Graslei [23,18,28,5] 5 005 Pakhuis [13,11,15,2] 3 006 De 3 Biggetjes [45,25,65,20] 4 Page 7 of 26 possibility Cheap Middle-price Expensive 1 Go Back Full Screen Price Close 0 16 18 24 26 Quit
  • 8. Contents Motivation Context Proposal Example The selected restaurants are: Comparison Conclusions and . . . Home Page ID Name AVG Quality 001 Amadeus [15,10,20,5] 5 Title Page 002 Atlantis [11,5,17,6] 3 005 Pakhuis [13,11,15,2] 3 Page 8 of 26 Go Back Full Screen Close Quit
  • 9. Operators for fuzzy querying: Contents Possibility Necessity Possibly / Necessarily Motivation FEQ NFEQ Fuzzy = Context Proposal FGT NFGT Fuzzy > Example FGEQ NFGEQ Fuzzy ≥ Comparison Conclusions and . . . FLT NFLT Fuzzy.< Home Page FLEQ NFLEQ Fuzzy ≤ Title Page MGT NMGT Much > MLT NMLT Much < F EQ(p1, p2) = sup min(πp1(d), πp2(d)) (1) d∈U Page 9 of 26 Where U is the underlying domain, p1, p2 are two Go Back values of a given fuzzy type (e.g. fuzzy type 2) and Full Screen πp1(d), πp2(d) are the associated possibility distribu- Close tions. Quit
  • 10. Contents Motivation Context Context Proposal Example • 3.1 Fuzzy relational databases (FBD): Comparison Conclusions and . . . – Representation: fuzzy data types. Home Page – Querying: flexible querying. Title Page • 3.2 Hibernate Framework: – Architecture. – Querying in the Hibernate Framework Page 10 of 26 Go Back Full Screen Close Quit
  • 11. Contents Motivation Context 3.2. Hibernate Framework Proposal Example The Hibernate Framework is a collection of open Comparison Conclusions and . . . source projects that enable developers to make Home Page object-relational mapping. Features: Title Page • Database independent by means of dialects. • HQL: an object-oriented query language. • Open source. Page 11 of 26 Go Back Full Screen Close Quit
  • 12. 3.2.1. Architecture Contents Motivation An application working with Hibernate has 3 layers: Context Proposal 1. Application layer: CRUD (CReate,Update Example Comparison and Delete) operations: Conclusions and . . . (a) Persistent Objects: A current database state. Home Page (b) Transient Objects: These objects do not rep- Title Page resent a current database state. 2. Hibernate layer: An abstraction layer be- tween the DBMS and the application. Page 12 of 26 3. The database: The running DBMS: MySQL, Go Back PostgreSQL, Oracle...etc. Full Screen Close Quit
  • 13. Contents Hibernate Architecture: Motivation Context Proposal Example Application Comparison Conclusions and . . . Persistent Objects Home Page HIBERNATE Title Page hibernate. XML mapping properties Page 13 of 26 Database Go Back Full Screen Close Quit
  • 14. 3.2.2. Querying in Hibernate 1. Query by criteria: Contents createCriteria(Person.class). Motivation Add(Restrictions.eq(”login”,”lmmn”)); Context Proposal Example Comparison 2. Query by example: Conclusions and . . . Person p.login = ”lmmn”; Home Page Title Page 3. HQL: Select p from Person p where p.login = ”lmmn”; Page 14 of 26 Go Back 4. SQL: Full Screen Select * from Person as p where p.login = Close ’lmmn’; Quit
  • 15. Contents Motivation Context Proposal Example Comparison 4. Proposal Conclusions and . . . Home Page • Architecture for the general framework for: Title Page – Fuzzy representation. – Fuzzy querying. Page 15 of 26 • Implementation within the Hibernate frame- Go Back work. Full Screen Close Quit
  • 16. Contents Motivation Context 4.1. Fuzzy Representation Proposal Example Conditions for portability: Comparison Conclusions and . . . 1. The SQL standard is the interface. Home Page Title Page 2. The fuzzy types are represented in the database by basic SQL types. 3. The meta-data for managing properly the ex- tended types relies outside the database catalog. Page 16 of 26 Go Back Full Screen Close Quit
  • 17. 4.1.1. Architecture for the general model Contents The architecture for a generalized object-oriented Motivation model needs the following elements: Context Proposal Example Object-Oriented Layer. Comparison O1 ON (OORL) Conclusions and . . . Home Page Object-Oriented to Relational. (OO2RL). Title Page R1 RN Relational Layer. (RRL) Page 17 of 26 Conversion Layer. (CL) Go Back Full Screen MySQL PostgreSQL Oracle Close Quit
  • 18. 4.1.2. Implementation Contents Motivation The model has the following layers: Context Proposal Example Application Comparison Conclusions and . . . Fuzzy Data Types Fuzzy Domains Fuzzy Representation Home Page Constraint Values Labels Constraint Validator Layer (OORL) F S Title Page Fuzzy Data Fuzzy Domain Q Types Adaptor Adaptor Adaptation L Layer (OO2RRL) Type 2 Type 3 & (RRL) Hibernate Core Page 18 of 26 Conversion Go Back Layer (CL) Database Full Screen Close Quit
  • 19. 4.2. Fuzzy Querying The model uses the following elements: Contents • Declarative implementation for each fuzzy Motivation Context operator. This implementation should be done Proposal in the SQL language. Example Comparison • Abstract syntax tree (AST) representa- Conclusions and . . . Home Page tion for the query. These representation allows a customization process done by the conversion Title Page layer (CL). • Conversion Layer: This layer customizes the AST for the running database. Page 19 of 26 The implementation of the fuzzy querying is done by Go Back modifying the HQL language. The fuzzy operators Full Screen are implemented in a declarative way in the SQL Close language. Quit
  • 20. Query translation: Contents Select Motivation r from Context Proposal Restaurant where Example Comparison FEQ Conclusions and . . . r.priceAvg [15,10,20,5] Home Page Title Page • The framework builds an abstract syntax tree (AST) once the query passed lexical and syntac- tical analysis. • The AST represents tokens as nodes. The se- Page 20 of 26 mantic analyzer renders the tree in the into SQL Go Back sentences. Then the dialect customizes the SQL Full Screen sentence. Close Quit
  • 21. Example: The user wants restaurants that have an average price around 15 euro: Contents Motivation Context SELECT r FROM Restaurant r WHERE Proposal Example r.PriceAvg FEQ [15, 10, 20, 5]; Comparison Conclusions and . . . The FEQ node is rendered to its implementation in Home Page SQL: Title Page SELECT * FROM Restaurant as r WHERE 1 < CASE WHEN (r.priceAvg.gamma <= beta2) Page 21 of 26 OR (r.priceAvg.beta >= gamma2) THEN 0 WHEN (r.priceAvg.alpha = alpha2) THEN 1 Go Back WHEN (r.priceAvg.gamma > beta2) AND (r.priceAvg.alpha < alpha2) Full Screen THEN (r.priceAvg.gamma - beta2) / ( r.priceAvg.delta - delta2 ) Close ELSE (gamma2 - r.priceAvg.beta) / ( r.priceAvg.delta + delta2 ); Quit
  • 22. Contents 5. Comparison Motivation Context Proposal Portability among the proposals: Example Comparison Conclusions and . . . • FSQL server: The reference implementation of the FIRST inter- Home Page face on the GEFRED model. The first implementation works with Oracle database, although there is an implementation in Post- Title Page greSQL. • SQLfi: The implementation for the SQLf language. • FDBLL: Fuzzy database language and library . A fuzzy SQL Page 22 of 26 implementation in C language over a relational DBMS. Go Back • PSQL: An extension of the FSQL model. The main features are the use of priority fuzzy logic and the portability. Full Screen • Hibernate FSQL: The proposed implementation. Close Quit
  • 23. Comparison table: Fuzzy DB Catalog Interface Query language Query Processor FSQL Inside DB. FSQL client FSQL Procedural. Contents SQLfi Inside DB. Client app. SQLf Procedural. FDBLL Inside DB. Client app. Fuzzy SQL Procedural. Motivation PFSQL Inside DB. JDBC client PFSQL Procedural. Context H. FSQL Outside DB. Entity Classes Fuzzy HQL Declarative. Proposal Example The main differences are: Comparison • The meta data for the fuzzy types are not stored in the database, therefore, Conclusions and . . . to change the running database is as easy as changing some parameters in Home Page the Hibernate configuration file. Title Page • There is no need to create or modify fuzzy meta tables in the DBMS catalog. Page 23 of 26 Go Back Full Screen Close Quit
  • 24. Contents Motivation Context 6. Conclusions and Future Proposal Example Work Comparison Conclusions and . . . Home Page • We introduced a general model for the represen- Title Page tation of (fuzzy) types and for fuzzy querying. • The implementation within Hibernate is based on the portability. Page 24 of 26 • The drawback for the portability is the depen- Go Back dency between the application and the frame- Full Screen work. Close Quit
  • 25. Contents Motivation Future work: Context Proposal • Fuzzy querying: bipolar specification in the Example Comparison queries Conclusions and . . . • Practical applications with the proposed frame- Home Page work. Title Page • Fuzzy temporal representation: representation for Fuzzy Validity Periods and implementation of temporal comparisons within the Allen’s rela- Page 25 of 26 tions. Go Back Full Screen Close Quit
  • 26. Contents Motivation Context Proposal Thank you! Example Comparison Conclusions and . . . Questions? Home Page Title Page Contact: jpons@decsai.ugr.es http://decsai.ugr.es/˜ jpons Page 26 of 26 Go Back Full Screen Close Quit