450 likes | 672 Views
Introduction to Database. T. B. A. A. E. A. D. S. 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
E N D
T B A A E A D S
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
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 Deliveries Payment
Network Model • 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. Publisher Manage Represent Bookstore Authors Make Arrange Arrange Arrange Manuscript Book Launching Book Category
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. Relational Model Publisher Authors Bookstore Book Category Books Book Arrangement
Terminologies • 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
Entity-relationship model • this model was written by Peter Chen in 1976. This model is an abstract and conceptual representation of data
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.
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
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
One-to-One Relationship Student ID First Name Last Name Phone 001 Ritchell Galeos 555-8282 002 Alce Navaluna 555-6513 003 Armando Talaid 555-1289 Student ID Section Adviser 001 St. Thomas Ms. Sator 002 St. Dominic Mr. Taraya 003 St. Catherine Mr. Dacalos Students Table Sections Table
One-to-Many Relationship PublisherCode Name Country Phone 198801 Jemma Philwzxc 555-8282 Publisher Table Book Table ISBN Pub Code Book Title Price 9781235 198801 Creative Design P424.00 9781236 198801 Web Design P324.00 9781237 198801 Office Productivity P424.00
Many-to-Many Relationship 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