Professional Documents
Culture Documents
Topic 7 Database
Topic 7 Database
LEARNING OUTCOME:
At the end of this topic, students should be able to: 1. Define database and Database Management System. 2. List advantages and disadvantages Of database.
2
Definition of Database
Collection of data organized in a manner that allows access, retrieval, and use of that data.
4
Data
VS
Information
Data
Information
Data VS Information
Data is a collection of unprocessed items, which can include text, numbers, images, audio, and video. Information is processed data; that is, it is organized, meaningful, and useful.
Databases, Data & Information Valuable information should have the following characteristics:
10
Payroll System Driving Institute Database System Grading System Air Ticket Booking System Library System Database System for Patients
11
Databases
12
Web Databases
13
Database Administrator
14
Advantages of Database
1) Reduced Data Redundancy - Most data items are stored in only one file, which greatly reduces duplicate data.
1) Improved Data Integrity - When users modify data in the database, they make changes to one file instead of multiple files.
15
Advantages of Database
3) Shared Data - The data in a database environment belongs to and is shared, usually over a network. 4) Easier Access - The database approach allows nontechnical users to access and maintain data.
16
Advantages of Database
5) Reduced Development Time - It often is easier and faster to develop programs that use the database approach.
17
Disadvantages of Database
1) Database systems are complex, difficult, and time consuming to design. 1) Substantial hardware and software start-up cost. 1) Damage to database affects virtually all applications program.
18
Disadvantages of Database
4) Extensive conversion costs in moving from a file-based system to a database system. 5) Initial training required for all programmers and users
19
20
Definition of DBMS
Database software, often called a database management system (DBMS) that allows user to; - create a computerized database - add, modify, and delete data. - sort and retrieve data. - create forms and reports from the data.
21
Components of DBMS
22
Components of DBMS
We can identify five (5) major component in DBMS environment : 1. Hardware The computer systems that the database systems runs on. 2. Software The DBMS software and the database application including operating system and network software.
23
Components of DBMS
3. Data operational data and metadata.
4. Procedures The instruction and rules that govern the design and use of database.
5. People Includes the business analysts, database designers, Database Analysts (DAs), Database Administrartors (DBAs), application programmers, end-users.
24
25
Advantages of DBMS
1) Warehouse of Information - large amount of data can be stored 1) Controlling data redundancy - the information in it appears just once 2) Program and file consistency - file formats and system programs are standardized. 3) Accuracy - up-to-date data is a sign of data integrity 4) User-friendly - Data is easier to access and manipulate 5) Improved security - Only an authorized user can access system.
26
Disadvantages of DBMS
1) Cost - Implementing a DBMS system can be expensive
and time-consuming, especially in large organizations. Training requirements alone can be quite costly.
SUMMARY:
1. Definition of database and DBMS
CHAPTER 7: DATABASE
7.2 Basic Concept of Database
29
LEARNING OUTCOME:
At the end of this topic, students should be able to: 1. Explain the basic concept of database
30
Data Hierarchy - Field - Record - Table Entity Relationship Data Type Data Dictionary
31
DATA HIERACHY
32
DATA HIERACHY
All access to data starts at the top of the hierarchy and moves downward; for example, from customer to orders, vendor to purchases
33
DATA HIERACHY
34
DATA HIERACHY
35
36
ENTITY RELATIONSHIP
data.
37
ENTITY RELATIONSHIP
38
ENTITY RELATIONSHIP
39
ENTITY RELATIONSHIP
40
ENTITY RELATIONSHIP
41
ENTITY RELATIONSHIP
42
ENTITY RELATIONSHIP
43
DATA TYPE
44
DATA TYPE
45
PRIMARY KEY
A primary key is a field that uniquely identifies each record in a file.
46
PRIMARY KEY
47
PRIMARY KEY
48
FOREIGN KEY
A foreign key is a field in a relational table that matches a candidate key of another table.
49
FOREIGN KEY
50
FOREIGN KEY
51
FOREIGN KEY
52
FOREIGN KEY
53
DATA DICTIONARY
A data dictionary contains data about each file in the database and each field in those files.
54
DATA DICTIONARY
55
DATA DICTIONARY
56
57
CHAPTER 7: DATABASE
7.3 Database Object
58
LEARNING OUTCOME:
At the end of this topic, students should be able to: 1. Explain the functions of database object.
59
Table
Query
Form Report
60
TABLE
61
TABLE
62
TABLE
A table (or set of tables) is the heart of any database, as it contains the actual data
collection
Records
TABLE - example
64
TABLE - example
65
TABLE - example
66
TABLE - example
67
TABLE - example
68
QUERY
Queries are a way of searching for and compiling data from one or more tables.
69
QUERY
Used to locate information, to view, change or analyze it in various ways.
Running
a query is like asking a detailed question of your database. allow you to pull information from one or more tables based on a set of search conditions you define.
Queries
70
QUERY - example
Query:
Answer:
ONE-TABLE QUERY
- Step 1 -
72
ONE-TABLE QUERY
- Step 2 -
73
ONE-TABLE QUERY
- Step 3 -
74
ONE-TABLE QUERY
- Step 4 -
75
ONE-TABLE QUERY
- Step 5 -
76
ONE-TABLE QUERY
- Result -
77
MULTI-TABLE QUERY
- Example -
78
FORMS
Forms
are so popular because they're useful for both the person asking for the information and the person providing it. you can always enter data directly into database tables, you might find it easier to use forms.
79
While
FORMS
Using
a form to enter data lets you be certain that you're entering the right data in the right location and format.
can help keep your accurate and consistent. database
This
80
FORMS vs TABLE
For
example, the orders table in a bakery's database might link to information about customers, products, and prices drawn from related tables. A record with information about a single order might look like this:
81
FORMS vs TABLE
In
fact, in order to see the entire order, you would also have to look at the order items table, where the menu items that make up each order are recorded:
82
FORMS vs TABLE
A
83
FORMS - benifits
- record is much easier to understand.
- Modifying the record would be easier. - forms let user see entire records one at a time. - data entry process easier for the user.
84
FORMS
85
REPORTS
Reports
give user the ability to present components of database in an easy-toread, printable format. Using data from any query or table in database.
86
REPORTS
87
SUMMARY
Tables
Lecturers Students
Queries
Forms
Students
Reports
88