Lecture 1
Introduction to Databases
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 6- 1
Recent Developments (1)
Social Networks started capturing a lot of
information about people and about
communications among people-posts, tweets,
photos, videos in systems such as:
- Facebook
- Twitter
- Linked-In
All of the above constitutes data
Search Engines, Google, Bing, Yahoo: collect
their own repository of web pages for searching
purposes Slide 1- 2
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe
Recent Developments (2)
New Technologies are emerging to manage vast
amounts of data generated on the web:
Big Data storage systems involving large clusters
of distributed computers (Chapter 25)
NOSQL (Non-SQL, Not Only SQL) systems
(Chapter 24)
A large amount of data now resides on the
“cloud” which means it is in huge data centers
using thousands of machines.
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 1- 3
Basic Definitions
Database:
A collection of related data.
Data:
Known facts that can be recorded and have an implicit meaning.
Eg. Telephone Number, Name. Data have little meaning unless
organized in some logical manner
Mini-world:
Some part of the real world about which data is stored in a
database. For example, student grades and transcripts at a
university.
Database Management System (DBMS):
A software package/system to facilitate the creation and
maintenance of a computerized database.
Database System:
The DBMS software together with the data itself. Sometimes, the
applications are also included.
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 1- 4
Simplified database system environment
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 1- 5
Impact of Databases and Database
Technology
Businesses: Banking, Insurance, Retail,
Transportation, Healthcare, Manufacturing
Service industries: Financial, Real-estate, Legal,
Electronic Commerce, Small businesses
Education : Resources for content and Delivery
More recently: Social Networks, Environmental
and Scientific Applications, Medicine and
Genetics
Personalized applications: based on smart mobile
devices
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 1- 6
What a DBMS does to make things
easier
Define a particular database in terms of its data types,
structures, and constraints
Construct or load the initial database contents on a
secondary storage medium
Manipulating the database:
Retrieval: Querying, generating reports
Modification: Insertions, deletions and updates to its content
Accessing the database through Web applications
Processing and sharing by a set of concurrent users and
application programs – yet, keeping all data valid and
consistent
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 1- 7
Other DBMS Functionalities
DBMS may additionally provide:
Protection or Security measures to prevent
unauthorized access
“Active” processing to take internal actions on data
Presentation and visualization of data
Maintenance of the database and associated
programs over the lifetime of the database
application
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 1- 8
Application Programs and DBMS
Applications interact with a database by
generating
- Queries: that access different parts of data and
formulate the result of a request
- Transactions: that may read some data and
“update” certain values or generate new data and
store that in the database
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 1- 9
Example of a Database
(with a Conceptual Data Model)
Mini-world for the example:
Part of a UNIVERSITY environment
Some mini-world entities:
STUDENTs
COURSEs
SECTIONs (of COURSEs)
(Academic) DEPARTMENTs
INSTRUCTORs
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 1- 10
Example of a Database
(with a Conceptual Data Model)
Some mini-world relationships:
SECTIONs are of specific COURSEs
STUDENTs take SECTIONs
COURSEs have prerequisite COURSEs
INSTRUCTORs teach SECTIONs
COURSEs are offered by DEPARTMENTs
STUDENTs major in DEPARTMENTs
Note: The above entities and relationships are typically
expressed in a conceptual data model, such as the
ENTITY-RELATIONSHIP data model (see Chapters 3, 4)
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 1- 11
Example of a Simple Database
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 1- 12
Main Characteristics of the Database
Approach
Self-describing nature of a database system:
A DBMS catalog stores the description of a particular
database (e.g. data structures, types, and constraints)
The description is called meta-data*.
This allows the DBMS software to work with different
database applications.
Insulation between programs and data:
Called program-data independence.
Allows changing data structures and storage organization
without having to change the DBMS access programs
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 1- 13
Example of a Simplified Database Catalog
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 1- 14
Main Characteristics of the Database
Approach (continued)
Data Abstraction:
A data model is used to hide storage details and
present the users with a conceptual view of the
database.
Programs refer to the data model constructs rather
than data storage details
Support of multiple views of the data:
Each user may see a different view of the
database, which describes only the data of
interest to that user.
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 1- 15
Main Characteristics of the Database
Approach (continued)
Sharing of data and multi-user transaction
processing:
Allowing a set of concurrent users to retrieve from and to
update the database.
Concurrency control within the DBMS guarantees that each
transaction is correctly executed or aborted
Recovery subsystem ensures each completed transaction
has its effect permanently recorded in the database
OLTP (Online Transaction Processing) is a major part of
database applications. This allows hundreds of concurrent
transactions to execute per second.
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 1- 16
Advantages of Using the Database
Approach
Controlling redundancy in data storage and in
development and maintenance efforts.
Sharing of data among multiple users.
Restricting unauthorized access to data. Only the
DBA staff uses privileged commands and
facilities.
Providing persistent storage for program Objects
E.g., Object-oriented DBMSs make program
objects persistent– see Chapter 12.
Providing storage structures (e.g. indexes) for
efficient query processing – see Chapter 17.
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 1- 17
Advantages of Using the Database
Approach (continued)
Providing optimization of queries for efficient
processing
Providing backup and recovery services
Representing complex relationships among data
Enforcing integrity constraints on the database
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 1- 18
Database Design
Focuses on the design of the database structure
that will be used to store and manage end-user
data
Well-designed database
Facilitates data management
Generates accurate and valuable information
Poorly designed database causes difficult-to-
trace errors
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe 19
Figure1.6 - A Simple File System
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe 20
Figure 1.8 - Contrasting Database and
File Systems
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe 21
Contrasting Database and File
Systems
File System Database Management System
A file system is a software application A database management system, or
that organizes and maintains files on DBMS, is a software application that
a storage device. It manages the allows you to access, create, and
storage and retrieval of data. manage databases.
The database is a software
application and is not shipped as a
The file system is more related to an part of the operating system. It is
operating system and is shipped as a more about organizing the data and
part of the operating system itself. implementing techniques to keep the
data consistent and to have faster
access to the data.
The use of a database management
A file system does not allow for system is efficient because there are
efficient data storage and retrieval. numerous techniques for storing and
retrieving data.
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe
Contrasting Database and File
Systems
It does not provide data recovery In DBMS, there is a backup recovery
services. option for data.
There is no crash recovery A crash recovery method is provided
mechanism in the file system. by DBMS.
A good protection method is provided
It’s difficult to keep a file system safe.
by DBMS.
Redundancy is minimized to a great
Data redundancy is higher in a file
extent in a database management
management system.
system.
The file system has a higher level of
data inconsistency. Same data might
A database management system has
be stored at multiple places yet have
a low level of data inconsistency.
different values leading to data
inconsistency.
Concurrency is not available in this A concurrency facility is provided by a
system. database management system.
It is less expensive than a database
It is costlier than that of a file system.
management system.
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe
Figure 1.9 - The Database System
Environment
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe 24
25
Table 1.3 - Database Career Opportunities
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe