introduction to database. what is database? a database is a collection of information that is...

34
Introduction to Database

Upload: carolina-jarvis

Post on 15-Dec-2015

234 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,

Introduction to Database

Page 2: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,
Page 3: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,

What is Database?

A database is a collection of information that is organized so that it can easily be accessed, managed, and updated.

Is a tool for collecting and organizing information

Page 4: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,

Database program lets you:• Store information

• Find information

• Analyze and print information

• Manage information

• Share information

Page 5: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,

Kinds of Databases

•Structured Database It is also called the structured data which a record or file of information is arranged in uniform format.

•Free-form database It is a loose collection of information, such as those you will find on the World Wide Web.

Page 6: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,

Types of Databases

•Operational Database

A dynamic database that is used by any organization in its day to day operation.

•Analytical Database It is a static database, wherein data is often used to store and track historical data to make long term projection and analysis.

Page 7: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,

Structured Database Models• Hierarchical model • Network model• Relational model• Entity-relationship model• Dimensional Model• Object-relational model

Page 8: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,

Hierarchical Model

• Can be visualized as parent-child relationship wherein a child may only have one parent but a parent can have several children.

Publisher

Authors Bookstore

Manuscript PaymentDeliveries

Page 9: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,

Network Model

Publisher

Authors Bookstore

Manuscript Book CategoryBook Launching

Manage Represent

Make Arrange Arrange Arrange

• This model was developed to address in part the problems of the hierarchical model.

• This model allows sharing of branches but are still part of the same database structure.

Page 10: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,

Relational Model

• Developed by Dr. E.F. Codd of IBM in 1970s to solve the problems of the earlier database models as well as finding a way of making database management less dependent to any application.

Publisher

Authors Bookstore

Books Book Arrangement

Book Category

Page 11: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,

• Relation = is a table with columns and rows

• Attributes = are the names given to each column of the relation.

• Domain = is the set of possible values which the attributes will take

• Tuples = usually represents an object and information about that object

Terminologies

Page 12: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,
Page 13: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,

Sample

Name Age

Year Leve

l

Section Mother Father

Maria 87 1 Tambis Juana Polano

Juan 71 1 Sambag Tomasa Pablo

Pedro 18 2 Iba Lokring Islaw

Tomas

96 3 Atis Masing Mamerto

Tiago 110

4 Bahaw Koring Iho

Page 14: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,

• this model was written by Peter Chen in 1976. This model is an abstract and conceptual representation of data

Entity-relationship model

Page 15: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,

Dimensional Model

• Is a specialized adaptation using the relational model that is used to represent data in data warehouses.

• Data warehouse storage of all digital data of a company or organization.

• Dimensions tells where, who and what type

• Measures means quality.

Page 16: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,
Page 17: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,

Object-relational Model

• Is a model that utilizes the relationship model as well as the object-oriented programming paradigm.

Page 18: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,

What is RDBMS?

Page 19: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,

Relational Database

Management System

Is designed to create, maintain, manipulate, modify and delete information in a relational database.

Page 20: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,

Things you can do with RDBMS:

•Create a database•Information storage•Information retrieval•Information management•Information analysis•Print and share information.

Page 21: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,

Characteristics of a GOOD Database Information

• Accurate• Organized• Timely• Verifiable• Accessible• Economical• Useful

Page 22: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,

Relational Database

Terminologies

Page 23: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,

NAME DESCRIPTIONData A number or value

found and stored in the database.

Information

A data that has been processed thereby making it relevant and meaningful

Null Used to represent a value that is unknown or missing.

Page 24: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,

Table The main structure in the relational database

File An organized collection of data about an entity.

Record

Refers to a specific person, place or event. Also known as the tuple.

Page 25: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,

Field The smallest structure of a data from a larger database structure in a relational database.

View Known as the virtual table. It does not hold data on its own; rather it gets data from the table to which it is based.

Page 26: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,

Keys Fields that serves specific purposes within a table.Primary key is a field that uniquely identifies a record in the tableForeign key is a special field that establishes a relationship between two tables.

Relationships

Exist when two or more tables have connection and association.

Page 27: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,

Relationships

•Primary Key•Foreign Key•Linking table a table that

establishes a connection between two or more table.

Page 28: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,

Types of Relationship

•One-to-One Relationship•One-to-Many Relationship•Many-to-Many Relationship

Page 29: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,

555-1289TalaidArmando003

555-6513NavalunaAlce002555-8282GaleosRitchell 001

PhoneLast NameFirst NameStudent ID

•One-to-One Relationship

Mr. DacalosSt. Catherine003

Mr. TarayaSt. Dominic002

Ms. SatorSt. Thomas 001

AdviserSectionStudent ID

Students Table

Sections Table

Page 30: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,

555-8282PhilwzxcJemma 198801

PhoneCountryNamePublisherCode

•One-to-Many Relationship

P424.00Office Productivity1988019781237

P324.00Web Design1988019781236

P424.00Creative Design1988019781235

PriceBook TitlePub CodeISBN

Publisher Table

Book Table

Page 31: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,

•Many-to-Many Relationship

Student No.

First Name

Last Name

Address

2010123 John Ong Tangke

2010124 Joan Goy Poblacion

2010125 Jessie Ka Colon

Code Name FacultyID Room No.

Math01 Math 0008 211

Science01 Science 0010 222

Comp01 Computer 0011 223

Students Table

Subjects Table

Page 32: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,

Designing a Database

• Define the purpose of your database• Determine the tables that you need in

the database.• Determine the fields that you need in the

database.• Identify unique field values• Determine the relationship between

tables.• Test the design by entering sample data.

Page 33: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,

Characteristics of a Well Designed Database

• Modify data easy.• Retrieving information easy.• Developing and building user

application is easy.• Maintaining the structure is easy.• Adding and deleting data is easy.

Page 34: Introduction to Database. What is Database?  A database is a collection of information that is organized so that it can easily be accessed, managed,

Database Design to Avoid

•Spreadsheet design•Spreadsheet view•Building a database design on

the database software