You are on page 1of 41

Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion

What is in a Database?

Stéphane Bressan
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion

Bones, Stones, Papyrus, and Paper

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

Bones, Stones, Papyrus, and Paper

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

Vacuum Tubes and Solid States

20th Century: Sputnik, Yuri Gagarin, Apollo, and Neil Armstrong


”On May 25, 1961, United States President John F. Kennedy challenged American
industry to send an American man to the moon and return him safely to earth, thus
launching the Apollo program. North American Aviation, in partnership with IBM,
fulfilled the requirement for an automated system to manage large bills of material for
the construction of the spacecraft in 1965.” About the Rice Stadium speech at Rice
University, Houston, Texas. From IBM Knowledge Center (http://www-01.ibm.com)
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion

Vacuum Tubes and Solid States

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

Vacuum Tubes and Solid States

The IMS Model


IMS is a hierarchical model. A hierarchical database consists of a collection of records
connected to one another through links. Each record is a collection of fields
(attributes), each of which contains only one data value. A link is an association
between precisely two records. In the IMS model, only many-to-one links are allowed.
The database forms a tree or a forest. This allows efficient serialization, storage and
retrieval on sequential medium such as tape.
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion

Vacuum Tubes and Solid States

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

The DBTG CODASYL Model


The CODASYL DBTG 1971 report is the first database standard specification.
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion

Vacuum Tubes and Solid States

The DBTG CODASYL Model


DBTG is a network model. In a network database consists of a collection of records
connected to one another through links. Each record is a collection of fields
(attributes), each of which contains only one data value. A link is an association
between precisely two records. In the DBTG model, only many-to-one links are
allowed, but the database may form a graph.
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion

Vacuum Tubes and Solid States

warehouse

w_id w_name w_street w_city w_country

in

stock

s_id S_qty

of item

i_id i_im_id i_name i_price


Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion

Vacuum Tubes and Solid States

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

Protect the Users

“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

Protect the Users

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

Protect the Users

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

Protect the Users

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

Protect the Users

Edgar F. Codd argued that database management required data independence.

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

Protect the Users

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

Protect the Users

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

Protect the Users

Popular relational database management systems include Oracle, Microsoft SQL


Server, IBM DB2, Sybase, PostgreSQL, MySQL, MariaDB, SQLite, MS Access, SAP
Hana, etc.

···
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion

Protect the Users

The Hasso-Plattner-Institut of the University of Potsdam, Germany, maintains a


genealogy of relational database management systems at
hpi.de/naumann/projects/rdbms-genealogy.html.

Genealogy of Relational Database Management Systems

v6.0, 1986 ASK Group (1990) CA (1994) OpenIngres 2.0, 1997 vR3, 2004 v9.0, 2006 v10, 2010 Actian (renamed 2011) Ingres

Ingres Corp. (2005) VectorWise (Actian)


VectorWise
Ingres v5.x, 1970s RTI DABA (Robotron, TU Dresden)
Netezza MonetDB
Monet Database System MonetDB (CWI)
(Data Distilleries) IBM Netezza
Postgres PostgreSQL v1, 1995 v6, 1997 v7, 2000 Actian Redshift (Amazon) Redshift
Bizgres Greenplum PADB (ParAccel)
Greenplum

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

Watcom SQL v15, 2009 Sybase IQ


CODD RIVER Powersoft Sybase SQL Anywhere
Microsoft SQL Server
SQL Anywhere
Microsoft Access v1, 1992 v2, 1993 v3, 1995 v4, 1997 v5, 1999 v10, 2001 v11, 2003 v12, 2007 v14, 2010
Access
IDM 500 (Britton Lee) v1, 1989
v4.21, 1993 v6, 1994 v6.5, 1995 v7, 1998 v8, 2000 v9, 2005 v10, 2008 v11, 2012
FoxPro VisualFoxPro (Microsoft) Oracle
Oracle v12c, 2013
mSQL v8, 1997 v8i, 1999 v9i, 2001 v10g, 2003 v10gR2, 2005 v11g, 2007 v11gR2, 2009 Infobright
Infobright
v3, 1983 v4, 1984 v5, 1985 v5.1, 1986
v3.1, 1997 v3.21, 1998 v3.23, 2001 v4, 2003 v4.1, 2004 v5, 2005 v5.1, 2008 Oracle v5.6, 2013 v5.7, 2015
MySQL
v2, 1979 v7, 1992 MySQL
Sun MariaDB
Paradox (Ansa) InnoDB (Innobase)
Borland
DBC 1012 (Teradata) MariaDB v5.5, 2010 v10, 2013 TimesTen
v1, 1983 Oracle
Corel Paradox
Oracle

Multics Relational Data Store


(Honeywell) RDB (DEC)
1990s NCR
JBMS TimesTen

v5.1, 2004 v6.0, 2005 v6.2, 2006


Aster Database
v12, 2007 v13.0, 2009
Teradata v13.10, 2010 v14.0, 2012
Teradata Database

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

BAY AREA PARK Impala


SQL/400 RELATIONAL CREEK DB2/400 v5, 1997 Informix IBM
Transbase
SQL/DS v4, 1992 v6, 1999 DB2 z/OS v7, 2001 v8, 2004 v9, 2007 Impala
v1, 1988 v2, 1992
v10, 2010
DB2 for z/OS
DB2 for VSE & VM DB2 for VSE & VM
Solid DB v5, 1996
MemSQL
System-R (IBM) v1, 1983 v2, 1988 DB2 UDB v3, 1993 v4, 1994 v6, 1999 v7, 2001 v8, 2003 v9, 2006
MemSQL
IBM Solid DB

System/38 DB2 Transbase TinyDB EXASolution


EXASolution
(Transaction Software)
REDABAS (Robotron) dBase

dBase II, 1981 dBase III, 1984 dBase IV, 1988 Borland dBase Inc. InfiniDB Firebird

IBM IS1 dBase (Ashton Tate)


DB2 for LUW
InterBase Firebird v1, 2003 v1.5, 2004 v2, 2006 v2.0, 2010 dBase LLC
Ashton Tate
Groton Database Systems

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

Protect the Users

Not only SQL


The need for different data models and different performance priorities in modern
applications compelled the development of and use of NoSQL systems together with
relational database management systems.

Popular NoSQL systems include eXist-db, MongoDB (document databaes), neo4j


(graoph database), Couchbase (key-value store), Cassandra (wide-column store), etc.,
as well as geographical information systems (GIS), scientific databases, multimedia
databases, etc.

···
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion

Protect the Users

We are using SQLite and PostgreSQL.


Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion

Typical online transaction processing (OLTP) database applications include airline


reservation, banking, university, the e-shop around the corner and my address book.
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion

Typical online analytical processing (OLAP) database applications include business


analysis and reporting for auditing, forecasting and business intelligence.
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?

Primary memory is volatile. Secondary and tertiary memory is persistent.

Every data created by a successful SQL transaction is persistent.


Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion

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).

SQL allows to use these algorithms without implementing them

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

We mostly consider applications in which data comes in homogeneous collections.

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

first last district national


name name id

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

Homogenous Collections of Structured Data

Homogenous Collections of Structured Data


Since applications manipulate homogenous collection of structured data we can use a
model and a language as simple as the relational model and SQL.

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

Distributed and Concurrent Access

A database operation is an insertion, an update, a deletion or a query.

A database transaction is a logical unit of work carried out by a user or a client


application. It consists in the execution of a sequence of operations.
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion

Distributed and Concurrent Access

Distributed and Concurrent Access


How to resolve conflicts and maintain the integrity of data and when data is shared by
users and processes that are possibly distributed over a network?

In a nutshell, the solution offered by most database management systems is to serialise


all the operations in the different transactions to avoid conflicts.
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion

Distributed and Concurrent Access

Integrity and Recovery


How to maintain the integrity of data in spite of possible application, system, or media
failures?

Relational database management system maintain user-defined integrity constraints.

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

Distributed and Concurrent Access

Recovery: Atomicity
All actions in a transaction happen or none happen.

Concurrency Control : Consistency


If individual transactions would leave the application in a consistent state, a concurrent
execution should do the same.

Concurrency Control : Isolation


Transactions can be understood independently from each other.

Recovery: Durability (Persistence)


effects of successful transactions last
Long Long Time Ago Database Management Systems Database Applications Features and Requirements Conclusion

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

Database Management Systems by Raghu Ramakrishnan and Johannes Gehrke


Introduction to Database Systems by Stéphane Bressan and Barbara Catania
Copyright 2022 Stéphane Bressan. All rights reserved.

You might also like