0% found this document useful (0 votes)
13 views36 pages

Lect 1 - Chapter 01 - Introduction Databases and Database Users

Uploaded by

Zeyad Hamza
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
13 views36 pages

Lect 1 - Chapter 01 - Introduction Databases and Database Users

Uploaded by

Zeyad Hamza
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 36

Database Systems

Dr. Huda Amin


huda_amin@cis.asu.edu.eg
Dr. Nivin Atef
nivin.atef@cis.asu.edu.eg
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 2
Grades Distribution

➢ Grades distribution: Total 100 Grade


➢ Final exam: 50
➢ Year Work: 50
➢ 15 Midterm
➢ 20 Practical
➢ 10 Year work (Project)
➢ 5 Quiz

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe


Course Contents
◼ Introduction to Database and Database Users
◼ DBMS data models, DBMS as a software architecture
◼ Entity-Relationship (ER) Model
◼ Enhanced ERD
◼ Relational Data Model
◼ Mapping of an ER schema into a relational schema
◼ Database Normalization
◼ Relational Algebra
◼ Indexing Structures for Files
◼ Algorithms for Query Processing and Optimization

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe


Chapter 1
Introduction: Databases and
Database Users

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe


Introduction
◼ Databases and database systems are an
essential component of life in modern society:
◼ Most of us encounter several activities every day
that involve some interaction with a database.
◼ Databases play a critical role in almost all areas
where computers are used
◼ Including business, electronic commerce,
engineering, medicine, genetics, law and
education.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 6


Outline
◼ Types of Databases and Database Applications
◼ Basic Definitions
◼ Typical DBMS Functionality
◼ Example of a Database (UNIVERSITY)
◼ Main Characteristics of the Database Approach
◼ Database Users
◼ Advantages of Using the Database Approach
◼ When Not to Use Databases

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 7


Types of Databases

◼ Traditional database applications store textual or numeric


information.
◼ Multimedia databases store images, audio clips, and video
streams digitally.
◼ Geographic information systems (GIS) can store and
analyze maps, weather data, and satellite images.
◼ Data warehouses and online analytical processing
(OLAP) systems are used to extract and analyze useful
business information from very large databases to support
decision making.
◼ Real time databases are used to control industrial and
manufacturing processes. For example, a stock market
changes very rapidly and is dynamic.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 8
Basic Definitions
◼ Database:
◼ A collection of related data.

◼ Data:
◼ Known facts that can be recorded and have an implicit meaning.

◼ Mini-world:
◼ Represents some aspects of the real world. For example, student
grades and transcripts at a university.
◼ In order for a database to be accurate and reliable at all times, it
must be a true reflection of the mini-world that it represents.

◼ Transaction
◼ It is an executing program or process that includes one or more
database accesses, such as reading or updating of database
records.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 9
Example of a simple database

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 10


A database can be of any size and complexity
For example:
◼ The list of names and addresses (of people you
know) may consist of only a few hundred
records, each with a simple structure.

◼ On the other hand, the computerized catalog of


a large library may contain half a million entries
organized under different categories—by primary
author’s last name, by subject, by book title—with
each category organized alphabetically.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 11


A database can be of any size and complexity
An example of a large commercial database is
Amazon.com.
◼ It contains data for over 20 million books, CDs, videos,
DVDs, games, electronics, apparel, and other items.
◼ The database occupies over 2 terabytes (a terabyte is
1012 bytes worth of storage) and is stored on 200 different
computers (called servers).
◼ About 15 million visitors access Amazon.com each day
and use the database to make purchases.
◼ The database is continually updated as new books and
other items are added to the inventory and stock
quantities are updated as purchases are transacted.
◼ About 100 people are responsible for keeping the Amazon
database up-to-date.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 12
Basic Definitions

◼ Database Management System (DBMS):


◼ A software system to facilitate the creation and
maintenance of a computerized database.

◼ Database System:
◼ The DBMS software together with the
database itself. Sometimes, the applications
are also included.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 13


Simplified database system environment

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 14


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 © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 15


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

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 16


Example of a simple database

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 17


Typical DBMS Functionality
◼ 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 © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 18
Typical DBMS Functionality
◼ Other features:
◼ Protection or Security measures to prevent
unauthorized access
◼ “Active” processing to take internal actions on
data
◼ Presentation and Visualization of data
◼ Maintaining the database and associated
programs over the lifetime of the database
application
◼ Called database, software, and system
maintenance
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 19
Main Characteristics of the Database
Approach
◼ Database approach vs. file processing
approach!
◼ Inconsistency
◼ Redundancy
◼ Waste storage
◼ Much effort to maintain updates

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 20


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.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 21


Example of a simplified database catalog

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 22


Main Characteristics of the Database
Approach
◼ Insulation between programs and data:
◼ Called program-data independence.

◼ Allows changing data structures and storage


organization without having to change the DBMS access
programs.

◼ 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

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 23


Main Characteristics of the Database
Approach (continued)
◼ 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.

◼ A view may be a subset of the database, or it


may contain virtual data that is derived from the
database files but is not explicitly stored.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 24


Multiple views of the data

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 25


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
◼ For example, when several reservation agents try to assign a seat on
an airline flight, the DBMS should ensure that each seat can be
accessed by only one agent at a time for assignment to a passenger.
◼ 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 © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 26


Database Users
◼ Users may be divided into
◼ Those who actually use and control the database
content, and those who design, develop and
maintain database applications (called “Actors on
the Scene”), and
◼ Those who design and develop the DBMS
software and related tools, and the computer
systems operators (called “Workers Behind the
Scene”).

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 27


Database Users
◼ Actors on the scene
◼ Database administrators:
◼ Responsible for authorizing access to the
database, for coordinating and monitoring its use,
acquiring software and hardware resources,
controlling its use and monitoring efficiency of
operations.
◼ Database Designers:
◼ Responsible to define the content, the structure,
the constraints, and functions or transactions
against the database. They must communicate
with the end-users and understand their needs.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 28
Categories of End-users
◼ Actors on the scene (continued)
◼ End-users: They use the data for queries, reports
and some of them update the database content.
End-users can be categorized into:
◼ Casual: access database occasionally when
needed
◼ Naïve or Parametric: they make up a large section
of the end-user population.
◼ They use previously well-defined functions in the form of
“canned transactions” against the database.
◼ Examples are bank-tellers or reservation clerks who do
this activity for an entire shift of operations.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 29


Categories of End-users (continued)
◼ Sophisticated:
◼ These include business analysts, scientists, engineers,
others thoroughly familiar with the system capabilities.
◼ Many use tools in the form of software packages that work
closely with the stored database.
◼ Stand-alone:
◼ Mostly maintain personal databases using ready-to-use
packaged applications.
◼ An example is a tax program user that creates its own
internal database.
◼ Another example is a user that maintains an address book

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 30


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.


◼ Unauthorized access: For example, financial data is often considered
confidential, and only authorized persons are allowed to access such
data. Some users may only be permitted to retrieve data, whereas others
are allowed to retrieve and update.

◼ Providing Storage Structures (e.g. indexes) for


efficient query processing.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 31
Advantages of Using the Database
Approach (continued)
◼ Providing backup and recovery services.
For example, if the computer system fails in the middle of a
complex update transaction, the recovery subsystem is
responsible for making sure that the database is restored to
the state it was in before the transaction started executing.

◼ Providing multiple interfaces to different classes of users.

◼ Representing complex relationships among data.

◼ Enforcing integrity constraints on the database

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 32


Additional Implications of Using the
Database Approach
◼ Potential for enforcing standards:
◼ This is very crucial for the success of database
applications in large organizations. Standards
refer to data item names, display formats, screens,
report structures, meta-data (description of data),
Web page layouts, etc.

◼ Reduced application development time:


◼ Incremental time to add each new application is
reduced.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 33


Additional Implications of Using the
Database Approach (continued)
◼ Flexibility to change data structures:
◼ Database structure may evolve as new
requirements are defined.

◼ Availability of current information:


◼ Extremely important for on-line transaction
systems such as airline, hotel, car reservations.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 34


When not to use a DBMS
◼ When a DBMS may be unnecessary:
◼ If the database and applications are simple, well
defined, and not expected to change
◼ If there are severe real-time requirements that may
not be met because of DBMS overhead
◼ If there are embedded systems with limited storage
capacity, where a general-purpose DBMS would not fit
◼ If access to data by multiple users is not required
◼ Main inhibitors (costs) of using a DBMS: Overhead for
providing generality, security, concurrency control,
recovery, and integrity functions.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 35


Summary
◼ Types of Databases and Database Applications
◼ Basic Definitions
◼ Typical DBMS Functionality
◼ Example of a Database (UNIVERSITY)
◼ Main Characteristics of the Database Approach
◼ Database Users
◼ Advantages of Using the Database Approach
◼ When Not to Use Databases

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 36

You might also like