240 likes | 342 Views
HL7 version 3. Logical and Physical Database models. Scope: ORM best practices, LDM/PDM, versioning, temporal aspects. Slide contents published under the Creative Commons / Attribute-Share Alike license Source: www.ringholm.de/download/HL7v3_implementation.zip. Persistence. Overview.
E N D
HL7 version 3 Logical and Physical Database models Scope: ORM best practices, LDM/PDM, versioning, temporal aspects Slide contents published under the Creative Commons / Attribute-Share Alike license Source: www.ringholm.de/download/HL7v3_implementation.zip
Persistence Overview Slide contents published under the Creative Commons / Attribute-Share Alike license Source: www.ringholm.de/download/implementation_mechanics.ppt
Database models (Relational) RIM or RIM-based model: Conceptual Data Model RIM • Logical Data Model • Not DBMS specific, no tables, no keys LDM ORM – Object Relational Mapping PDM • Physical Data Model • DBMS specific, tables, keys
Conceptual Data model - RIM • Enormous flexibility, at the cost of a very abstract structure. • makes enforcement of data integrity rules very difficult making it necessary to rely on stored procedures and application logic to enforce rules. • Low number of tables • less programming work, easier to learn, easier to add new functionality. More data in each table, need to tune queries. • Main use-case: • If you're creating a data store for ad-hoc queries, mining and exploration of all sorts of data from all sorts of different sources
Conceptual Data Model – D-MIM • The D-MIM approach doesn’t differ that much from a RIM approach. • Most D-MIMs touch pretty much all of the RIM from a structural perspective. • Does allow for the enforcement of specific data integrity rules • Think of a D-MIM or R-MIM as a relational "view" on the underlying RIM structures.
Persistence Persisting Data Types Slide contents published under the Creative Commons / Attribute-Share Alike license Source: www.ringholm.de/download/implementation_mechanics.ppt
Data Types • At a lower level, the data types are complex to support. • Complex data types • Helper classes, or UDTs • Abstract data types • Specialize; or use helper classes • Collection data types • Helper classes
UDT – Data Types • Database data types are far removed from HL7 data types • Fill gap using ORM: • Complicated HL7 data type operations may lead to full tablescans • Current implementations: very limited nullFlavor support
UDT – Data Types • User Defined Types (at the DBMS level) • A form of ORM at the database level • Allows for the definition of CD with SNOMED support, II with an OID check, or PQ with UCUM validation. • Native support for HL7 datatypes in SQL. • Full nullFlavor support
Persistence Physical Database Model Slide contents published under the Creative Commons / Attribute-Share Alike license Source: www.ringholm.de/download/implementation_mechanics.ppt
Minimalize Joins • Add subjectId and AuthorId to Act table (and have a participation table) • BTW: recursion was deliberately excluded from ISO/R2 Data Types. • Hibernate: tune lazy loading and fetch mechanisms.
Persistence Implementation Experience Slide contents published under the Creative Commons / Attribute-Share Alike license Source: www.ringholm.de/download/implementation_mechanics.ppt
OntoReason / MD Anderson Data Type Specific Table Data Type Specific Table Data Type Specific Table Data Type Specific Table Data Type Specific Table Class_value_relation is a “Triple” for all Act attributes with non-DBMS data types
Any Questions ? • Or: post your question/suggestions via • HL7 Wiki: http://bit.ly/d7tSsL • E-mail v3impl@ringholm.com