Title: Theory of Databases
1Theory of Databases
- Module lecturer Dr Meurig Beynon, Room 3.15
- Module Content
- Generalities on databases
- Database models Theory and Practice
- Entity-relationship models
- Relational models algebraic and logical
- Commercial relational languages
2CS319 Theory of Databases
- Module Content (cont.)
- Technical Issues and Algorithms
- Optimisation
- Integrity constraints
- Database design
- Future Trends Theory and Practice
- Object-oriented models
- Extended relational systems
- The Relational Model and SQL
3Theory in Computer Science?
- Theory in computer science is typically viewed as
- Â
- - associated with formal foundations for
computing - - based on mathematics (can there be any other
kind of theory?) - - used to justify and to inform practical
principles
4Common perceptions about theory of CS
- Computer Science means accounting for computing
practice using mathematical theory -
- Mathematical theory is the essential foundation
practical computing is its application - The mathematical foundations of computer science
are the bedrock of the subject - they frame
computing in an abstract manner independent of
technologies, and how these abstractions are
realised in practice is a relatively ephemeral
concern
5- Ephemeral conveys a number of ideas
- temporary
- reflecting a current situation or fashion
- not of abiding interest
- of subordinate significance
6In support of this view of theory
- From a mathematical perspective
- have a powerful abstract theory of computation
all programming platforms are Turing equivalent
in some fundamental sense - it is difficult to know what meaning to attach
to computational activity for which there is no
abstract mathematical model - computation has - and always has had - a crucial
role in mathematics itself
7In support of this view of theory
- From a broader scientific perspective
-
- It is possible to regard pure sciences such as
physics as establishing an intimate association
between mathematical models and our interaction
with the natural world -
- CS might plausibly be viewed as an embryonic
Science of the Artificial, and we might expect
abstract mathematical models to be ideally suited
to framing such a discipline
8In support of this view of theory
- From a cognitive perspective
-
- reasoning is an important constituent of human
thought - logic is seen by many computer /
cognitive scientists as the essential constituent
of human intelligence, and the computer as an
appropriate metaphor for the brain - cf. the logicist perspective on artificial
intelligence
9Contrary to this view
- Theory has yet to deliver programming tools and
principles that meet practical computing needs
comprehensively - Functional programming
- Formal models of concurrency
- Formal methods for software development
- represent a partial solution to practical
issues
10Contrary to this view
- Crucial aspects of practical computing have no
satisfactory supporting formal theory - human-computer interaction
- end-user programming
- object-oriented modelling
- object-oriented software development
- mathematical models are of limited value
11Contrary to this view
- Some of the most significant aspects of computing
practice are pre-theory and subjective in
character - Consider the observation and experiment involved
e.g. - in requirements capture
- in customising interfaces for personal use
- in software development based on prototyping
- implicit knowledge embodied in interaction not
explicit in mathematical models
12Contrary to this view
- Interaction in the world can only be viewed as
accounted for by theory if we accept a
reductionist stance on the nature of science
consider the implications / meta-implications of
a Theory of Everything in physics - Many aspects of human activity and interaction
in the world arguably involve more than
applications of logic interaction in the world
can be viewed as conceptually prior to reasoning,
and not explicable in terms of logic consider
e.g. Rodney Brooks's robotics research on themes
such as Intelligence without Reason, Intelligence
without Representation
13Contrary to this view
-
- Modern developments of computing challenge the
mind-body dualism that underlies the idea of the
brain as a complex computational device that can
be conceptually separated from its embodiment
consider e.g. - - brain-mediated communication
- - meaning as situated
- - context dependence in natural language
- Mathematics does not account for situated meaning
14Two possible approaches to developing CS
- evolutionary accept that there is an essential
duality within computing that distinguishes the
hard core science of computing from the soft
ephemeral pseudo-science of computing practice,
and focus on developing and extending classical
theories with a view to giving as comprehensive
an account of computing practice as is possible - revolutionary recognise that computer science
as classically conceived is inadequate as a
foundation for practical computing and artificial
intelligence, and that this inadequacy cannot be
resolved without reappraising the whole issue of
how mathematical models and activities in the
world are connected
15Scope of CS 319
- Will use data modelling principles for databases
as the arena within which to explore these broad
issues concerning the role of theory in computer
science - Complementary to other modules, e.g. that concern
- formal approaches to software development
- artificial intelligence
- robotics
- personal views beyond scope of CS319 developed
in CS405 An Introduction to Empirical Modelling
16The principal theme of CS319
- How do theory and computing practice relate with
specific reference to databases? - Key ideas
-
- The counterpart of the classical theory of
computation in databases is Codd's relational
theory. -
- There is an excellent correspondence between
relational theory and practical database
application of a certain kind. - Relational databases can be seen as a precursor
for two principal kinds of computer application
environments for end-user programming and
computer-based models of real-world state.
17The principal theme of CS319
- How do theory and computing practice relate with
specific reference to databases? - Key ideas (cont.)
-
- There are aspects to the relational theory
(especially those concerned with database design)
that challenge the classical view of how an
abstract mathematical model represents a
situation in the world. - Modern database applications oblige us to
question the adequacy of relational theory, and
to consider the extent to which a relational
framework can cope with notions such as objects,
interfaces and agents.
18Content of CS319
- To put the key ideas in perspective, address the
following topics - An extended account of relational theory and its
applications in respect of the development of
relational query language and database design. - The qualities of the relational model both as it
was first conceived by Codd and as it has (and
has not) been embodied in practical relational
databases.
19Content of CS319
- Â
- A critical assessment of the relational database
model from the proponents of alternative kinds of
database, such as object-oriented and extended
relational models. - The possible limitations of the relational model
where modern computing applications and
technologies are concerned. - An evaluation of the various database model
critiques and a personal perspective on the
future of databases.
20Aspects of a Computer Science education
- Three kinds of activity involved in learning CS
- learning theory
- gaining practical knowledge and skills of
computing - developing a critical appreciation of how theory
and practice are related - Principal emphasis in CS319 is on the first and
third aspects
21Special lecture arrangements weeks 18 and 19
- Dr Hugh Darwen was an IBM consultant on
databases - he is our guest lecturer in weeks 18 and 19
- NOTE the lectures in week 18 will be on The
Relational Model and SQL thus - Monday February 21st at 2pm and 5pm in CS1.04
- Thursday February 24th at 2pm and 5pm in CS1.04
- the lectures in week 19 will be on
- Temporal Data and the Relational Model thus
- Monday February 28th at 2pm and 5pm in CS1.04
- Thursday March 3rd at 2pm and 5pm in CS1.04
22Some context for the Theory of Databases
- Setting the scene
- Industrial perspectives
- Academic perspectives
- Sources for the CS319 module
23Setting the scene for the theory of databases -
relations
- M J Ridley, University of Bradford (TLAD WS 2003)
- DB systems or DB theory or Why dont you teach
ORACLE - The modern age of databases may NB! - WMB have
started with relational databases which despite
their ubiquitous nature we should remember were
looked an as of only academic interest at one
time. What surely marks this era the early
1970s out is the sound theoretical basis of that
database model and the progress that was made
because of this. -
- But what age are we in now?
24Setting the scene for the theory of databases -
objects
- Object oriented DBs emerged in the 1980s in
response to the feeling that relational databases
were inadequate for certain classes of
applications ... - Disadvantages of OODBs
- Brown, A.W. OODBs Applications in S/W
Engineering, 1991 - no formal semantics
- loss of relational simplicity
- navigational queries
- no general query language
25Setting the scene for the theory of databases
objrel
- Object oriented DBs emerged in the 1980s in
response to the feeling that relational databases
were inadequate for certain classes of
applications ... The extent to which
object-oriented and relational DBs can be
unified, as in object-relational DBs, remains
controversial - Ridley cites Maier (2002) on object-relational
systems - David Maier speaks out, SIGMOD Record, 31(4),
2002 http//www.acm.org/sigmod/record/issues/0212/
- theres not a good design theory the way there
was with normal form relations for relational
databases - the new features at least double the
number of design choices you have in every
instance
26Setting the scene for the theory of databases
the Web
- Ridley observes The Web has made many more
people database users and heightened the
awareness of databases generally it raises the
issues of the semantic mismatch between the set
oriented nature of SQL and most programming
languages. cites - The Asilomar report on Database Research, SIGMOD
Record, 27(4), 1998 http//www.acm.org/sigmod/reco
rd/issues/9812/ - Theorem The WEB changes everything.
- Corollary XML is the means
- and raises the question
- But where then is our dominant relational
paradigm left?
27Perspectives from the computing industry 1
- From Whatever happened to OODBs?
- http//www.leavcom/db_08_00.html
- In 1998 industry experts touted OODBs as a
technology on the rise, well suited for the
emerging Internet age OODBs would soon become
the primary DB technology, supplanting RDBMSs,
which were not designed to handle multimedia data
Fast forward to today, and RDBs are still by
far the most widely used DBs meanwhile,
object-relational DBMSs have added object
capabilities to relational DBs they are gaining
popularity and are expected to outsell even RDBs
by 2003
28Perspectives from the computing industry 2
- Rick Catell (SUN Microsystems) Object-oriented
DBs are doing just fine, and the news of their
demise is greatly exaggerated. While their market
isnt as big, they continue to be used in areas
like CAD (computer-aided design) and
telecommunications, where RDBMSs are not well
suited. - Michael Stonebraker (Informix) ODBMSs occupy a
small niche market that has no broad appeal. The
technology is in semi-rigor mortis, and ORDBMSs
will corner the market within five years. - quotations dating from around the year 2000
29Perspectives from the computing industry 3
- International Data Corporation Opinion
- from OODB vs ORDBs, Steve McClure, 1997
- Because of the relative size of the RDBMS
vendors marketing infrastructures, the ORDBMS
market will surpass the size of the ODBMS market
in the next five years. Nevertheless, putting
object-oriented extensions on RDBMSs is
tantamount to adding stereo radios and global
navigation systems to horse-drawn carriages. You
will have interesting enhancements, but the wrong
base vehicle. In the end it wont be an
appropriate vehicle for the information
superhighway.
30Perspectives from academia 1
- M J Ridley, University of Bradford (TLAD WS 2003)
- DB systems or DB theory or Why dont you teach
ORACLE - Practice without Theory is blind, Theory without
Practice is sterile (Karl Marx) - most people would agree that we need a
theoretical framework in which to talk about DBs
if the result is to be productive The questions
that seem to me to need answering are What is
that framework?
31Perspectives from academia 2
- M J Ridley, University of Bradford (TLAD WS 2003)
- DB systems or DB theory or Why dont you teach
ORACLE - most people would agree that we need a
theoretical framework in which to talk about DBs
if the result is to be productive The questions
that seem to me to need answering are What is
that framework? - Is it the simple relational model? How
important is that framework? (In practical,
educational terms how much of the syllabus is
this?) Are there competing theoretical frameworks
that need considering?
32Perspectives from academia 3
- M J Ridley, University of Bradford (TLAD WS 2003)
- DB systems or DB theory or Why dont you teach
ORACLE - most people would agree that we need a
theoretical framework in which to talk about DBs
if the result is to be productive - But is there still a firm theoretical foundation
for what we teach? Does that matter? Are we in
danger of training students in the features of a
particular system (and a convenient web interface
for it) rather than educating them about DBs in
the broader sense?
33Perspectives from academia 4
- M J Ridley, University of Bradford (TLAD WS 2003)
- DB systems or DB theory or Why dont you teach
ORACLE - What is the relationship of Database teaching to
other aspects of the curriculum such as the study
of data structures and object-orientation? And
are there theories of these subjects? - is there are more general object theory that
informs programming and software development
generally. If so can relational theory be located
as a subset of that mainstream or does database
stand out as an exception?
34Perspectives from academia 5
- M J Ridley, University of Bradford (TLAD WS 2003)
- DB systems or DB theory or Why dont you teach
ORACLE - Ridleys own answer to these questions
- we are in danger of losing sight of firm
theoretical ground especially as we are under
pressure to include yet more additional
facilities of DBMSs more so as object systems
have failed to achieve commercial success
commensurate with their early promise and the
pressure of the web has shifted the focus of much
database work.
35Books on Classical Relational Databases
- Date, C.J. A Database Primer, Addison-Wesley
- Date, C.J. An Introduction to Database Systems,
Addison-Wesley 8th edition, 2003 - Ullman, J.D. Principles of Database Systems 2nd
edition, Computer Science Press 1982 - Ullman, J.D. Principles of Database
Knowledge-base Systems Vols 1 2, Computer
Science Press 1988 - Ullman, J.D. A First Course in Database Systems,
2nd ed Prentice-Hall, 2002 - see http//www-db.stanford.edu/ullman/ullman-bo
oks.html
36Books on more general database issues
- Korth, H.F. and Silberschatz Database System
Concepts, McGraw-Hill 2nd ed. 1991, 4th ed. 2001 - Brown, A.W. Object-oriented Databases
Applications in Software Engineering, McGraw-Hill
International Series in Engineering, 1991 - Gray, P.D. Logic, Algebra Databases,
Ellis-Horwood Series, Computers and their
Applications 29 - Kent, William Data and Reality basic assumptions
in data processing reconsidered, North-Holland
1987
37Books on Relational Theory in its application
- Date, C.J. Relational Database Writings 1985-1989
Addison-Wesley and other collections in this
series - Hugh Darwen and C.J.Date Foundations for
Object/Relational Databases The Third Manifesto
1998 Harlow, Addison-Wesley Longman - C.J.Date, Hugh Darwen, M.A.Lorentzos Temporal
Data and the Relational Model, Morgan-Kaufmann,
2002 - (summarised in Chap. 23 of Dates Intro to DBs,
8th ed) - Dr Hugh Darwen was an IBM consultant on database
- until his retirement in 2004 he is our guest
lecturer in - weeks 18 and 19
38Special lecture arrangements weeks 18 and 19
- Dr Hugh Darwen was an IBM consultant on
databases - he is our guest lecturer in weeks 18 and 19
- NOTE the lectures in week 18 will be on The
Relational Model and SQL thus - Monday February 21st at 2pm and 5pm in CS1.04
- Thursday February 24th at 2pm and 5pm in CS1.04
- the lectures in week 19 will be on
- Temporal Data and the Relational Model thus
- Monday February 28th at 2pm and 5pm in CS1.04
- Thursday March 3rd at 2pm and 5pm in CS1.04
39Questions regarding status of DB theory 1
- Issues about the context in which DB theory
applies - To what extent do theories about databases in
general apply exclusively to relational
databases? - To what extent is DB theory specific to
applications? - - technology / kind of activity / nature of
environment - it applies to the 1970s business context does
it apply now?
40Questions regarding status of DB theory 2
- Issues about the scope and nature of DB theory
itself - How does DB theory relate to objectives such as
- - supporting end-user programming?
- - representing real-world state?
- How does DB theory relate to other conceptual
frameworks (e.g. data modelling in OO / UML / ER) - to address broader issues (e.g. typing /
non-procedural vs procedural models of
computation)?