Uploaded by Rifat Hassan

L1 Database and Database Users

advertisement
Databases and Database Users
Lecture 1
Topics covered
•
•
•
•
•
•
Database concept
DBMS
University database
Query
Characteristics of DB
Advantage
2
Database: Traditional Database Application
Banking
Online Shopping
Airline Reservation
In which most of the information that’s
stored and accessed is either textual or
numeric
3
Multimedia Database Application
Stored Video
Thumb Print
4
Different Applications of Database
• Geographic Information System (GIS): Store and analyze maps,
weather data and satellite images
• Online Analytical Processing (OLAP): Extract and analysis business
information to support decision making
OLAP
GIS
5
Different Applications of Database: Internet
Popular Web Sites
6
Use of Database
• Almost all areas where computer is used:
Business
Electronic Commerce (E-commerce)
Engineering
Medicine
Genetics
Law
Education
Library Science etc...
7
Database
• Collection of related data.
• Data: Known facts that can be recorded and have implicit
meaning i.e. name, address, telephone numbers.
• So, Collection of related data with an implicit meaning is a
database.
8
Database Properties
•
Represent some aspects of real world (miniworld or universe of discourse -UoD).
[Source]
Changes in miniworld reflected in DB (Database) i.e. got promotion.
•
Logically coherent collection of data with inherent meaning. [Interaction With Real
World]
•
Designed, build and populated with data for a specific purpose for intended group
of users. [Audience]
Large Commercial Database: Amazon.com
• Contains: 20 million books, CDs, videos, games, electronic and other items
• Database Size: 2 terabytes
• Server: 200
• Visitors: 15 million/day
9
Database Management System
• Collection of programs that enables user to create and maintain database
Purpose
Defining, Constructing, Manipulating, Sharing among users
• Defining or meta-data: Specifying data types, structure, length, field,
column and etc.
• Constructing: Process of storing data
• Manipulating: Querying data to retrieve, updating and generating reports.
• Sharing: Allows multiple users and programs
10
Application Program
• Access database by sending queries or request for data to the DBMS
• Application terms
Query: Cause some data to be retrieve
Transaction: Cause some data to be read and written into DB
• Protection
System Protection: Against Hardware and Software crash
Security Protection: Against unauthorized and malicious access
11
Database System: DB and DBMS
12
Example: UNIVERSITY Database Tables
13
UNIVERSITY Database
• Data Records: Records of same type i.e. STUDENT table stores data on
each student
• Data Elements: Represent the incident i.e. STUDENT table stores data
to represent name, Student_number, class and major
• Data Types: Represent the type of data i.e. Name of student is a String
of alphabetic characters or Grade can be a single Character such as A,
B, C.
14
Relationship Concept
15
Relationship Concept
16
Querying and Updating Concept
Query
• Retrieve the transcript – a list of all courses and grades of “Smith” of Fall 08
Name
Student_number
Course_name
Course_code
Section_identifier
Grade
Smith
17
Discrete
Mathametics
MATH2410
112
B
Smith
17
Intro to
Commputer
Science
CS1310
119
C
• List the names of students who took the section of the “Database” course
offered in fall 2008 and their grades in that section
Name
Student_number
Course_name
Course_code
Section_identifier
Grade
17
Querying and Updating Concept
Query
• List the names of students who took the section of the “Data Structure”
course offered in spring 2008 and their grades in that section
Name
Student_number
Course_name
Course_code
Section_identifier
Grade
Course_name
Course_code
Section_identifier
Grade
• Transcript of Fall 2008
Name
Student_number
18
Querying and Updating Concept
Update
• Create new section for the Database course for this semester
• Enter a grade of “A” for Smith in “Database” section of Fall’09
Solution
Enter the course info in SECTION table
Than, enter grade on GRADE_REPORT table
19
Phases: Designing A Database
• Requirement specification and analysis
– Requirements are documented
• Conceptual design
– Using tools for maintain, modify and transform into DB [ER]
• Logical design
– Using data model (RDMS)
• Physical design
– Storing and accessing DB
20
Characteristics of DB
• Self describing nature
– Meta data or Database catalog
• Insulation between programs and data, and data abstraction
– Program data independence
• Support for multiple views
– Virtual data
• Sharing and multiuser transaction
– Multi user access at a time
– Transaction: executing program through reading, updating
21
Actors
• Database administrator
– Oversee and manage the recourse
– Authorising access, coordinating
– Prevent security breaches
• Database designer
– Design and choose appropriate structure
– Identifying data and relationships
• Software engineer
– Analyse end user requirements
– Develop application program
• End user
– Querying, updating and generating reports
22
Advantages
•
•
•
•
•
•
•
Controlling redundancy
Restricting unauthorised access
Efficient query processing
Backup and recovery
Multiple user interface
Representing complex relationship
Flexibility
23
Homework
Think and write about another database and that’s table
24
Meta Data
BACK
25
Multi view: Different from one another
BACK
26
Download