Professional Documents
Culture Documents
What is in a Database?
Stéphane Bressan
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion
20,000 BCE
The Ichango bones (kept in the collections of the Royal Belgian Institute of Natural
Sciences, Brussels, Belgium), discovered in 1950 by Jean de Heinzelin de Braucourt in
the village of Ichango on the shores of lake Edward in the now Democratic Republic of
Congo, are artefacts suggesting a tally device made and used around 20,000 before our
common era.
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion
2,000 BCE
The invention of writing systems has been arguably motivated by the need and will to
store and manage data for all kinds of human activities: science, engineering, trade,
law, and entertainment.
A clay tablet, kept in the collections of Cambridge University, reads “18 jars of pig fat
– Balli. 4 jars of pig fat – Nimgir-ab-lah. Fat dispensed (at ?) the city of Zabala.
Ab-kid-kid, the scribe. 4th year 10th month”.
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion
IMS
”The first ”READY” message was displayed on an IBM 2740 typewriter terminal at
the Rockwell Space Division at NASA in Downey, California, on August 14, 1968. Less
than a year later, on July 20, 1969, Apollo 11 landed on the moon’s surface. ICS was
subsequently relaunched as Information Management System/360 (IMS/360) [...]”
From IBM Knowledge Center (http://www-01.ibm.com)
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion
DBTG
The List Processing Task Force (LPTF) was founded in 1965 by the Cobolab
Committee, formerly Programming Language Committee, of the Conference of Data
Systems Language. In 1967, it was renamed the Data Base Task Group (DBTG)
a
http://www.csis.ul.ie/cobol
b
http://blog.codinghorror.com/cobol-everywhere-and-nowhere
warehouse
in
stock
s_id S_qty
of item
Example Query
Print the total quantity of aspirin in stock.
1 sum := 0 ;
2 i t e m . i n a m e := ’ ’ a s p i r i n ’ ’ ;
3 f i n d any i t e m u s i n g i n a m e ;
4 f i n d f i r s t s t o c k w i t h i n wh ;
5 w h i l e DB= s t a t u s = 0 do
6 begin
7 get stock ;
8 sum := sum + s t o c k . s q t y ;
9 f i n d next stock w i t h i n wh ;
10 end
11 p r i n t ( sum ) ;
12
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion
“Future users of large data banks must be protected from having to know how the
data is organized in the machine.”
Edgar F . Codd (”A Relational Model for Large Shared Data Banks” Communication
of the ACM, Vol 13, #6)
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion
Example Query
Print the total quantity of aspirin in stock.
1 SELECT SUM( s . s q t y )
2 FROM s t o c k s , i i t e m
3 WHERE s i i d = i i i d
4 ANDS i . i n a m e = ’ a s p i r i n ’
5
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion
A database needs a data model (and the corresponding languages) that prescribes
what data elements can be stored and managed how they are organised, and how they
and their relative organisation should be interpreted.
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion
Data Models
Hierarchical Model 1965 (IMS) (see
codex.cs.yale.edu/avi/db-book/db6/appendices-dir/e.pdf)
Network Model 1965 (DBTG) (see
codex.cs.yale.edu/avi/db-book/db6/appendices-dir/d.pdf)
Relational Model (1NF) 1970s
Nested Relational Model (NF2) 1970s
Complex Object 1980s
Object Model 1980 (OQL, O2)
Object Relational Model 1990s (SQL)
XML (DTD), XML Schema 1990s (Xpath, Xquery, XSLT, existdb)
NoSQL Databases (MongoDB, Neo4J, CouchDB, Cassandra)
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion
Instead of the physical optimised actual representation of the data, the user should
interact with a logical model. He proposed the relational model in which the user only
creates relations (tables) and manipulates tuples (records, rows) with attributes
(columns).
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion
DBMS
We do not program database applications from scratch. We use database management
systems. Database management Systems are generic platforms for the implementation
and management of database applications.
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion
RDBMS
Most popular database management systems since the 1970’s are relational. They
implement the relational model of Edgar F. Codd. They implement a subset of one
version of the international standard for the SQL language.
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion
···
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion
v6.0, 1986 ASK Group (1990) CA (1994) OpenIngres 2.0, 1997 vR3, 2004 v9.0, 2006 v10, 2010 Actian (renamed 2011) Ingres
Berkeley Ingres Red Brick v8, 2005 EMC v9, 2010 Pivotal
PostgreSQL
Empress Embedded Illustra
v9.0, 2000 IBM Informix v10, 2005 v11, 2007 v11.70, 2010 v12.10, 2013 Red Brick
alpha, 1979
Informix v1.0, 1980s v4.0, 1990 v5.0, 1992 v6.0, 1994 Microsoft SQL Server
v7.0, 1995 IBM Red Brick
Warehouse H-Store
H-Store
Informix C-Store Vertica Analytic DB Informix
v4.0, 1990 v10, 1993 v11.5, 1996 v11.9, 1998 Volt DB VoltDB
Sybase SQL Server DATAllegro
v3.0, 1988
brand HP Vertica
Sybase ASE
BAY AREA PARK v1.0, 1987
Expressway 103 Sybase IQ v11, 1995
v12, 1999 v12.0, 1999 v12.5, 2001 v12.5.1, 2003 v15.0, 2005 SAP v16.0, 2012
v1.0, 1981 Sybase ASE
1980s
Empress Embedded
ShareBase
RDB
v6.1, 1997 v8.1, 1998 v10.2, 2008
2010s
DB2 for iSeries
v7, 2010
DB2 MVS v3, 1993 v4, 1995 Cloudscape Derby Apache Derby v6, 2008
DB2 UDB for iSeries Derby
dBase II, 1981 dBase III, 1984 dBase IV, 1988 Borland dBase Inc. InfiniDB Firebird
2000s
IBM Peterlee HSQLDB
Relational Test Vehicle
Cullinet GDBM v1.8, 2005 v2, 2012
CODD RIVER
Allbase (HP) SQLite
TurboImage (Esvel)
SQLite
NDBM PeopleSoft Tableau HyPer
TurboImage/XL (HP)
Gamma (Univ. Wisconsin) HSQLDB SAP HyPer (TUM)
DBM v1.6, 2001 v1.7, 2002 SAP
1970s
Mariposa (Berkeley)
HANA
HANA
VDN/RDS DDB4 (Nixdorf) Siemens Cohera P*TIME MaxDB
SAP DB MaxDB
Trafodion
Trafodion
Nonstop SQL
FileMaker Nonstop SQL v3, 2011
(Nashoba) (Tandem) v1, 1987 v2, 1989 AdabasD (Software AG) Compaq HP v7, 2004 v8, 2005 AdabasD
Neoview
FileMaker
v1, 1985 Claris (Apple) II, 1988 FileMaker Pro v2, 1992 v3, 1995 v4, 1997 v5, 1999 v6, 2002
v9, 2007 v10, 2009
v11, 2011 v14, 2015
FileMaker Inc.
Key to lines and symbols Felix Naumann, Jana Bauckmann, Claudia Exeler, Jan-Peer Rudolph, Fabian Tschirschnitz
Contact - Hasso Plattner Institut, University of Potsdam, felix.naumann@hpi.de
v9, 2006 Design - Alexander Sandt Grafik-Design, Hamburg
DBMS name (Company) Acquisition Versions Discontinued Branch (intellectual and/or code) Crossing lines have no special semantics Version 6.0 - October 2018
https://hpi.de/naumann/projects/rdbms-genealogy.html
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion
···
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion
Persistent
Data
Security Large
Amounts
of Data
Features and
Requirements
of Database
Integrity and Applications
Recovery Homogeneous
Collections
of Data
Distributed
and
Concurrent Structured
Access Data
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion
Persistence
Persistence
How can data survive the process that created it, and be reused by other processes?
Large Amounts
Large Amounts
There were 187 million registered voters in the 2019 Indonesian elections.
Where could one store the names, identification numbers, and voting stations of
voters?
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion
Large Amounts
There were 187 million registered voters and 805,000 voting stations in the 2019
Indonesian elections.
In order to print and distribute the voters lists one need to sort the voters in
alphabetical order of their voting stations and names?
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion
Large Amounts
External Algorithms
When data is to be stored on secondary or tertiary storage, then we need to devise
efficient algorithms taking into account the dominant cost of Input/Output operations.
Such algorithms are called external algorithms (e.g., external sort).
1 SELECT *
2 FROM v o t e r s
3 ORDER BY d i s t r i c t , name
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion
Large Amounts
There were 185 million registered voters in the 2019 Indonesian elections. Imagine the
original tapes contain duplicate entries.
Think about an algorithm to remove the duplicate entries (although you won’t need it).
SQL allows to eliminate duplicates a priori with unique and primary key constraints or
a posteriori with the keyword DISTINCT.
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion
Homogeneous Data
Homogeneous Data
1 CREATE TABLE p e r s o n s
2 CREATE TABLE b o t t l e s
3 CREATE TABLE c a r s
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion
Structured Data
Structured Data
voters
1 CREATE TABLE v o t e r s (
2 f i r s t n a m e VARCHAR( 3 2 ) ,
3 l a s t n a m e VARCHAR( 3 2 ) ,
4 d i s t r i c t VARCHAR( 6 4 ) ,
5 n a t i o n a l i d NUMBER) ) ;
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion
1 CREATE TABLE v o t e r s (
2 f i r s t n a m e VARCHAR( 3 2 ) ,
3 l a s t n a m e VARCHAR( 3 2 ) ,
4 d i s t r i c t VARCHAR( 6 4 ) ,
5 n a t i o n a l i d NUMBER) ) ;
6
7 SELECT l a s t n a m e
8 FROM v o t e r s
9 WHERE f i r s t n a m e = ’ Bambang ’ ;
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion
In a nutshell, the solution used by most database management systems is to log all the
transactions and their operations in order to be able to undo and redo the necessary
operations and restore a consistent sate of the database before the failure.
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion
Recovery: Atomicity
All actions in a transaction happen or none happen.
Security
Security
Security is achieved by means of access control policies. Most database management
systems implement a role-based access control to control the access to the various
database objects: tables, rows, columns, views, stored functions and procedures etc.
for the different possible operations: create, update, delete and query or execute. Most
database management systems also offer for security security mechanisms such as
cryptography, authentication methods, etc. Nevertheless, application developers must
be wary of all possible attacks in general and, in particular, of SQL injections.
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion
Definition
Definition
“A database application manages persistent homogeneous collections containing large
amounts of structured data that are shared among distributed users and processes and
whose integrity must be maintained and security controlled.
Typically, a database application is best designed for, implemented, deployed and
maintained with a database management sytem.”
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion
Syllabus
Syllabus
This semester we discuss the design (normalised entity-relationship modelling) and
implementation (SQL) of database applications with relational database management
systems for online transaction and analytical processing applications in the classical
full-stack three-tier model (Web client or app, Web and application server, database
server).
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion
Textbooks
Recommended Textbooks