the constellation query language
DESCRIPTION
Presentation to Data Melb on Semantic Modeling and CQL.TRANSCRIPT
TheConstellationQueryLanguage
CliffordHeath,DataConstellation
Copyright © 2010 Data Constellation
Copyright © 2010 Data ConstellationImage Copyright Andrew Lipson 2005. Used with permission. Not affiliated with Lego™
The Enterprise is a mess
Copyright © 2010 Data Constellation
Onewaycommunication
•Softwarefolktranslateuserstoriesintopreciseabstractions(UML,ER,etc)
• Theabstractionsaremostlyunreadablebythebusiness>Nobackchannel!
• Onlythebuiltartefactscommunicateourmisunderstandings>Late!
Copyright © 2010 Data Constellation
Loss of Semantics
Copyright © 2010 Data Constellation
Semantics
• Eachtermdenotesatypeofthing
• Eachthingisassociatedwithothers
• Theseassociationsareconnotations
• “Meaning”isthesumofallconnotations
• Everypersonhasdifferentconnotations
“The shared meanings of a community”
Copyright © 2010 Data Constellation
Relations,Objects,Graphs,or...
Facts?
Copyright © 2010 Data Constellation
ConstellationQueryLanguage
Copyright © 2010 Data Constellation
InsuranceSimplified(contd.)
Copyright © 2010 Data Constellation
RelationalMapping
Copyright © 2010 Data Constellation
InsuranceClaim(complete)
Schema has been modified to suit a Rails application
Copyright © 2010 Data Constellation
Insurance(snippets)DriverisakindofPerson;
VehicleIncidentisakindofIncident;
DrivingiswhereDriverdrovevehicleinVehicleIncident;
VehicleIncidentfollowedIntoxication;
DrivingChargeiswhereDrivingresultedinCharge;
DrivingChargeisawarning;
These definitions support the example that follows.
Copyright © 2010 Data Constellation
InstanceData
Copyright © 2010 Data Constellation
DiplomacyModelObjectandfacttypes
Copyright © 2010 Data Constellation
Diplomacymodelconstraints
CQL supports many constraint types:Mandatory, Uniqueness, Frequency, Subset, Equality, Exclusion, Ring, Value, etc.
Copyright © 2010 Data Constellation
ORM2Agraphicallanguageforfactorientedmodeling.
Copyright © 2010 Data Constellation
RelationalMapping
Copyright © 2010 Data Constellation
SQL
Copyright © 2010 Data Constellation
RubyRuby fact-oriented DSL* uses meta-programming* assert/retract, no new/delete* fully co-referenced.
Copyright © 2010 Data Constellation
SimpleQuery
PersonhasgivenName‘Daniel’?
PersonhasgivenName,givenName=‘Daniel’?
... a contraction of the value join:
Copyright © 2010 Data Constellation
UnitsconversionAreaiswrittenasRealinmm^2;
PanehasArea:PaneofglasshasWidth,PaneofglasshasHeight,Width*Height=Area;
largePane:PanehasArea,Area>=5foot^2;
largePane?
Definedinmm
Compatibilityischecked
Conversionsupplied
Query:
Copyright © 2010 Data Constellation
SemanticModeling
•Highlyverbal,andverbalisable
• Basedonuserexamples
•Mathematicallyformal(FOL)
• Finegrainedsemanticstructure
• Attributefree(Doesn’tencodeassumptions)
• AutomaticmappingtoOO,ERandcode
CliffordHeathAvailableforconsultingandtraining
http://dataconstellation.com/