Upload
ashlyn-hawkins
View
217
Download
0
Tags:
Embed Size (px)
Citation preview
Lecture1: Principles of Databases
Prepared by L. Nouf Almujally
1
Ref. Chapter1
Chapter1 - Objectives
• Meaning of the term database.• Meaning of the term Database Management System
(DBMS).• Major components of the DBMS environment.• Users involved in the DBMS environment.• Advantages and disadvantages of DBMSs.
Lect
ure
1
2
Data• Data: Known facts that can be recorded and have an
implicit meaning. ex)What does 3421 means?• facts about entities • Person's name, Phone, address, email, picture, …• Student's ID, name, subjects taken, results,…• Product's name, description, manufacturer, price,…• Book's publisher, author, title,…
• facts about relationships• BADER lives in Riyadh• Nora bought a book from university books shop on
01/03/11• Notice the different types of data
• numbers, strings, text, date, time, timestamp, • Text, picture, audio, video, graphics …
Lect
ure
1
3
Data versus InformationData itself has no meaning without meta data which describes
data For example :
1012674, 28761, 153Does not give us any information, but knowing the meta data
that explains data : Staff_ID, Phone Number, room number
Information : is the data you process in a manner that makes it meaningful.
Lect
ure
1
4
Staff_ID Phone Number room number1012674 28761 153
DatabaseDatabase
A collection of logically related data, including metadata - ”data about data”, that describes data
Data: name city birth Metadata: name - string, length<10 Khaled Dammam 01/01/70 city – string, length<15 Sara Abha 01/03/01 birth – date, format DD/MM/YY
Data is what you store in databaseInformation is what you retrieve from database
Two examplesall data required for the management of student records in a university.all data required for the management of books and borrowers in a
library.
Lect
ure
1
5
Types of Databases
Numeric and Textual DatabasesMultimedia DatabasesGeographic Information Systems (GIS)Data WarehousesReal-time and Active Databases Le
cture
1
6
Example of a Database(with a Conceptual Data Model)Mini-world: Some part of the real world about
which data is stored in a database. Mini-world for the example: Part of a UNIVERSITY
environment.
Some mini-world entities:STUDENTsCOURSEsSECTIONs (of COURSEs)Grade ReportPrerequiests
Lect
ure
1
7
Lect
ure
1
8
Lect
ure
1
9
Example of a Database(with a Conceptual Data Model)Some mini-world relationships:
SECTIONs are of specific COURSEsSTUDENTs take SECTIONsCOURSEs have prerequisite COURSEsINSTRUCTORs teach SECTIONsCOURSEs are offered by DEPARTMENTsSTUDENTs major in DEPARTMENTs
Lect
ure
1
10
Lect
ure
1
11
Database Management Systems
Database Management System (DBMS) A software system that enables users to
create, maintain, and query the databaseMost DBMSs now have facilities that make
data access fast, reliable, secure and easy
Example DBMSsOracle MS AccessMySQL
Lect
ure
1
12
Functions of a DBMS
• Data Storage, Retrieval, and Update.• Storing data definition in the form of data dictionary• Transaction Support • Transaction: executing program or process that
includes one or more database accesses, such as reading or updating of DB record
• Concurrency Control Services.• Recovery Services.• Security protection against unauthorized access.• Maintain and develop the database system
Lect
ure
1
13
Application programs
• Database Application : is a collection of data and the programs that allow the manipulation of these data to meet the information needs by an enterprise.• built on top of DBMS• to satisfy end users special requirements and
preference
Lect
ure
1
14
Examples of Database Applications
• Purchases from the supermarket• PNU Student Registration • PNU Library• Saudi Airline Reservation• Purchases using your credit card • Booking a holiday at the travel agents• Using the Internet
Lect
ure
1
15
Database SystemDatabase System: The DBMS software together with
the data itself. Sometimes, the applications are also included.
(DB + DBMS + Application program)
To manage large amounts of dataEfficientlyReliablySecurelyconveniently
Lect
ure
1
16
Lect
ure
1
17
Database Approach
Lect
ure
1
18
Main Characteristics of the Database Approach
• Self-describing nature of a database system: A DBMS catalog stores the description of the database. The description is called meta-data). This allows the DBMS software to work with different databases.
• Insulation between programs and data: Called program-data independence. Allows changing data storage structures and operations without having to change the DBMS access programs (application program).
Lect
ure
1
19
Main Characteristics of the Database Approach
• Data Abstraction: A data model is used to hide storage details and present the users with a conceptual view of the database.
• 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.
Lect
ure
1
20
Views
• Allows each user to have his or her own view of the database.• A view is essentially some subset of the
database. • Benefits:• Reduce complexity• Provide a level of security• Present a consistent, unchanging picture of the
structure of the database, even if the underlying database is changed 21
Pearson Education © 2009
Main Characteristics of the Database Approach
Sharing of data and multiuser transaction processing : allowing a set of concurrent users to retrieve and to update the database. Concurrency control within the DBMS guarantees that each transaction is correctly executed or completely aborted.OLTP (Online Transaction Processing) is a major part of
database applications.
Lect
ure
1
22
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.
• Providing persistent storage for program Objects
• Providing Storage Structures for efficient Query
Processing
Lect
ure
1
28
Advantages of Using the Database Approach
• Providing backup and recovery services.• Providing multiple interfaces to different
classes of users.• Representing complex relationships among
data.• Enforcing integrity constraints on the
database.
Lect
ure
1
29
Disadvantages of Database Approach
• Complexity• Cost of DBMS• Additional hardware costs• Performance• Higher impact of a failure Le
cture
1
25
Components of DBMS Environment
• Hardware• Can range from a PC to a network of computers.
• Software• DBMS, operating system, network software (if
necessary) and also the application programs.• Data• Procedures• Instructions and rules that should be applied to the
design and use of the database and DBMS.• People
Lect
ure
1
26
Components of DBMS Environment
27
Lect
ure
1
28
DBMSApp
Program
DB
UserRequirement
Procedure
DBA
Naïve End User
Applicationprogrammer
DB DesignerSystem Analyst
Sophisticated End User
H/W
Design
Communicate
Manage
Write Write
Program
Use
Use
Database Users
Database Users
• System Analyst: Determine the user requirements and develop the system specifications.
• Database Designers:• responsible for defining the content, the structure,
the constraints, and functions or transactions against the database.
• Application Programmer• Implement programs meet the end user needs• Test , debug , document, and maintain transactions
Lect
ure
1
25
Database Users
• Database administrators: responsible for:• authorizing access to the database• coordinating and monitoring the DB use• acquiring software, and hardware resources• monitoring efficiency of operations. Le
cture
1
25
Database Users• End-users: they use the data for queries, reports and
some of them actually update the database content.• Categories of End-users:
Naïve : (Queries / modifies data)- 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: bank-tellers or reservation clerks.Sophisticated : Forms requests in a database query
language.
Lect
ure
1
25
Lect
ure
1
32
References
• “Database Systems: A Practical Approach to Design, Implementation and Management.”Thomas Connolly, Carolyn Begg.5th Edition, Addison-Wesley, 2009.
• Fundamentals of Database Systems", Ramez Elmasri, Shamkant B. Navathe, Addison Wesley, The Latest Edition.
Lect
ure
1
33