Transcript Simplicity

Simplicity
in Relational Database Systems
David Livingstone
UK Systems Society
11th International Conference
September 2007, Oxford
Background
DB research project : achieving simplicity is inherent.
A PhD built on this : find simple solution to a problem.
Draft PhD chapters assumed ‘simplicity’.
Not acceptable !
What is this simplicity ? Why is it important ?
What is the basis ? What is the aim ?
Underlying suspicion - “simplicity is not realistic”.
Simplicity ≡ easy research to do - copout !
results in not-very-useful product - trivial !
academics don’t do easy things !
Themes of Presentation
1. PhD : a (database) problem
& its solution.
2. Simplicity : what is it,
& how do we get it ?
Part of a
larger
research
project.
3. System : what are the elements,
and how should they be joined up ?
System ≡ Relational Model
Elements : Data Structures + Operators
‘Joining Up’ : Assignments of
Algebraic Expressions
‘Simplicity is a Virtue’
“If projects or programmes are overly complex, there is
a good chance they are simply wrong”.
(Brian Jones, IBM).
“Complexity leads to design problems & greater risk of
error”.
(Martyn Thomas, Praxis MD).
“There are no complex systems that are secure.
Complexity .. almost always comes in the form of
features or options”.
(Ferguson & Schneier).
“.. that a product with fewer features might be more
usable, more functional, & superior .. is considered
blasphemous”.
(Donald Norman).
Background : ‘Third Manifesto’
Specification of a replacement for Object-Relational SQL.
Motivation  conceptually simpler, more functional.
Adhere to relational principles.
Purely logical model; implementation not considered.
Containers orthogonal to scalar values.
R
A1
...
A2
...
A3
...
...
...
...
...
...
...
...
...
...
Any kind of data
can be a scalar;
e.g. pictures, piece
of music, video.
Third Manifesto Principles
1. Fred Brooks (from “The Mythical Man-Month”) :
• “Because ease of use is the purpose, the ratio of
function to conceptual complexity is the ultimate test”.
• “Simplicity and straightforwardness proceed from
conceptual integrity. It is better to reflect one set of
design ideas than to have many good but
uncoordinated ideas”.
2. Wittgenstein :
• “All logical differences are big differences. In logic,
we are not making subtle distinctions.”
Note : program bugs are usually ‘small’ differences.
What is the PhD Problem ?
Want to be able to nest all possible kinds of container.
R
A1
...
A2
...
A3
...
...
...
...
...
...
...
...
...
...
A4
11 different kinds
of container.
How to add them
while providing
simplicity and
retaining
functionality ?
What is it that should be Simple ?
Mental Model Principle - “People understand & interact
with systems & environments based on mental
representations developed from experience”.
(Universal Principles of Design).
“A good conceptual model is .. fundamental to good
design”.
“Good designers present explicit
conceptual models for users”.
(D. Norman - “Design of Everyday Things”).
Answer : User’s Conceptual Model of Software System.
Not the software design or code.
Not necessarily “lean software”.
Criteria of Simplification
• Parsimony of concepts.
• Straightforwardness of concepts. Simplicity.
Terseness. Elegance.
• Generality of concepts. No limitations or exceptions.
• Orthogonality. Each concept is independent of every
other concept, so that they can be combined in any
arbitrary way.
• Uniformity. Consistency & regularity in expressing
concepts.
What Simplicity is NOT
NOT Minimalism, which provides simplicity by
limiting explicit functionality (c.f. Essentiality).
NOT (necessarily) intuitive.
“Intuition is simply a
state of subconscious knowledge that comes about
after extended practice”.
(Donald Norman).
‘WRONG’ experience may require ‘un-learning’.
E.g. Proponents of OO Programming insist on need to
‘think in OO terms’ to be able to program effectively.
IRREDUCIBLE MINIMUM of Simplicity.
“Everything should be made as simple as possible,
but not simpler”.
(Albert Einstein).
Achieving Simplicity in Physics
• Raise level of abstraction.
• Raise level of generality.
Example : electricity & magnetism are special cases
of electromagnetism.
Example : unify the 4 forces of nature into one.
(Needs 10 or 26 dimensions !)
Beauty : simplicity, elegance, symmetry.
(Hyperspace by Michio Kaku).
Einstein developed relativity because symmetry was
more fundamental than Newtonian space-time.
 reform space-time to fit symmetry.
Achieving Simplicity in a Software System
• Separate the user’s conceptual model from its
implementation.
• Raise the level of abstraction and generality;
apply essentiality & beauty;
derive simple conceptual taxonomy for the user model.
• Check the user’s conceptual model against :
- conceptual integrity,
- simplification criteria.
• Implement the model with as much automation as is
feasible. Defaults can be useful. May need complex
software to get a simple conceptual model.
Analogy of car.
Complexity versus Simplicity
Simple System
Complex System
Level
of
Abstraction
Level
of
Abstraction
More Generality
 More Functionality
More Orthogonality
Simpler Database System
PhD : 11 → 3
Sequences, bags
& sets of data.
Elements of System
Containers
‘Joining Up’ of Elements
Assignment statements
only.
Variable ← algebra expression
Scalar Values
Operators
Assignments
(generalised)
- generalised assignments,
- nested assignments.