1 Bit 20803 Chapter 1 Dbconcepts
1 Bit 20803 Chapter 1 Dbconcepts
1 Bit 20803 Chapter 1 Dbconcepts
Chapter 1
Chapter 1 - Objectives
• Introduction to database
• File-based systems.
• Common uses of database systems.
• Database model
Introduction to database
BIT 20803 3
Introduction to database
• A database is a collection of information that is stored electronically.
• This information could be anything from a list of customer names and
addresses to a collection of scientific data.
• Databases are used to organize and manage large amounts of
information in a way that makes it easy to find and use.
• helpful for businesses, organizations, and individuals who need to keep track
of lots of information, such as customer orders, inventory, or financial data.
• Databases are created and managed using specialized software called
database management systems (DBMS).
• help to ensure that the data is organized, secure, and easily accessible to
those who need it.
BIT 20803 4
Database Prehistory
Early Automation
• Data management and
application code were all
tangled together
• Hard to modify Data entry Storage and retrieval
• Hard to generalize
• Many competing approaches
• Data manipulation code
written at very low levels of
abstraction
5
The history
6
E. F. Codd
• Edgar F. "Ted" Codd ( August 23, 1923 - April 18, 2003) was a
British computer scientist who invented relational databases while
working for IBM.
• He was born in Portland, Dorset, studied maths and chemistry at
Oxford. He was a pilot in the Royal Air Force during WWII.
• In 1948 he joined IBM in New York as a mathematical
programmer. He fled the USA to Canada during the McCarthy
period.
• Later, he returned to the USA to earn a doctorate in CS from the
University of Michigan in Ann Arbor. He then joined IBM research
in San Jose.
• His 1970 paper “A Relational Model of Data for Large Shared Data
Banks” changed everything.
• In the mid 1990’s he coined the term OLAP.
7
History of Database Systems
• First-generation
• Hierarchical and Network
• Limitation
• Complex program for simple query
• Minimum data independence
• No theoretical foundation
• Second generation
• Relational
• Limitation
• Limited data modeling
• Third generation
• Object-Relational
• Object-Oriented
First Generation of DB
Hierarchical Network
• One-to-many relationships.
• Similar to the hierarchical
• A hierarchical database model is a data model where
data is stored as records but linked in a tree-like model but records are
structure organized differently
• Each record has only one parent. The first record of the
data model is a root record • allows each record to have
multiple parents and
multiple child records. A
network database allows
flexible relationship model
between entities.
9
Relational Model
• The relational model (RM) for database management
is an approach to manage data using a structure and
language consistent with first-order predicate logic,
first described in 1969 by Edgar F. Codd.
• Uses a two-dimensional table of rows and columns of
data
• Rows are records
• Columns are fields
• Primary key
• Uniquely identifies every record in a relational database
• Foreign key
• Field in a relational table that matches the primary key column of another table
• Used to cross-reference tables
• Normalization
• Improves database efficiency by eliminating redundant data
• Ensures that only related data is stored in a table
• Goes through different stages from first normal form (1NF) to fifth normal form (5NF)
Database Evolution
11
File-Based Systems
• Collection of application programs that perform services for the end users (e.g. reports).
• Each program defines and manages its own data.
File-Based Processing
Limitations of File-Based Approach
• Separation and isolation of data • Data dependence
• Each program maintains its own set of • File structure is defined in the program
data. code.
• Users of one program may be unaware of
potentially useful data held by other • Incompatible file formats
programs.
• Programs are written in different
languages, and so cannot easily access
• Duplication of data each other’s files.
• Same data is held by different programs.
• Wasted space and potentially different • Fixed Queries of application programs
values and/or different formats for the • Programs are written to satisfy particular
same item. functions.
• Any new requirement needs a new
program.
• Arose because:
• Definition of data was embedded in application programs, rather than being stored
separately and independently.
• No control over access and manipulation of data beyond that imposed by application
programs.
• Result:
• the database and Database Management System (DBMS).
15
Difference between File System and DBMS:
16
Database
https://budibase.com/blog/best-database-management-software/
20
Recommended Reading
• Connoly, T. & Begg, C., (2018). Database system: a practical approach to design, implementation and
management. 6th ed. New York: Addison-Wesley
• Carlos Coronel & Steven Morris (2018) Database Systems: Design, Implementation, & Management 13th Edition.
Cengage Learning
• Hoffer, Jeffrey A, (2016). Modern Database Management 12th ed. Pearson Education Limited. Call Number:
QA76.9.D3.H64 2016
• Nenad Jukic, Susan Vrbsky & Svetlozar Nestorov (2016). Database Systems: Introduction to Databases and Data
Warehouses. Pearson.
• Silberschatz, A., Korth, H. & Sudarshan, S., (2011). Database system concepts. 6th ed. New York: McGraw-Hill. Call
Number: QA76.9.D3 .K69 2011.
• Date, “An introduction to database systems”, 8th ed.
• Elmasri & Navathe, “Fundamentals of database systems”, 4th ed.
• Silberschatz, Korth & Sudarshan, “Database system concepts”, 4th ed.
• Ullman & Widom, “A first course in database systems”.
21
It is common to describe databases in two ways
system
• How files are organised, what indexing mechanisms are used, …
22
Three-level architecture
External External External
…
Schema 1 Schema 2 Schema n
External
Conceptual level
Conceptual
level Schema
Physical Internal
level Schema
23
Data independence is the ability to change
the schema at one level of the database
system without changing the schema at the
next higher level
Logical and Logical data independence is the capacity to
change the conceptual schema without
physical data changing the user views
independence
Physical data independence is the capacity
to change the internal schema without
having to change the conceptual schema or
user views
24
Database design process
• Requirements analysis
• User needs; what must database do?
• Conceptual design
• High-level description; often using E/R model
• Logical design
• Translate E/R model into (typically) relational schema
• Schema refinement
• Check schema for redundancies and anomalies
• Physical design/tuning
• Consider typical workloads, and further optimise
25
Examples of Database Applications
30
Functions of a DBMS
31
Data definition language (DDL)
Data manipulation language (DML)
34
Roles in the
Database
Environment
• There are five distinct types of
people that participate in the
DBMS environment:
• Data Administrator (DA)
• Database Administrator
(DBA)
• Database Designers (Logical
and Physical)
• Application
Programmers/developers
• End Users (naive and
sophisticated)
Advantages of DBMSs
• Complexity
• Size
• Cost of DBMS
• Additional hardware costs
• Cost of conversion
• Performance
• Higher impact of a failure
Document oriented DB
CURRENT • XML
TRENDS • Mongo DB
Mobile DB
• Stationary database that can be connected to by a
mobile computing device
• Eg: Sybase SQL Anywhere, Oracle Lite, Microsoft SQL
Server Compact, SQLite
Important terms
Let’s recap
Database system is computerized system, whose overall
purpose is to maintain the information and to make that the
information is available on demand.