Download Lecture1 - Blog.com

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Serializability wikipedia , lookup

Oracle Database wikipedia , lookup

Entity–attribute–value model wikipedia , lookup

IMDb wikipedia , lookup

Extensible Storage Engine wikipedia , lookup

Open Database Connectivity wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Concurrency control wikipedia , lookup

Relational model wikipedia , lookup

Database wikipedia , lookup

Clusterpoint wikipedia , lookup

ContactPoint wikipedia , lookup

Database model wikipedia , lookup

Transcript
Lecture1: Principles of Databases
Ref. Chapter1
1
Prepared by L. Nouf Almujally
• Problems with file-based approach
• 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.
Lecture1
Chapter1 - Objectives
2
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.
Limitations of File-Based Approach
• Separation and isolation of data
• Each program maintains its own set of data.
• Users of one program may be unaware of
potentially useful data held by other programs.
• Duplication of data
• Same data is held by different programs.
• Wasted space and potentially different values
and/or different formats for the same item.
Limitations of File-Based Approach
• Data dependence
• File structure is defined in the program code.
• Definition of data was embedded in application
programs, rather than being stored separately and
independently.
• Incompatible file formats
• Programs are written in different languages, and
so cannot easily access each other’s files.
Pearson Education © 2009
DATABASE APPROACH
Lecture1
Solution …
6
Data
• 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 …
Lecture1
• Data: Known facts that can be recorded and have an
implicit meaning. ex)What does 3421 means?
7
Data versus Information
 Data itself has no meaning without meta data which describes
data
 For example :
 Does not give us any information, but knowing the meta data
that explains data : Staff_ID, Phone Number, room number
Staff_ID
Phone Number
1012674
28761
Lecture1
 1012674, 28761, 153
room number
153
 Information : is the data you process in a manner
that makes it meaningful.
8
Database
 Database
Data: name
city
birth
Khaled Dammam 01/01/70
Sara
Abha
01/03/01
Metadata: name - string, length<10
city – string, length<15
birth – date, format DD/MM/YY
Lecture1
A collection of logically related data, including metadata
- ”data about data”, that describes data
Data is what you store in database
Information is what you retrieve from database
 Two examples
 all data required for the management of student records in a university.
 all data required for the management of books and borrowers in a
library.
9
 Numeric and Textual Databases
 Multimedia Databases
 Geographic Information Systems (GIS)
 Data Warehouses
 Real-time and Active Databases
Lecture1
Types of Databases
10
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)
 Grade Report
 Prerequiests
Lecture1
 Mini-world: Some part of the real world about which
data is stored in a database.
11
12
Lecture1
13
Lecture1
Example of a Database
(with a Conceptual Data Model)
 SECTIONs are of specific COURSEs
 STUDENTs take SECTIONs
 COURSEs have prerequisite COURSEs
 INSTRUCTORs teach SECTIONs
 COURSEs are offered by DEPARTMENTs
 STUDENTs major in DEPARTMENTs
Lecture1
 Some mini-world relationships:
14
 Database Management System (DBMS)
A software system that enables users to
create, maintain, and query the database
Most DBMSs now have facilities that make
data access fast, reliable, secure and easy
 Example DBMSs
Oracle
MS Access
MySQL
Lecture1
Database Management Systems
15
• Database Application : is a collection of data
and the programs that interacts with the
database by issuing an appropriate request
(typically an SQL statement) to the DBMS.
• built on top of DBMS
• to satisfy end users special requirements and
preference
Lecture1
Application programs
16
• 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
Lecture1
Examples of Database Applications
17
 Database System: The DBMS software together with
the data itself. Sometimes, the applications are also
included.
(DB + DBMS + Application program)
 To manage large amounts of data
 Efficiently
 Reliably
 Securely
 conveniently
Lecture1
Database System
18
19
Lecture1
Lecture1
Database Approach
20
• 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.
Lecture1
Main Characteristics of the Database
Approach
• Insulation between programs and data: Called programdata independence. Allows changing data storage
structures and operations without having to change the
DBMS access programs (application program).
21
• Data Abstraction: A data model is used to hide storage
details and present the users with a conceptual view of
the database.
Lecture1
Main Characteristics of the Database
Approach
• 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.
22
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
Pearson Education © 2009
23
 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.
 Transaction: executing program or process that
includes one or more database accesses, such as
reading or updating of DB record
 OLTP (Online Transaction Processing) is a major part of
database applications.
Lecture1
Main Characteristics of the Database
Approach
24
• 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
Lecture1
Components of DBMS Environment
25
Components of DBMS Environment
26
Database Users
Communicate
User
Requirement
Write
DB Designer
Application
programmer
Write
System Analyst
Lecture1
Procedure
Design
Program
Manage
Use
Naïve End User
Use
Sophisticated End
User
App
Program
DBA
DBMS
27
DB
H/W
Database Users
• System Analyst: Determine the user requirements
• Database Designers:
• responsible for defining the content, the structure,
the constraints, and functions or transactions
against the database.
Lecture1
and develop the system specifications.
• Application Programmer
•
•
Implement programs meet the end user needs
Test , debug , document, and maintain transactions
25
Database Users
•
•
•
•
authorizing access to the database
coordinating and monitoring the DB use
acquiring software, and hardware resources
monitoring efficiency of operations.
Lecture1
• Database administrators: responsible for:
25
Database 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.
Lecture1
• End-users: they use the data for queries, reports and
some of them actually update the database content.
• Categories of End-users:
25
Advantages of Using the Database
Approach
• Controlling redundancy in data storage and in
• Sharing of data among multiple users.
Lecture1
development and maintenance efforts.
• Restricting unauthorized access to data.
• Providing persistent storage for program Objects
• Providing Storage Structures for efficient Query
Processing
28
• Providing backup and recovery services.
• Providing multiple interfaces to different
classes of users.
• Enforcing integrity constraints on the
database.
Lecture1
Advantages of Using the Database
Approach
29
• Complexity
• Cost of DBMS
• Additional hardware costs
• Performance
• Higher impact of a failure
Lecture1
Disadvantages of Database Approach
33
34
Lecture1
References
• “Database Systems: A Practical Approach to
Design, Implementation and Management.”
Thomas
Connolly,
Carolyn
Begg.
5th Edition, Addison-Wesley, 2009.
Lecture1
• Main Reference:
• Supplementary:
• Fundamentals of Database Systems", Ramez
Elmasri, Shamkant B. Navathe, Addison Wesley,
The Latest Edition.
35