Title Goes Here - Binus Repository
Download
Report
Transcript Title Goes Here - Binus Repository
Matakuliah : Web Database
Tahun
: 2008
Overview Relational Database and SQL
Session 2
Last Session Review:
•Web Database Definition
•Web Application Example
•Influence of Web Database to Organization
•Web Enhanced Database
•Database Enhanced Web
•When To Use Web Database
2
Agenda:
•Overview Database and DBMS
•Advantages of DBMS
•Disadvantages of DBMS
•Overview Relational Database
•Overview SQL
•Data Definition Language
•Data Manipulation Language
3
Objective:
•Student understand about Database, DBMS,
Relational Database, SQL, DDL and DML
•Students could demonstrate their ability in SQL,
DDL and DML
4
Overview Database and DBMS
• What is a Database?
– Shared collection of logically related data (and a description of the data) design to
meet the information needs of an organization
– Usually refer specially to the data that is stored on computers
– System catalog (metadata) provides description of data to enable program-data
independance
– Logically related data comprises entities, attributes, and relationships of an
organization’s information
– History of Database System:
• First Generation
– Hierarchical and Network
• Second Generation
– Relational
• Third Generation
– Object Relational
– Object-Oriented
5
Overview Database and DBMS (cont.)
• What is a Database Management System (DBMS)?
– A software system that enables users to define, create, and maintain the
database and that provides controlled access to this database
• DBMS Facilities:
– Define Database, usually throught Data Definition Language
– Insert, update, delete and retrieve data, usually throught Data Manipulation
Language
– Control Access to Database
– Recovery Control System
– User-accesible Catalog
6
Advantages of DBMS
•
•
•
•
•
•
•
•
•
•
•
•
•
•
Control of data redudancy
Data consistency
More information from the same amount of data
Sharing of Data
Improved data Integrity
Improved Security
Enforcement of Standard
Economy of Scale
Balanced conflicting requirements
Improved data accessibility and responsiveness
Increased productivity
Improved maintenance through data independence
Increased concurrency
Improved backup and recovery services
7
Disadvantages of DBMS
•
•
•
•
•
•
•
Complexity
Size
Cost of DBMS
Additional Hardware cost
Cost of conversion
Performance
Higher Impact of failure
8
Overview Relational Database
• What is a Relational Database?
– It is a body of persistent information stored in two-dimensional tables (by a
computer program), where the data survives the terminations of a program
or user session that created it.
– First published in 1970, mostly used this days
– A collection of normalized relations with discinct relation name
• Relational Database Advantages:
–
–
–
–
Logical
Simplicity
Mathematical rigour
Set-Oriented
9
Overview Relational Database (cont.)
• Relational Data Structure
–
–
–
–
–
Table
Attribute
Relationship
Domain
Keys:
• Superkey
• Primary Key
• Foreign Key
– Integrity:
• Entity Integrity
• Referential Integrity
10
Overview SQL
• SQL is a language oriented specifically around relational databases.
• Forms of SQL:
– Interactive SQL
– Static SQL
– Dynamic SQL
• The Subdivisions of SQL:
– DDL (Data Definition Language)
– DML (Data Manipulation Language)
– DCL (Data Control Language)
• Various Types of Data (datatype) can be divided into the following categories:
–
–
–
–
Text
Numeric
Datetime
Binary, etc
11
Data Definition Language (DDL)
• Allow DBA or User to describe and name database, tables, attibutes,
and relationships required (plus any assosiated integrity and
security constraints)
• Example:
– Creating Database
– Modifiying Database
– Creating, Changing and Dropping Table and Constraints
12
Data Manipulation Language (DML)
• Provide basic data manipulation operations on data held in the
database
• Example:
–
–
–
–
Retrieve (Select) data
Insert Data
Update Data
Delete Data
13
Data Manipulation Language (DML)
• Provide basic data manipulation operations on data held in the
database
• Example:
–
–
–
–
Retrieve (Select) data
Insert Data
Update Data
Delete Data
14
Summary
• DBMS is software system that enable user to create, maintain and
control Database. DBMS has advatages and disadvantages.
• Relational Database is mostly and commonly used today.
• SQL is used to create and maintain DBMS
15
Next Session:
•Web Basic Concept
•How to put information on Web
•Dynamic Web pages
•New Development of Web
16
End of
Overview Relational Database and SQL
Thank you
17