Big data query examples

querying big data bridging theory and practice and big data query optimization
Dr.GordenMorse Profile Pic
Dr.GordenMorse,France,Professional
Published Date:22-07-2017
Your Website URL(Optional)
Comment
Ghislain Fourny Big Data 10. Querying 1 pinkyone / 123RF Stock PhotoDeclarative Languages What vs. How 2Functional Languages while = let any return if for then + where else order by every exit with Expression 3Ever played Lego? 4Ever played Lego? if( ) then else 5Ever played Lego? if( ) my:func( ) then else 6Ever played Lego? if( ) my:func( ) then else 7Ever played Lego? if( ) my:func( ) 2 then else 8Ever played Lego? if( ) my:func( ) 2 then for x in let y := return else 9Ever played Lego? if( ) my:func( ) 2 then for x in let y := return else 10Ever played Lego? if( ) my:func( ) 2 then for x in let y := return else 11Language ecosystem XML JSON Navigation XPath JSONPath JSONSelect Transform XSLT JSONT Query XQuery 1.0/3.0 XQuery 3.1, JSON Query, JSONiq Update, XQuery Update JSONiq Scripting Facility & Scripting 12Try it out 13XML Navigation (XPath, XQuery) 14The slash operator ?xml&version="1.0"&encoding="UTF98"?& countries& &&country&code="CH"& &&&&nameSwitzerland/name& &&/country& &&country&code="F"& &&&&nameFrance/name& &&/country& &&country&code="D"& &&&&nameGermany/name& &&/country& &&country&code="I"& &&&&nameItaly/name& &&/country& &&country&code="A"& &&&&nameAustria/name& &&/country& /countries& & doc("myfile.xml")/countries/country/name 15The slash operator ?xml&version="1.0"&encoding="UTF98"?& countries& &&country&code="CH"& nameSwitzerland/name &&/country& &&country&code="F"& nameFrance/name &&/country& &&country&code="D"& nameGermany/name &&/country& &&country&code="I"& nameItaly/name &&/country& &&country&code="A"& nameAustria/name &&/country& /countries& doc("myfile.xml")/countries/country/name 16 &Axis ?xml&version="1.0"&encoding="UTF98"?& countries& &&country&code="CH"& nameSwitzerland/name &&/country& &&country&code="F"& doc("myfile.xml") nameFrance/name &&/country& /child::countries &&country&code="D"& nameGermany/name /child::country &&/country& &&country&code="I"& /child::name nameItaly/name &&/country& &&country&code="A"& nameAustria/name &&/country& /countries& 17 &Axis ?xml&version="1.0"&encoding="UTF98"?& countries& &&country&code="CH"& nameSwitzerland/name &&/country& &&country&code="F"& nameFrance/name doc("myfile.xml") &&/country& &&country&code="D"& /descendant::country nameGermany/name &&/country& /child::name &&country&code="I"& nameItaly/name &&/country& &&country&code="A"& nameAustria/name &&/country& /countries& 18 &All Axes Forward Axes Reverse Axes self:: attribute:: child:: parent:: descendant:: ancestor:: descendant-or-self:: ancestor-or-self:: following-sibling:: preceding-sibling:: following:: preceding:: 19Axis ?xml&version="1.0"&encoding="UTF98"?& countries& &&country&code="CH"& &&&&nameSwitzerland/name& &&/country& &&country&code="F"& &&&&nameFrance/name& doc("myfile.xml") &&/country& &&country&code="D"& /descendant::country &&&&nameGermany/name& &&/country& /child::name &&country&code="I"& &&&&nameItaly/name& &&/country& &&country&code="A"& &&&&nameAustria/name& &&/country& 20 /countries& &