DATABAS E SYSTEM

MELJUN CORTES

We Are Learning Today

To recognize what a is and identify where one might be used in and out of school. To reconize the meaning of key database terms such as Table, Record, Field, Form, Report and Query. uery To understand what querying a database is.

database

Understanding Basic Database concepts

MELJUN CORTES

DATA ORGANIZATIO

CTER is the basic building block of DATA which consist of upper & lower case letter numeric digit (0, 1, 2, etc.) or special character (-, +,

ACTER RACTER are put together to form a FACT. FACT

are called Field, Item, Word, or String of Chara – a number, a name, or a combination of Chara ORD – a collection of related FACTS.

e: ployee Record – it is collection of FACT about one emp dicates name, address, phone #, pay rate, earning m date & so on.

MELJUN CORTES

DATA ORGANIZATIO

– is a collection of related RECORD. RECORD

e:

1.) A collection of all employee record for one comp would be an Employee File. File 2.) Inventory File – collection of all inventory recor RECORDparticular company or organization. a FILE
Student ID# : 034456 Student Name : MELJUN CORTES Course : BSCS – 4 Birthday : October 2, 1975 Zodiac Sign : Libra Student ID# : 034456 Student Name : MELJUN CORTES Course : BSCS – 4 Birthday : October 2, 1975 Zodiac Sign : Libra

MELJUN CORTES

DATA ORGANIZATIO
HIERARCHY OF DATA
:
DataBase ACT – are combined to make Record. File

CHARACTER – are combined to make a Fact.

RECORD – are combined to make File. ILE – are combined to make DataBase

Record

Note: The Heart of most Organization is DATA . DataBase – is a collection of integrated & related master file. file

Fact

Note: A data base is used as the raw material or input data Character for all of the application system perform by the organization.

MELJUN CORTES

DATABASE SYSTEM
Number Date Customer   101 102 103 104 Oct 30, 2009 Dec. 12, 2009 Nov. 15,2009 Jan. 14,2010 MELJUN CORTES PIOLO PASCAUL MARTIN RIVERA SAM MELBY

Amount

TABLE

  12,500 78,452 89,500 10,500

RECORD

RECORD

RECORD

RECORD

h ROW is a RECORD. FIELD NAME h COLUMN is a FIELD. LUMN TITLES are FIELD NAME. type of DATA stored in a FIELD is a FIELD TYPE. number of CHARACTER in a FIELD is its FIELD WIDTH. ATABASE is composed of one or more TABLE. ATABASE is a FILE which is created in automated DBMS SOFTWA

MELJUN CORTES

DATABASE SYSTEM
:C:\STLMASTER.dbf : 268 records : 10/26/1996 : STLMASTER.dbf 6

ucture for Database mber of Data Records e of last update name of DATABASE FILE
Field Name

AMPLE OF DATABASE STRUCTURE:

1 2 3 4 5 6 7 8 9

AppNumber character AppDate date Name character Address character LoanAmount numeric Rebate numeric Interest numeric Balance numeric Penalty numeric

Field Data Types Field Width Dec Index

8

20

30 12 7 7 12 7

2 2 2 2 2

MELJUN CORTES

DATA ORGANIZATIO

DATA
any system.

– is a raw materials or input to data processing

Pay Slip – when this INFORMATIONof an employee OUTPUT DATA can be used to help people make economic decision making. DATA PROCESSING – is that procedures of transforming INPUT DATA into desired OUTPUT DATA.

OUTPUT DATA. Example: Student Admission Form & Enrollment Form

- is considered as INPUT DATA. - is manipulated to provide

MELJUN CORTES

DATA ORGANIZATIO
INFORMATION PROCESSING – a special case of data processing is the procedure of transforming data into information which can be used to make better decision. Data Processing System – includes all people, procedures & computer device used to produce desirable output or meaningful Information Processing System – includes all people, information. procedures, computer devices used to procedure useful that can be used in decision making

MELJUN CORTES

DATA ORGANIZATIO
Ex. Payroll System

Overview of DATA Processing
INPUT
Example: 1.) Pay Rate 2.) Hours Worked 3.) Payroll Deduction

PROCESSING
Example: 1.) Classifying 2.) Sorting 3.) Calculating 4.) Storing 5.) Summarizing 6.) Reproducing

OUTPUT
Example: 1.) Pay Slip 2.) Payroll Report

MELJUN CORTES

NFORMATION SYSTEM
Hardware, Software, People, Procedures, Policies, DATA are combined to create an INFORMATION SYSTEM. SYSTEM

The term INFORMATION SYSTEM is a generic reference to a

Computer-Based System that provides the following:

1.) DATA PROCESSING – capabilities for a company . - DATA PROCESSING capability refers to the System’s ability to handle and process DATA. 2.) INFORMATION SYSTEM – people need to make better more informed Decisions. - The more sophisticated INFORMATION

MELJUN CORTES

DATABAS E SYSTEM
MELJUN CORTES

DATABASE SYSTEM

Database Concepts Data vs.Infor mation
MELJUN CORTES

Database
Computerized
1. 2.

Record Keeping System
Collection of Data used by an organization to
Record its Operations Support Decision Making

MELJUN CORTES

DATABASE SYSTEM

Data

Raw facts and figures Can be of type Text Number Sound, Image, Chart, Video MELJUN CORTES

DATABASE SYSTEM
Processed Data Used for Decision Making Data is also INFORMATION Information creates DATA MELJUN CORTES

Informatio n

DATABASE SYSTEM
:C:\STLMASTER.dbf : 268 records : 10/26/1996 : STLMASTER.dbf 6

ucture for Database mber of Data Records e of last update name of DATABASE FILE
Field Name

AMPLE OF DATABASE STRUCTURE:

1 2 3 4 5 6 7 8 9

AppNumber character AppDate date Name character Address character LoanAmount numeric Rebate numeric Interest numeric Balance numeric Penalty numeric

Field Data Types Field Width Dec Index

8

20

30 12 7 7 12 7

2 2 2 2 2

MELJUN CORTES

DATABASE SYSTEM
Number Date Customer   101 102 103 104 Oct 30, 2009 Dec. 12, 2009 Nov. 15,2009 Jan. 14,2010 MELJUN CORTES PIOLO PASCAUL MARTIN RIVERA SAM MELBY

Amount

TABLE

  12,500 78,452 89,500 10,500

RECORD

RECORD

RECORD

RECORD

h ROW is a RECORD. FIELD NAME h COLUMN is a FIELD. LUMN TITLES are FIELD NAME. type of DATA stored in a FIELD is a FIELD TYPE. number of CHARACTER in a FIELD is its FIELD WIDTH. ATABASE is composed of one or more TABLE. ATABASE is a FILE which is created in automated DBMS SOFTWA

MELJUN CORTES

A DataBase Management System often just called ‘Database Software’ Processin
Input
g

(DBMS)
Output

FORMS
Sources Documents Like: Enrollment Forms Storing Querying Sorting

REPORTS
Printed Documents Like: Assessment Forms

MELJUN CORTES

Database Terminology
Term

Meaning

Database An organised collection (or Store) of data. Table A collection of related records, such as all the pupil records in a class. Record Field Data Type A collection of related fields, such as a pupil’s record. An individual data item, such as Firstname or Date of Birth. Type of information in a field such as text, numeric, date and boolean (Yes/No)

MELJUN CORTES

DATABASE SYSTEM The Russian Doll
Analogy
A Database Tables inside of…

Records inside of… Fields inside of…

Data inside of…

MELJUN CORTES

DATABASE SYSTEM
Number Date Customer   101 102 103 104 Oct 30, 2009 Dec. 12, 2009 Nov. 15,2009 Jan. 14,2010 MELJUN CORTES PIOLO PASCAUL MARTIN RIVERA SAM MELBY

Amount

TABLE

  12,500 78,452 89,500 10,500

RECORD

RECORD

RECORD

RECORD

h ROW is a RECORD. FIELD NAME h COLUMN is a FIELD. LUMN TITLES are FIELD NAME. type of DATA stored in a FIELD is a FIELD TYPE. number of CHARACTER in a FIELD is its FIELD WIDTH. ATABASE is composed of one or more TABLE. ATABASE is a FILE which is created in automated DBMS SOFTWA

MELJUN CORTES

DATABASE SYSTEM
:C:\STLMASTER.dbf : 268 records : 10/26/1996 : STLMASTER.dbf 6

ucture for Database mber of Data Records e of last update name of DATABASE FILE
Field Name

AMPLE OF DATABASE STRUCTURE:

1 2 3 4 5 6 7 8 9

AppNumber character AppDate date Name character Address character LoanAmount numeric Rebate numeric Interest numeric Balance numeric Penalty numeric

Field Data Types Field Width Dec Index

8

20

30 12 7 7 12 7

2 2 2 2 2

MELJUN CORTES

DATABASE SYSTEM
What is a DBMS ?
A collection of computer programs that allow storage, modification, and extraction of information from a database. There are database many different types of DBMS ranging from small systems that run on personal computers to huge systems that run on mainframes. Examples-Computerized library systems, automated systems teller machines, flight reservation systems, computerized parts inventory systems.

MELJUN CORTES

DATABASE SYSTEM

Introductio n To DBMS Concepts
MELJUN CORTES

DATABASE SYSTEM
What is a DBMS ?
A collection of computer programs that allow storage, modification, and extraction of information from a database. There are database many different types of DBMS ranging from small systems that run on personal computers to huge systems that run on mainframes. Examples-Computerized library systems, automated systems teller machines, flight reservation systems, computerized parts inventory systems.

MELJUN CORTES

DATABASE SYSTEM Examples of
DATABASE(1) Admission System
Examination System Library System Payroll & Personnel Management System Accounting System Hotel Reservation System Airline Reservation System

MELJUN CORTES

DATABASEDATABASE SYSTEM Examples of
(2)
Patient Recording System Inventory System Sales and Purchase and Accounting System Enrollment System Knowledge-Based Management System Every Government, Military, Private and other organizations plus Individual can make use of DB

MELJUN CORTES

DATABASE SYSTEM Data Management
Manual Filing System Computerized Filing System Database Systems
MELJUN CORTES

DATABASE SYSTEM

Filing System
Every Department/Company has its own Data File(s) Application to Maintain Data File(s) -- Computerized Data Maintenance System

MELJUN CORTES

DATABASE SYSTEM
Library System Example
Members
Members Management Application
Lists of All Members, New Members, Joins between specified Dates. etc

Operations FilesApplications

Catalog

Catalog Management Application

Lists of All Books, New Books, Issued Books, Lost Books,. etc

Register

Transaction Management Application

Books Issued Today, Books Receipt Today, etc

MELJUN CORTES

DATABASE SYSTEM
Database System Large Repository Single, Central,
Shared Resource Have Logical Connections among data items
Is a PERSON

DBA is responsible of its design, creation and maintenance

MELJUN CORTES

DATABASE SYSTEM
Members Management Application
Lists of All Members, New Members, Joins between specified Dates. etc

Library System - Exam

Database
Members Catalog Register

DBMS

Catalog Management Application

Lists of All Books, New Books, Issued Books, Lost Books,. etc

Transaction Management Application

Books Issued Today, Books Receipt Today, etc

MELJUN CORTES

DATABASE SYSTEM
Software Package that provides Support to applications system -- Computerized DATA Handling User-interface for on-line queries

DBMS

MELJUN CORTES

DATABASE SYSTEM
Sharing of Data Control of Redundancy

Advantages of DBMS (1)
-(unnecessary wastage of disk space)
Data Consistency Improvement of Data Standards Improvement of Data Integrity

-(Intra-record, inter-record, referential)
Balancing of Conflicts Faster Development of New Applications

MELJUN CORTES

DATABASE SYSTEM
Advantages of DBMS (2) Better Security
Passwords Encryption Views and Stored Procedures Better Data Accessibility

(query language- SQL programming)
Economy of Scale Transaction handling Better backup and Recovery Procedures

MELJUN CORTES

DATABASE SYSTEM Disadvantages of
DBMS Higher
DBMS Hardware Conversion Programming Slow Processing of Some Applications More Security Risks More Difficult Recovery Costs of

MELJUN CORTES

DATABASE SYSTEM Kinds of Databases
Relational: Oracle 9i/8i, SQL-Server 2000/7.0/6.5, Teradata, Sybase(SQL Anywhere), DB2, Informix MS-Access, Foxpro 2.6/2.5,dbase IV/3 + Network e.g. IDS Server Paradox, FoxBase, Dbase3+, DbaseIV DBU, Visual FoxPro, MS-Access – Windows 7

MELJUN CORTES

DATABASE SYSTEM
Relational DBMS
TABLE

TABLE TABLE TABLE

DATABASE SYSTEM Important RDBMS
Objects
Tables Views Triggers Stored Procedures Functions Primary Key Foreign Key

MELJUN CORTES

DATABASE SYSTEM
Networked DBMS

MELJUN CORTES

DATABASE SYSTEM SQL:

SQL:
data

It is an acronym for Structured Query Language. It is the language in which, the client sends the request to the database for

Eg. Select name, address From MELJUN emp

CORTES

DATABASE SYSTEM

PL/SQL:

It is an acronym for Programming Language/Structured Query Language Apart from writing the SQL you also have the programming language constructs like • If then else (checking conditions) • Looping (Executing the set of statements more that once) • Exception and error handling (Taking care of run time errors)

MELJUN CORTES

DATABASE SYSTEM
Database Design
Database design is the process of producing a detailed
data model of a database. This logical data model contains all the needed logical and physical design choices and physical storage parameters needed to generate a design in a Data Definition Language, which can then be used to create a database. A fully attributed data model contains detailed attributes for each entity.

Process: • Determine the data to be stored in the database • Determine the relationships between the different data elements • Superimpose a logical structure upon the data on the basis of these relationships.

MELJUN CORTES

DATABASE SYSTEM
Database Objects executed in A Database Trigger is procedural code that is automatically
response to certain events on a particular table in a database. Triggers can restrict access to specific data, perform logging, or audit data modifications. A Database View is a virtual or logical table composed of the result set of a query. Unlike ordinary tables (base tables) in a relational database, a view is not part of the physical schema: it is a dynamic, virtual table computed or collated from data in the database. Changing the data in a table alters the data shown in the view In relational databases , SQL databases, and flat file databases, a Table is a set of data elements (values) that is organized using a model of horizontal rows and vertical columns.

MELJUN CORTES

DATABASE SYSTEM

Database Objects

In database packages, the term Cursor refers to a control packages structure for the successive traversal (and potential processing) of records in a result set. A Transaction Log (also database log or binary log) is a history of actions executed by a database management system to guarantee ACID properties over crashes or hardware failures. Physically, a log is a file of updates done to the database, stored in stable storage. A Database Index is a data structure that improves the speed of operations in a table. Indexes can be created using one or more columns, providing the basis for both rapid random lookups and efficient ordering of access to records. A Stored Procedure is a subroutine available to applications accessing a relational database system. Stored procedures (sometimes called a sproc or SP) are actually stored in the database.

MELJUN CORTES

DATABASE SYSTEM

Normalizati on
Why Normalize?

Ideally, a relational database table should be designed in such a way as to exclude the possibility of update, insertion, and deletion anomalies. The normal forms of relational database theory provide guidelines for deciding whether a particular design will be vulnerable to such anomalies. It is possible to correct an unnormalized design so as to make it adhere to the demands of the normal forms: this is called normalization. A that is not sufficiently normalized can suffer from logical inconsistencies of various types, and from anomalies involving data operations causing Update, Insert and Delete Anomalies.

table

MELJUN CORTES

DATABASE SYSTEM
TRANSACTION ? What is a Database Transaction MANAGEMENT
A database transaction is a unit of interaction with a database management system or similar system that is treated in a coherent and reliable way independent of other transactions. In general, a database transaction must be atomic, meaning that it must be either entirely completed or aborted. Ideally, a database system will guarantee the properties of Atomicity, Consistency, Isolation and Durability (ACID) for each transaction. A Simple Transaction 1. Begin the transaction 2. Execute several queries 3. Commit the transaction

MELJUN CORTES

DATABASE SYSTEM

ACID
In

Isolation, Durability) is a set of properties that guarantee that database transactions are processed reliably. In the context of databases, a single logical operation on the data is called a transaction.

computer science , ACID (Atomicity, Consistency,

Atomicity - Atomicity refers to the ability of the DBMS to guarantee that either all of the tasks of a transaction are performed or none of them are. Consistency - Consistency refers to the database being in a legal state when the transaction begins and when it ends. This means that a transaction cannot break the rules, or integrity constraints, of the database. Isolation - Isolation refers to the ability of the application to make operations in a transaction appear isolated from all other operations Durability -Durability ensures that the results of a completed transaction are permanent and can survive future system and

MELJUN CORTES

DATABASE SYSTEM
Kinds of Database Consultants
DATABASE Designers is a person DATABASE Developers is a person DBA (Data Base Administrator) is a person

MELJUN CORTES

DATABASE SYSTEM DATABASE
Designers:
These consultants Analyze, design the complete structure of the database. They design Tables, Views, Normalization, ER Diagram, Integrity constraints, etc.

MELJUN CORTES

DATABASE SYSTEM DATABASE
Developers : write stored These consultant
procedures, triggers, functions, etc. Technical terms found in the resume of such consultants — Triggers Stored Procedures Packages Unix Shell Scripting

MELJUN CORTES

DATABASE SYSTEM

DB
a) b) c) d)

These consultants’ profile includes installation, configuration, migration, backup, recovery operations Various Tasks of the DBA are:
Granting access User creation and deletion Performance tuning Query optimization

ADMINISTRATOR :

MELJUN CORTES

Related Skills in DATABASE SYSTEM

Data Warehousing Development of a data warehouse includes development of systems to extract data from operating systems plus installation of a warehouse database system that provides managers flexible access to the data Data Mining A class of database applications that look for hidden patterns in a group of data that can be used to predict future behavior Data Modeling The analysis of data objects and their relationships to other data objects. Data modeling is often the first step in database design and objectoriented programming as the designers first create a conceptual model of how data items relate to each other. Data modeling involves a progression from conceptual model to logical model to physical schema.

MELJUN CORTES

MELJUN CORTES

MELJUN CORTES

MELJUN CORTES

MELJUN CORTES

MELJUN CORTES

MELJUN CORTES

MELJUN CORTES

MELJUN CORTES

MELJUN CORTES

MELJUN CORTES

MELJUN CORTES

MELJUN CORTES

MELJUN CORTES

MELJUN CORTES

MELJUN CORTES

MELJUN CORTES

MELJUN CORTES

MELJUN CORTES

MELJUN CORTES

MELJUN CORTES

MELJUN CORTES

MELJUN CORTES

MELJUN CORTES

MELJUN CORTES

MELJUN CORTES

Master your semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master your semester with Scribd & The New York Times

Cancel anytime.