introduction to database. what is database? a database is a collection of information that is...
TRANSCRIPT
Introduction to Database
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
Database program lets you:• Store information
• Find information
• Analyze and print information
• Manage information
• Share information
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.
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.
Structured Database Models• Hierarchical model • Network model• Relational model• Entity-relationship model• Dimensional Model• Object-relational model
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
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.
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
• 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
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
• this model was written by Peter Chen in 1976. This model is an abstract and conceptual representation of data
Entity-relationship model
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.
Object-relational Model
• Is a model that utilizes the relationship model as well as the object-oriented programming paradigm.
What is RDBMS?
Relational Database
Management System
Is designed to create, maintain, manipulate, modify and delete information in a relational database.
Things you can do with RDBMS:
•Create a database•Information storage•Information retrieval•Information management•Information analysis•Print and share information.
Characteristics of a GOOD Database Information
• Accurate• Organized• Timely• Verifiable• Accessible• Economical• Useful
Relational Database
Terminologies
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.
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.
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.
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.
Relationships
•Primary Key•Foreign Key•Linking table a table that
establishes a connection between two or more table.
Types of Relationship
•One-to-One Relationship•One-to-Many Relationship•Many-to-Many Relationship
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
555-8282PhilwzxcJemma 198801
PhoneCountryNamePublisherCode
•One-to-Many Relationship
P424.00Office Productivity1988019781237
P324.00Web Design1988019781236
P424.00Creative Design1988019781235
PriceBook TitlePub CodeISBN
Publisher Table
Book Table
•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
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.
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.
Database Design to Avoid
•Spreadsheet design•Spreadsheet view•Building a database design on
the database software