PGCon2008 - Final - we hope

PGCon 2008
The PostgreSQL Conference

Jeff Davis
Day Talks - first day (2008-05-22)
Room A
Start time 11:30
Duration 01:00
ID 83
Event type lecture
Track Applications
Language en

Logic and Databases

Answering complex questions & migrating data

This talk focuses on two common data management tasks, and how the relational model can help. First, how to answer complex questions about your data, and provide an answer that can be understood by non-IT people unambiguously. Second, how to effectively extract meaning from disorganized (or under-documented) data sets for effective data migration or reporting.

The relational model, on which all SQL DBMSs are based, is founded on both logic and sets. Relational operators like JOIN and UNION have a direct logical meaning, and you can use those operators to answer complex questions from your data unambiguously. Not only can you provide unambiguous answers, but you can translate SQL queries into the language of logic, which can be understood by people outside of IT.

Equally important is the utility of logic working backwards to help find meaning in disorganized (or perhaps undocumented) data sets. Nearly every inherited data set is less than perfectly documented, and often inconsistent. Changes to (or replacement of) the application require this data to be migrated. By iteratively making assertions and then testing them using the rules of logic and the convenience of sets, you can find exceptions and contradictions that help you refine the meaning of data, and possibly correct inconsistencies.