Download - Chapter 1 EC601
-
8/10/2019 Chapter 1 EC601
1/70
-
8/10/2019 Chapter 1 EC601
2/70
What is database?
A shared collection of logically related data and a
description of this data. It is designed to meet the information needs of an
organization
This organized collection of data is usually indigital form.
-
8/10/2019 Chapter 1 EC601
3/70
What is the differences between data andinformation?
Data : Numbers, characters, symbols, imagesetc., which can be processed by a computer.
Data must be interpreted, by a human or
machine, to derive meaning
Information : Knowledge derived from study,experience (by the senses), or instruction.
Information is the interpreted data
-
8/10/2019 Chapter 1 EC601
4/70
How data storage and retrieval has changed
overcomes. The use of database in our daily life.
-
8/10/2019 Chapter 1 EC601
5/70
How data storage and retrieval has changed
overcomes. The use of database in our daily life.
Purchases from the supermarket Purchasing using credit cards
Booking a holiday at the travel agents Using local library
Renting a video Using the internet Studying at university Offices personnel/human resources management
-
8/10/2019 Chapter 1 EC601
6/70
A collection of records or documents dealing with one
organization, person, area or subject in Manual(paper) files or Computer files
Traditional file based system is basically a file based
system, in which we manually or through computer
handle the database such as updating, insertion ,
deletion adding new files to the database etc.
-
8/10/2019 Chapter 1 EC601
7/70
There are several advantages of file based system):
No need of external storage
No need of highly technical person to handle the database.
File based system also has some disadvantages: Provide less security.
Redundancy is more
less integrity
high complexity in updating of database
-
8/10/2019 Chapter 1 EC601
8/70
DBMS is stands for Database Management System
which is a software that enables user to define, create,
maintain, and control access to database. DBMS will interacts with the users application
programs and the database.
Application program is any computer program that interactswith the database by issuing an appropriate request (typicallyan SQL statement) to the DBMS
Example: MS Access, SQL, mySQL, Oracale, etc
-
8/10/2019 Chapter 1 EC601
9/70
Database System or database application is simply a
program that interacts with the database at some
points in its execution. Database system is also a collection programs that
interact with the database along with the DBMS itself.
-
8/10/2019 Chapter 1 EC601
10/70
Online Public Access
Catalog (OPAC)
-
8/10/2019 Chapter 1 EC601
11/70
Travel Agency(Online Booking)
-
8/10/2019 Chapter 1 EC601
12/70
Using the internet
-
8/10/2019 Chapter 1 EC601
13/70
GIVE OTHER EXAMPLES.
-
8/10/2019 Chapter 1 EC601
14/70
Database System, DBMS and Database overview
-
8/10/2019 Chapter 1 EC601
15/70
Examples of tables in database.
-
8/10/2019 Chapter 1 EC601
16/70
-
8/10/2019 Chapter 1 EC601
17/70
Self-Describing Nature of a Database System
The database system contains not only the
database itself but also a complete definition or
description of the database structure andconstraints.
This definition is stored in the system catalog,
which contains information such as the structureof each file, the type and storage format of each
data item, and various constraints on the data.
-
8/10/2019 Chapter 1 EC601
18/70
Insulation between Programs and Data, andData Abstraction on the data. In traditional file processing, the structure of data files
is embedded in the access programs, so any changesto the structure of a file may require changing allprograms that access this file.
By contrast, DBMS access programs do not requiresuch changes in most cases.
The structure of data files is stored in the DBMScatalog separately from the access programs. We callthis property program-data independence.
-
8/10/2019 Chapter 1 EC601
19/70
Support of Multiple Views of the Data A database typically has many users, each of whom may
require a different perspective or view of the database.
A view may be a subset of the database or it may containvirtual data that is derived from the database files but is notexplicitly stored.
A multiuser DBMS whose users have a variety of applicationsmust provide facilities for defining multiple views.
For example, one user of the student information databasemay be interested only in the transcript of each studentwhile a second user, who is interested only in checking thatstudents have taken all the prerequisites of each course they
register for.
-
8/10/2019 Chapter 1 EC601
20/70
Sharing of Data and Multiuser Transaction Processing A multiuser DBMS, as its name implies, must allow multiple users
to access the database at the same time. This is essential if data for multiple applications is to be
integrated and maintained in a single database.
The DBMS must include concurrency control software to ensurethat several users trying to update the same data do so in acontrolled manner so that the result of the updates is correct.
For example, when several reservation clerks try to assign a seaton an airline flight, the DBMS should ensure that each seat can beaccessed by only one clerk at a time for assignment to apassenger.
These types of applications are generally called on-linetransaction processing (OLTP) applications. A fundamental role ofmultiuser DBMS software is to ensure that concurrenttransactions operate correctly.
-
8/10/2019 Chapter 1 EC601
21/70
Data Independence The data is held in such a way that changes to the structure of the
database do not effect any of the programs used to access the data. Consistency of Data
Each item of data is held only once therefore no danger of itembeing updated on one system and not on another.
Control Over Redundancy
In a non-database system, the same information may be held on
several files. This wastes space and makes updating more time-consuming. A database system minimizes these effects.
Integrity of Data
The DBMS provides users with the ability to specify constraints on
data such as making a field entry essential or using a validationroutine.
-
8/10/2019 Chapter 1 EC601
22/70
Greater Security of Data
The DBMS can ensure only authorized users are allowed access tothe data.
Centralized Control of Data
The Database Administrator will control who has access to what More Information Available to User
Users have access to a wider range of data that was previouslyheld in separate departments and sometimes on incompatible
systems. Increased Productivity
The DBMS provides an easy to use query language that allowsusers to get immediate response from their queries rather than
having to use a specialist "programmer" to write queries for them.
-
8/10/2019 Chapter 1 EC601
23/70
Larger Size More disk space is required and probably a larger and
more powerful computer.
Greater Complexity For optimum use the database must be very carefully
designed. If not done well, the new system may fail to
satisfy anyone.
Greater Impact of System Failure
"All eggs in one basket.
More Complex Recovery Procedures
If a system failure occurs it is vital that no data is lost.
-
8/10/2019 Chapter 1 EC601
24/70
Identify the general types of databases:
A.PersonalB.Workgroup
C.DepartmentD.Enterprise
-
8/10/2019 Chapter 1 EC601
25/70
An integrated collection of concepts for describingand manipulating data, relationships between
data, and constraints on the data in organization.a)Record base
b)Object base
c)Physical base
-
8/10/2019 Chapter 1 EC601
26/70
The database consists of a number of fixed
format records possibly of differing types.
Each record type defines a fixed number offields, each typically of a fixed length.
There are three types of record-based data
model :i. Relational data model
ii. Networked data model
iii. Hierarchical data model
-
8/10/2019 Chapter 1 EC601
27/70
In the relational model, data and relationshipsare represented as tables
Each of which has a number of column with aunique name. Eg:
-
8/10/2019 Chapter 1 EC601
28/70
-
8/10/2019 Chapter 1 EC601
29/70
-
8/10/2019 Chapter 1 EC601
30/70
Data is represented as collection of records andrelationship by sets.
The records are organized as generalized graphstructures with records appearing as nodes (alsocalled segments) and sets as edges in the graph.
Eg:
-
8/10/2019 Chapter 1 EC601
31/70
-
8/10/2019 Chapter 1 EC601
32/70
Again, data is represented as collection ofrecords and relationship by sets.
However, hierarchical model allows a node tohave only one parent. hierarchical model can be represented as a tree
graph, with records appearing as nodes and setsas edges.
Eg:
-
8/10/2019 Chapter 1 EC601
33/70
-
8/10/2019 Chapter 1 EC601
34/70
Entity-Relationship
Semantic
Functional
Object-Oriented.
-
8/10/2019 Chapter 1 EC601
35/70
Entity-Relationship
S ti
-
8/10/2019 Chapter 1 EC601
36/70
Semantic Sebenarnya hampir sama dengan ER MODEL, perbezaannya hanya terletak
pada pernyataan adanya relationship antara objeknya.
Jika pada ER MODEL menyatakan adanya relationship antara objek
menggunakan simbol-simbol namun pada SEMANTIC MODELmenggunakan kata-kata. Berikut contoh dari SEMANTIC MODEL
-
8/10/2019 Chapter 1 EC601
37/70
-
8/10/2019 Chapter 1 EC601
38/70
Physical data model represents how the model will be builtin the database.
A physical database model shows all table structures,including column name, column data type, column
constraints, primary key, foreign key, and relationshipsbetween tables.
Features of a physical data model include:
Specification all tables and columns.
Foreign keys are used to identify relationships between tables. Denormalization may occur based on user requirements.
Physical considerations may cause the physical data model to be quitedifferent from the logical data model.
The figure below is an example of a physical data model.
-
8/10/2019 Chapter 1 EC601
39/70
-
8/10/2019 Chapter 1 EC601
40/70
a. Data Definition Language (DDL)
b. Data Manipulation Language (DML)
c. 4G Language (4GL)
-
8/10/2019 Chapter 1 EC601
41/70
The data definition language or sometimes called datadescription language (DDL) is a collection of statements for thedescription of data structure types.
The user must define a database structure in terms of these
data structure types. A database structure defined by means of a DDL is called a
Data Base Schema or Conceptual Schema. A data manipulation language (DML) is a collection of
operators or rules of inference which can be applied to any validinstance of the data types listed in the database schema.
-
8/10/2019 Chapter 1 EC601
42/70
A database schema contains the description of all typeswhich are of interest to users.
A database itself contains instances of the previouslydefined data types.
A combination of particular Data Manipulation and DataDescription Languages is called a Data Model.
Generally, the data model specifies rules according to whichdata are structured and the associated operations that are
permitted. It may also be seen as a technique for the formaldescription of data structures, usage constraints andoperations. The facilities available vary from one model toanother.
-
8/10/2019 Chapter 1 EC601
43/70
Often abbreviated 4GL,fourth-generation languages areprogramming languages closer to human languages than typicalhigh-level programming languages.
Most 4GLs are used to access databases. For example, a typical 4GL command is
FIND ALL RECORDS WHERE NAME IS "SMITH"
The other four generations of computer languages are
first generation: machine language
second generation: assembly language
third generation:high-level programming languages, such as C, C++, and Java.
fifth generation: languages used for artificial intelligence and neural networks.
-
8/10/2019 Chapter 1 EC601
44/70
To learn the DBMS in depth.
Functions of a DBMS Data Storage, Retrieval, and Update.
A User-Accessible Catalog.
Transaction Support.
Concurrency Control Services.
Recovery Services.
Authorization Services.
Support for Data Communication.
Integrity Services.
Services to Promote Data Independence.
Utility Services.
-
8/10/2019 Chapter 1 EC601
45/70
48
To learn the DBMS in depth.
System Catalog : Repository of information (metadata) describing the
data in the database. One of the fundamental components of DBMS.
Typically stores:
names, types, and sizes of data items;
constraints on the data; names of authorized users;
data items accessible by a user and the type of access;
usage statistics.
-
8/10/2019 Chapter 1 EC601
46/70
-
8/10/2019 Chapter 1 EC601
47/70
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 Used by the organization and a description of this
data called the schema.
Procedures
Instructions and rules that should be applied to thedesign and use of the database and DBMS.
People
-
8/10/2019 Chapter 1 EC601
48/70
Data Administrator(DA) Database Administrator (DBA) Database Designers (Logical and Physical) Application Programmers End Users (naive and sophisticated)
-
8/10/2019 Chapter 1 EC601
49/70
First-generation Hierarchical and Network
Second generation Relational
Third generation Object-Relational
Object-Oriented
-
8/10/2019 Chapter 1 EC601
50/70
Control of data redundancy Data consistency More information from the same amount
of data Sharing of data Improved data integrity Improved security Enforcement of standards Economy of scale
Pearson Education Limited 1995, 2005
-
8/10/2019 Chapter 1 EC601
51/70
Balance conflicting requirements
Improved data accessibility and
responsiveness
Increased productivity
Improved maintenance through data
independence
Increased concurrency Improved backup and recovery services
Pearson Education Limited 1995, 2005
-
8/10/2019 Chapter 1 EC601
52/70
Complexity
Size
Cost of DBMS
Additional hardware costs
Cost of conversion
Performance
Higher impact of a failure
-
8/10/2019 Chapter 1 EC601
53/70
56
-
8/10/2019 Chapter 1 EC601
54/70
57
-
8/10/2019 Chapter 1 EC601
55/70
58
Teleprocessing
File-server
Client-server
-
8/10/2019 Chapter 1 EC601
56/70
59
Traditional architecture. Single mainframe with a number of
terminals attached.
Trend is now towards downsizing.
-
8/10/2019 Chapter 1 EC601
57/70
60
File-server is connected to severalworkstations across a network.
Database resides on file-server.
DBMS and applications run on eachworkstation.
Disadvantages include: Significant network traffic.
Copy of DBMS on each workstation.
Concurrency, recovery and integrity control morecomplex.
-
8/10/2019 Chapter 1 EC601
58/70
61
-
8/10/2019 Chapter 1 EC601
59/70
62
-
8/10/2019 Chapter 1 EC601
60/70
63
-
8/10/2019 Chapter 1 EC601
61/70
64
Advantages: Thinclient, requiring less expensive hardware.
Application maintenance centralized.
Easier to modify or replace one tier withoutaffecting others.
Separating business logic from database functionsmakes it easier to implement load balancing.
Maps quite naturally to Web environment.
-
8/10/2019 Chapter 1 EC601
62/70
65
-
8/10/2019 Chapter 1 EC601
63/70
66
Program that controls data transfer
between clients and servers in order to
provide a consistent environment,
particularly for Online Transaction
Processing (OLTP).
-
8/10/2019 Chapter 1 EC601
64/70
67
-
8/10/2019 Chapter 1 EC601
65/70
DATABASEFile-BasedSystem
Database System
What?
Where (Applications)
Who? (Roles)
DBMS
What?
How? (Advantages)
Architectures
DatabaseLanguage
Data Model (3 types)
Differentiatebetween Data Model
Schema and DataModel Instances
-
8/10/2019 Chapter 1 EC601
66/70
Schema-The description of the database.
-Include description of the database structureand constraints that should hold on thedatabase.
Instances- The actual data stored in a database at aparticular moment in time.
-Also called database state or occurrence
DataModel
-
8/10/2019 Chapter 1 EC601
67/70
Schema
-Change very infrequently
-Schema is called intension
Instances-Change every time the database is updated
-Instances is called extension
DataModel
-
8/10/2019 Chapter 1 EC601
68/70
Lets do the GALLERY WALK together..
What? Gallery Walk?
Yup.. We show our findings togetherand add up some more valuable info..
Ahaa, I got it.
So that we will understand more on thischapter
-
8/10/2019 Chapter 1 EC601
69/70
DBMS DATABASE SYSTEM DATA MODEL DATA MODEL SCHEMA vs DATA MODEL
INSTANCES TERMS related to Database
Entities
Relationship
Constraints
-
8/10/2019 Chapter 1 EC601
70/70
Aggregate functionis a function where the valuesof multiple rows are grouped together as input on
certain criteria to form a single value
SQL aggregate functions return a single value,
calculated from values in a column. Eg: Average() Count()
Maximum() Median() Minimum() Mode()