l2: structured queries (english)

48
i-views University Part 02: Structured queries

Upload: medialeg-gmbh

Post on 14-Apr-2017

65 views

Category:

Data & Analytics


1 download

TRANSCRIPT

Page 1: L2: Structured queries (english)

i-viewsUniversityPart02:Structuredqueries

Page 2: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

PatrickCloshen

Software-Engineer

intelligentviews gmbh

Page 3: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

Ifyouhaveproblemswiththesound:- Checktheaudiosettingsinmenuitem „Communicate“- Joinalternativelytelephoneanddial-innumber

from fixed network (Free-phone-number):• 000-800-100-8171 for India• 0800-894627 for Switzerland

from mobilephone• +41434569564 only for Switzerland

Event-Number:848363956;Event-Password:hello

Page 4: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

Ifyouhaveproblemswiththesound:- Checktheaudiosettingsinmenuitem „Communicate“- Joinalternativelytelephoneanddial-innumber

from fixed network (Free-phone-number):• 000-800-100-8171 for India• 0800-894627 for Switzerland

from mobilephone• +41434569564 only for Switzerland

Event-Number:848363956;Event-Password:hello

Page 5: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

Structuredqueries

1. Use

2. Structure

3. Theconditionsindetail3.1PropertyConditionsandScheme

3.2Identificationofobjects

3.3Typesofinquirystructurestothenetwork

Page 6: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

1UseofStructuredqueries

• Generalinformation• Targetedfindingofsemanticobjectsbasedontheirattributevaluesandtherelationships

betweentheobjects(patternsearch)

• Searchqueriesconsistofasetofconditions

• Utilizationofinheritanceofboththeobjecttypesandcharacteristictypes

Example:InwhichdepartmentdocoworkersworkwhowereborninSouth-West-England?

Page 7: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

1UseofStructuredqueries

• Structuredqueries canbeusedfor• Search

• Rightssystem

• Trigger

• Editorconfigurations

• Viewconfigurations

• Javascriptcalls

• Attributestoatopic

Page 8: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

Project

HeaderNew

nameBold

Controlling

Alternative - object

General

Project

Persons

External persons

Internal persons

Search -object

Note

Task index-tab

Structurequery

Search - object Search

Query

Parametername

Script

Type

Valuation

Lettering

Order

Parametername

ScriptValuation

Type

Lettering

Order

Lettering

ConfigurationnamePanel

Script for lettering

Script for window

Script for windowtitleScript for visibility

Script for tablecon

Sub-configuration

Choose

Structurequery Structurequery

Project

ProjectID

ProjectID (Parameter not

Structurequery

Structurequery

Page 9: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

1. UseofStructuredqueries

Advantages• Creation/understandingofthestructured queryispossiblealsowithoutanyprogramming

knowledge

• Visualfeedbackoncontradictionsformodellingthestructured query

Warning ordynamicschemainformationinthesearch

Edit condition

Albums of English rock groups

Page 10: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

1. UseofStructuredqueries

Advantages• Thestructured queryisadaptedtotheschemachangesoritisnotedonthesideeffects.

Deletionofatermisnotpossible,sinceastructured queryintherightssystemusesthisterm

Delete following objects?

Page 11: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

2BuildingStructuredqueries:Themusicexamples network

Page 12: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

2. BuildingStructuredqueries:

"AlbumsofEnglishrock/bluesrockgroupsfromthe60sand70s"

Page 13: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

2. BuildingStructuredqueries

Withinthestructuredqueries,youcanformulateveryindirectconditions:thestructureofsemanticgraphdatabasescanbetraversedbetweentheelements.Youcanfindartistsorbandsthathavewrittensongsoncertaintopicsandwhosetitlewecannotnamespecifically.

Page 14: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

2. BuildingStructuredqueries

Creatinginyourworkfile

FOLDERStructured queries - Searches

Structured queries - Searches

Page 15: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

2. BuildingStructuredqueries

Specifythesemanticobjecttobesearched

Albums of English rock groups from the 60s and 70s

Page 16: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

2. BuildingStructuredqueries

Addcharacteristicconditionoranotherschematonavigateoverthesemanticnetwork

Albums of English rock groups from the 60s and 70s

Page 17: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

3.1Characteristicconditionsandscheme

3.2Identificationofobjects

3.3Typesofinquirystructuresonthenetwork

3. Theconditionsindetail

Page 18: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

3.1Characteristicconditionsandscheme

• Attributecondition

• Relationscondition

Addacharacteristiccondition

Page 19: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

3.1Characteristicconditionsandscheme

• Attributecondition

• Relationscondition

Addacharacteristiccondition

Albums of English rock groups from the 60s and 70s

Page 20: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

3.1Characteristicconditionsandscheme

Variantsofcharacteristicconditions

• Cardinality incharacteristics• (Characteristic<=/>n=timesavailable)

Cardinality

Page 21: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

3.1Characteristicconditionsandscheme

Variantsofcharacteristicconditions

• repetitions (transitivity)ofrelations• Relativentomtimesinarow

• withintermediateobjectivesintherelationpathandconditionsatintermediateobjectives

Page 22: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

3.1Characteristicconditionsandscheme

Variantsofcharacteristicconditions

• Repetitions (transitivity)ofrelations• Ex.:

peoplewhoareknownthroughacoworkerare"morequalified"acquaintancesthanpeopleknowninothermode

Page 23: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

3.1Characteristicconditionsandscheme

Variantsofcharacteristicconditions

• Repetitions (transitivity)ofrelations

Page 24: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

3.1Characteristicconditionsandscheme

Variantsofcharacteristicconditions

• Forrelationstypeconditions• Hasarelationgoal limitsthepermissibletargetobjectsofthedesired

relations

• Ispropertyof limitsthepermissiblesourceobjectsofthedesiredrelations

Page 25: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

3.1Characteristicconditionsandscheme

• Addatypecondition:Severalalternativetypes(ORlink)

• Objectsorsubtypes• withorwithoutinheritance

Scheme:Multiplesemanticobjects

Album and title

Page 26: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

3.2Identificationofobjects

WithIdentification objectscanbedefinedaccuratelywithdifferentmethods

Secureagainstrenamingandhomonyms

Albums of English rock groups

Page 27: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

3.2Identificationofobjects

• Objectsdefinition allowsarestrictiononobjectswhosenameattributecorrespondstothedesiredvalue.Alsowildcardsareallowed.

Albums of English rock groups

Page 28: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

3.2Identificationofobjects

• Accessparameter

• Fortrigger/right/Viewconfig,inordertobeabletoaccessthecontextobjects

• Possibilitytoincludethecurrentuserinthestructured query

Acessrightparametmer user

Page 29: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

3.2Identificationofobjects

• Script enablestheformulationofaconditionasaresultofpreviouslyformulatedandregisteredscriptsexample:"query.findElements({name:)"Susanne",lastname:"Meier"})"

• SemanticelementwithID narrowsobjects,whoseinternalIDcorrespondstothedesiredvalue

• Infolder allowsrestrictiontoobjectsthatareinapreviouslycreatedandregisteredobjectcollection

Page 30: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

Underrequeststructure...

• Addalternative• Identifier

• Helpsearch

• Reference

• Newlocalmacro

• structured querycomponent(registered)

• Query

3.3Typesofstructuredqueriesonthenetwork

Querystructure

Albums of English rock groups

Page 31: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

3.3Typesofstructuredqueriesonthenetwork

Standardsearch:AlbumswithsongscomposedbyJohnLennonand sungbyPaulMcCartney

Page 32: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

3.3Typesofstructuredqueriesonthenetwork

Standardsearch:AlbumswithsongscomposedbyPaulMcCartneyorJohnLennon

Page 33: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

3.3Typesofstructuredqueriesonthenetwork

Alternativesearch:AlbumswithsongsbyJohnLennonor TheStones

Page 34: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

3.3Typesofstructuredqueriesonthenetwork

Createanalternativecondition

Alternative condition

Page 35: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

3.3Typesofstructuredqueriesonthenetwork

Createanalternativecondition: Addalternative

Alternative condition

Alternatives

Alternatives

Page 36: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

3.3Typesofstructuredqueriesonthenetwork

• Conditionscanbeprovidedwithafreelyselectableidentifier

• Canbeusedasinputandoutputelements,E.g.ViewConfig,facetedsearchandwithinmacrosasmacroargument

• Asearchmodulewithadditionalconditionscanbecontinuedusingtheidentifierfunction.

• Ifseveralconditionsareequippedwiththesameidentifier,theconditionsaddedtotheidentifierwillbealwaysaddedtoallconditionswiththisidentifier

Identifier

Page 37: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

3.3Typesofstructuredqueriesonthenetwork

Identifier

Band

Genreofmusicgroup

Has Member

Page 38: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

3.3Typesofstructuredqueriesonthenetwork

Utilitysearch• Withutilitysearch youcansetupdependentstructured queries• Utilitysearchesmustbelinkedviareferencestothemainsearchforthem

totakeeffect

Page 39: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

3.3Typesofstructuredqueriesonthenetwork

Utilitysearch

Page 40: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

3.3Typesofstructuredqueriesonthenetwork

SwappingconditionsinUtilitysearches• Converttohelpsearch movesatypeofconditionwithallitschild

conditionstothepositionoftherootnodeofanewly-createdhelpsearchandlinkthemtothemainsearchthroughareference

• Useasmainsearch movestheselectedtypeofconditionwithallitschildconditionstothepositionoftherootnodeofthemainsearchandturnsitsparentconditionsintoahelpsearchwhichreferencesthenewmainsearch

Page 41: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

3.3Typesofstructuredqueriesonthenetwork

SwappingconditionsinUtilitysearches

Reference

Page 42: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

3.3Typesofstructuredqueriesonthenetwork

Structered query macro (local)• Localmacroscanbefittedtoastructured queryasasearchcomponentand

reusedseveraltimesinthisquery

• Theycanbetestedindependentlywithoutthecontextoftheirstructuredquery

• Theyareavailableonlyforthisquery,ifthequeryisdeleted,themacroisalsodeleted

Page 43: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

3.3Typesofstructuredqueriesonthenetwork

Structuredquery macro (local)

Page 44: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

3.3Typesofstructuredqueriesonthenetwork

Structuredquery macro (local)

Page 45: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

3.3Typesofstructuredqueriesonthenetwork

Structuredquery macro (registered)• Ifmacrosfordifferentqueriesarepermanentlyavailable,theymustbe

formulatedasaseparatequeryandthenregistered.

FOLDER

Structuralqueries

All hardrock-songs from USA All hardrock-songs..

Page 46: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

Usingparameters

- Latebindingofattributevalues

- AlsofortechnicalIDorsimplesearch- forJavaScript:query.findElements({name:"Marion",lastname:"Halft"})

- Parameterscanbepassedwithmultiplevaluesorcanbedeactivated- "query.findElements({name:)["Marion","Patrick"],lastname:undefined})

- Partsofastructured querycanbe"deactivated"iftheparameterisnotset

Page 47: L2: Structured queries (english)

StructuredquerieswithiviewsStructuredquerieswith i-views

Homework

Compose astructured query to complete the following tasks:1. Findallalbums that are notcomposed by TheBeatles2. Findalbums whose dates of release are inside the same

week3. Findallpersons who created music and who stem

specifically from England‘s north-westernregion

Page 48: L2: Structured queries (english)

Sendyour questions to:[email protected]

Consultationhours:EveryWednesday

Thank you for visitingi-viewsUniversity