Database Fundamentals What is Data? Facts Figures Statistics Details Particulars Information Report Statement Evidence What is Data? Examples: (Human Application) 1. Person 2. Student A Person Personal Data: Name Date of Birth Age Gender Address Contact Number Marital Status SSS Number Tax Identification Number A Student Personal Data: Name Date of Birth Age Gender Address Contact Number Student Number Course Name of School What is Data? Example: (University Application) 3. Enrollment
Enrollment Data School Year Semester Number of Enrollees Number of Contact Hours Total Sections Offered Number of Subjects Offered Number of Credit Hours Number of Units What is Data? Example: (Financial Application) 4. Balance Sheet Balance Sheet Data Non-Current Assets Current Assets Owners Equity Current Liabilities Non-Current Liabilities What is Database? A structured set of data held in a computer, especially one that is accessible in various ways. www.webcrawler.com A database is an organized collection of data. -- www.wikipedia.org A database is a collection of data that is organized so that its contents can easily be accessed, managed, and updated. WhatIs.com
What is Database? Example: 1. College Database
College Dept Student Course Staff Billing Academic Enroll Database Fundamentals The purpose of this topic is to help you understand the value of data and data management tools and how they can be applied with your course. Database Fundamentals Overview Without data, computers are of little value.
The worth of a computer or an information system is measured in terms of its ability to support the processing, transmission and/or accessing of data.
In fact, data management can be the key to success or failure for an organization.
Many companies run into difficulties because they lack the appropriate data to make effective decisions, and/or the way their databases are constructed inhibits the ability to analyze and manipulate data in a timely, cost-effective manner. Database Fundamentals After this topic, you should be able to: Describe the importance of data and databases. Define the key terms needed to understand databases and database management. Describe the major characteristics of databases and database management. Outline the major database management systems and describe their advantages and disadvantages.
Lesson 1 The Value of Data and Databases The Value of Data and Databases Many of the actions you make during the day become data for organizations to use for their own profit and learning. - Using an automated teller machine - filling out a form for entrance exam in a school - ordering an item on the Internet - booking a flight on an airline
all become digitized data to be sorted, managed, and used by others. In each of these cases, someone at some time has decided how the data from these users will be received, stored, processed, and made available to others. The Value of continue Data and Organizations For financial and/or legal reasons, organizations collect and store vast amounts of data about employees, customers, finances, vendors, inventory, competitors, and markets, to name only a few. The amount of data needed is important because people generally make better decisions if they have more data available to them.
The Value of continue For example A car dealership, bank, or credit card company will make better decisions about who to give car loans by looking at a person's credit report information than if they simply based their decision on the word of the customer. Looking at your credit report, a bank representative would see a listing of your payment history on loans and credit cards, including your mortgage. She would also see information about outstanding loans, debt repayment and credit limits. The Value of continue Extracting Meaning from Data Raw data is not very useful.
Suppose a human resources manager of a local hospital sends out a survey consisting of 25 multiple-choice questions to assess the level of employee satisfaction of its 150 nurses.
Let's assume for a moment that 114 surveys are completed and returned to the manager. This is the raw data and basically has no meaning. The Value Lesson Wrap-up As organizations invest in and become more dependent on Information Systems, the processes of gathering, managing, and utilizing data become more central to operational success.
Data is only as valuable as our ability to access and extract meaning from it; and we cannot extract meaning from it without organizing, storing, and analyzing it effectively. The Value End of Lesson 1 Now that we have completed this topic, you should be able to: Describe the value of data to organizations. Discuss how and why organizations and individuals attempt to extract meaning from data.
Lesson 2 Understanding Database Terminology
Understanding Database Terminology A computer cannot process data unless it is organized in special ways; into characters, fields, records, files and databases.
After reading this lesson, you should be able to: Define the key terms needed to understand what a database is and how it is used. Identify the purpose and role of characters in data processing. Identify the purpose and role of fields in data processing. Identify the purpose and role of records in data processing. Identify the purpose and role of database files in data processing. Identify the purpose and role of databases in data processing. Identify the purpose and role of data management systems in data processing. Identify the purpose and role of keys in data processing.
Understanding continue Character A character is the most basic element of data that can be observed and manipulated. Behind it are the invisible data elements we call bits and bytes, referring to physical storage elements used by the computer hardware. A character is a single symbol such as a digit, letter, or other special character (e.g., $, #, and ?). Understanding continue Field A field contains an item of data; that is, a character, or group of characters that are related.
John Smith makes up a name in the Name Field. Its a grouping of related text characters. Understanding continue Record A record is composed of a group of related fields. For Example (Personal Information)
This record is made up of multiple fields, First Name, Last Name, Date of Birth, Address, and Social Services Security Number Understanding continue As another way of saying it, a record contains a collection of attributes related to an entity such as a person or product. Book Table Understanding continue Database File a database file is defined as a collection of related records. A database file is sometimes called a table.
Files are frequently categorized by the purpose or application for which they are intended. Some common examples include mailing lists, quality control files, inventory files, or document files. Understanding continue Database Organizations and individuals use databases to bring independent sources of data together and store them electronically. Thus, a database is composed of related files that are consolidated, organized and stored together. One collection of related files might pertain to employee information. Another collection of related files might contain college information.
Understanding continue Book Database Understanding continue Data Management System Data management systems are used to access and manipulate data in a database. A database management system is a software package that enables users to edit, link, and update files as needs dictate. Database management systems will be discussed in greater detail in another lesson. Example: MS ACCESS, MS SQL SERVER, MySQL, ORACLE Understanding continue Key In order to track and analyze data effectively, each record requires a unique identifier or what is called a key. ISBN is the key to this Book Table Understanding continue Key The key must be completely unique to a particular record just as each individual student has a student number assigned to them. In fact, student number are often used as keys in large databases in university. Understanding continue Key In Financial Accounting application the key could be Account Code of General Ledger Account Code is the key to this General Ledger Table General Ledger Table Understanding Lesson Wrap-Up People and computers cannot process data unless it is organized properly. In this lesson, the basic elements of a database, the elements used to organize data in a consistent manner, are defined. The structure of a database begins with the character, the most basic element of data. These characters are organized into fields, records, and files, the other important building blocks of a database.
Understanding Lesson Wrap-Up Database management systems are designed to access and manipulate data in a database. These systems allow users to work with and manipulate data so that, eventually, someone can extract meaning from it. Understanding End of Lesson 2 Now that we have completed this lesson, you should be able to: Define the key terms needed to understand what a database is and how it is used. Identify the purpose and role of characters in data processing. Identify the purpose and role of fields in data processing. Identify the purpose and role of records in data processing. Identify the purpose and role of database files in data processing. Identify the purpose and role of databases in data processing. Identify the purpose and role of data management systems in data processing. Identify the purpose and role of keys in data processing.
Lesson 3 Characteristics of Database
Characteristics of Database A computerized database refers to a collection of related files that are digitized. More often than not, this kind of database is more useful than manila folders and filing cabinets. For one, it provides an efficient method of pulling facts together. It allows the slicing, dicing, mixing, and matching of information for a many purposes and needs. Characteristics continue Types of Databases Some databases are small enough to be created and contained on your desktop computer while others are so large that they are stored on network servers or powerful mainframe computers.
Some Popular Databases: Paradox, Access, MySQL, & dBase 5 These can be manage enough to store on desktop computer.
Characteristics continue Database Access Database access is a sticky issue, as you will see. It should be protected at all times from any aggression inside or outside Selected users could only access certain information depending on their needs
Characteristics continue Database Attributes for Effective Use It is important to keep some database files separate, even though they contain closely related information.
For Example: it's usually a good idea to keep employee files containing home address, telephone number, job title, and work location separate from files containing an employee's tax and salary information. Characteristics continue Database Attributes for Effective Use There are at least two reasons for maintaining these records in separate files:
1. It is generally more efficient and effective to search for and extract information from smaller sets of data.
2. Different types of data should be accessible to different groups of people.
Characteristics continue Multiple Sources A database is more useful if there is little redundancy between the files it contains. In other words, it would be inefficient and a waste of human and computer resources to have the same information repeated over and over again in different files. For Example: Some companies maintain databases with very similar information. Sometimes there are good reasons for this; e.g. for security purposes. However, it's simply more costly to maintain accurate information in multiple locations.
Characteristics continue One of the beauties of databases is the ability to link together data from multiple sources to accomplish a specific task. For Example: I might store the file containing a mailing list for District 2 of Manila with similar lists compiled for individuals in other 6 Districts of Manila. If a political action group in Manila decides to develop a campaign for the 7 Districts, they can extracts the names of potential supporters. Characteristics Lesson Wrap-Up There are many different types of databases, and, in general, each database is designed to facilitate a unique type of decision making. A variety of database management issues have been reviewed including security and determining who should have access to the data in a database. Finally, the point is made that effective database management requires that redundancies and discrepancies in the data be minimized or altogether eliminated. Characteristics End of Lesson 3 Now that we have completed this lesson, you should be able to: Identify some of the common types of databases. Discuss some of the key issues associated with providing data access. Justify the importance of maintaining separate files. Justify the importance of minimizing redundancy between data files.
Lesson 4 An Introduction to Database Management System
An Introduction to Database Management System A database is a collection of related files that are usually integrated, linked or cross-referenced to one another. The advantage of a database is that data and records contained in different files can be easily organized and retrieved using specialized database management software called a database management system (DBMS) or database manager. An Introduction continue DBMS Fundamentals A database management system is a set of software programs that allows users to create, edit and update data in database files, and store and retrieve data from those database files. Data in a database can be added, deleted, changed, sorted or searched all using a DBMS. If you were an employee in a large organization, the information about you would likely be stored in different files that are linked together. An Introduction continue Example 1 If you were an employee in a large organization, the information about you would likely be stored in different files that are linked together.
One file about you would pertain to your skills and abilities another file to your income tax status another to your home and office address and telephone number and another to your annual performance ratings. By cross-referencing these files, someone could change a person's address in one file and it would automatically be reflected in all the other files.
An Introduction continue Example 2 PUP Student Information System is a large database that handles the Students Profile, Course, subjects and grades, assigned faculty, rooms, and schedules. Each students can access the following from a separate files: Enrollment module Grades inquiry Schedule Calendar An Introduction continue DBMS are commonly used to manage: Membership and subscription mailing lists Accounting and bookkeeping information The data obtained from scientific research Customer information Inventory information Personal records Library information Hotel Reservation Airline Reservation Purchase and Order System
An Introduction continue The Advantages of DBMS Improved availability. One of the principle advantages of a DBMS is that the same information can be made available to different users. Minimized Redundancy. The data in a DBMS is more concise because, as a general rule, the information in it appears just once. Accuracy. Accurate, consistent, and up-to-date data is a sign of data integrity. Program and file consistency. Using a database management system, file formats and system programs are standardized. User-friendly. Data is easier to access and manipulate with a DBMS than without it. Improved Security. Some sources of information should be protected or secured and only viewed by select individuals. An Introduction continue The Disadvantages of DBMS There are basically two major downsides to using DBMSs. One of these is cost, and the other the threat to data security. Implementing a DBMS system can be expensive and time-consuming, especially in large organizations. Training requirements alone can be quite costly. Even with safeguards in place, it may be possible for some unauthorized users to access the database. In general, database access is an all or nothing proposition.
An Introduction Lesson Wrap-Up In this lesson, a database management system is defined, as well as its purposes and functions. One of the most powerful aspects of a DBMS is the ability to organize and retrieve data from different, but related, files. However, using databases and DBMSs has its advantages and disadvantages. An Introduction End of Lesson 4 Now that you have completed this lesson, you should be able to: Define the term database management system (DBMS). Describe the basic purpose and functions of a DBMS. Discuss the advantages and disadvantages of DBMSs.
Lesson 5 Types of Database Management System
Types of Database Management System DBMSs come in many shapes and sizes. For a few thousands of peso, you can purchase a DBMS for your desktop computer. For Example: MS ACCESS, MS SQL SERVER, & MySQL
For larger computer systems, much more expensive DBMSs are required. For Example: ORACLE & DB2 Types of Database continue There are four structural types of database management systems: Hierarchical. commonly used on mainframe computers, have been around for a long time. Network. are similar to hierarchical databases by also having a hierarchical structure. However, there are a few key differences. Relational. the relationship between data files is relational, not hierarchical. Hierarchical and network databases require the user to pass down through a hierarchy in order to access needed data. Object-oriented. represent a significant advance over their other database cousins. Able to handle many new data types, including graphics, photographs, audio, and video Types of Database continue Hierarchical Database
Types of Database continue Network Database Types of Database continue Relational Database
Types of Database Lesson Wrap-Up As we have seen, DBMSs come in many forms. The structures of different DBMSs have been compared and contrasted in an effort to help you realize their respective strengths and weaknesses. As a knowledge worker, you may one day be asked to select, design, and make decisions about a DBMS. Types of Database End of Lesson 5 Now that you have completed this lesson, you should be able to: Compare and contrast the structure of different database management systems. Define hierarchical databases. Define network databases. Define relational databases. Define object-oriented databases.
Lesson 6 Manipulation and Query Languages
Manipulation and Query Languages There are basically two ways of manipulating data using database software. One approach is to interact directly with the DBMS using a special language called a query language. In the second approach, a user interacts with the application program. The application program sends instructions to the DBMS, which then carries out the actions specified by the program. This lesson will focus on using query languages to perform data processing tasks. Manipulation continue Query Language Query language allows the user to interact directly with the database software in order to perform information- processing tasks using data in a database. It is usually an easy-to-use computer language that relies on basic words such as SELECT, DELETE, or MODIFY. Using query language and a computer keyboard, the user enters commands that instruct the DBMS to retrieve data from a database or update data in a database. Manipulation continue Structured Query Language (SQL) is one type of query language that is widely used to perform operations using relational databases.
Note: Remember that relational databases are composed of tables with rows and columns.
SQL can be used to retrieve information from related tables in a database or to select and retrieve information from specific rows and columns in one or more tables. One of the keys to understanding how SQL works in a relational database is to realize that each table and column has a specific name associated with it. Manipulation continue In order to query a table, the user specifies the name of the table (indicating the rows to be displayed) and the names of the columns to be displayed. A typical SQL query contains three key elements: SELECT (the column names to be displayed) FROM (indicates the table name from which column names will be derived) WHERE (describes the condition for the query) A typical SQL update contains three key elements: o UPDATE (indicate the table name) o SET (indicate the column name & the new value) o WHERE (describes the condition for the query) A typical SQL delete contains two key elements: DELETE FROM (indicate the table name) WHERE (describes the condition for the query) A typical SQL insert contains two key elements: o INSERT INTO (indicate the table name) [(column names)] o VALUES (indicate the values to be inserted in the database)
Manipulation continue Example No. 1 (Restaurant Table)
Find Chinese Restaurants Manipulation continue Example No. 1 (Restaurant Table)
Find Chinese Restaurants Manipulation continue Example No. 1 (Restaurant Table)
Find Chinese Restaurants SELECT All Columns FROM Restaurant Table WHERE Cuisine = Chinese Manipulation continue Output of Example No. 1 (Query Result)
Find Chinese Restaurants SELECT All Columns FROM Restaurant Table WHERE Cuisine = Chinese Manipulation continue Example No. 2 (Restaurant Table)
Find Chinese Restaurants with greater than 1000 Cost Manipulation continue Example No. 2
Find Chinese Restaurants with greater than 1000 Cost SELECT All Columns FROM Restaurant Table WHERE Cost > 1000 Manipulation continue Output of Example No. 2 (Query Result)
Find Chinese Restaurants with greater than 1000 Cost SELECT All Columns FROM Restaurant Table WHERE Cost > 1000 Manipulation continue Example No. 3 (Restaurant Table)
Find Restaurants in New York City Manipulation continue Manipulation continue Example No. 3 (Restaurant Table)
Find Restaurants in New York City SELECT All Columns FROM Restaurant Table WHERE City = New York City Manipulation continue Example No. 3 (Query Result)
Find Restaurants in New York City SELECT Columns FROM Restaurant Table WHERE City = New York City Example No. 4 (Restaurant Table)
Edit the Cost Value from Restaurants With Primaveras Restaurant Name from 1000 to 1005 Manipulation continue Example No. 4 (Restaurant Table)
Edit the Cost Value from Restaurants With Primaveras Restaurant Name from 1000 to 1005 Manipulation continue UPDATE Restaurant Table SET cost = 1005 WHERE ID = 1001 Example No. 4 (Update Result)
Edit the Cost Value from Restaurants With Primaveras Restaurant Name from 1000 to 1005 Manipulation continue UPDATE Restaurant Table SET cost = 1005 WHERE ID = 1001 Example No.5 (Restaurant Table)
Insert Record with ID = 1016, Restaurant Name = Tong Yang, State = NCR, City = Manila, Cost = 450, Cuisine = Chinese Manipulation continue Example No.5 (Insert Result)
Insert Record with ID = 1016, Restaurant Name = Tong Yang, State = NCR, City = Manila, Cost = 450, Cuisine = Chinese Manipulation continue INSERT INTO Restaurant Table (ID, Restaurant Name, State, City, Cost, Cuisine) VALUES (1016, TongYang, PH, Manila, 450, Chinese) Example No.6 (Restaurant Table)
Delete Record from Restaurant Table with ID = 1010 Manipulation continue DELETE FROM Restaurant Table WHERE ID = 1010 Example No.6 (Delete Result)
Delete Record from Restaurant Table with ID = 1010 Manipulation continue DELETE FROM Restaurant Table WHERE ID = 1010 Example No.6 (Restaurant Table)
Delete Record from Restaurant Table with ID = 1010 Manipulation continue Manipulation continue Other Capabilities and Query Languages SQL has many other capabilities, one of which is to be able to update and revise a relational database. Users may discover the need to add, delete, and/or change columns and rows in a database. Manipulation Lesson Wrap-Up Users rely on query language to manipulate data in a database. As you now know, there is more than one type of query language. SQL, for example, is widely used to manage relational databases. It is important to understand the purpose of query languages. Perhaps one day, you will have the opportunity to learn and use one of these languages to help your organization manipulate and extract meaning from one of its many databases. Manipulation End of Lesson 6 Now that we have completed this lesson, you should be able to: Define the term query language. Describe an example of a query language. Discuss the functions and capabilities of a query language.
Lesson 7 Data Security and Recovery Data Security and Recovery Who to give access to data, how to protect data, and how to recover lost data are important considerations for those responsible for designing and managing electronic databases. Data Security continue Database Security It is usually the responsibility of a database administrator to determine the different access privileges for different users of the system.
Most users will be allowed to view and retrieve some types of data and not others.
Some users are only allowed to view data in a database, while others who are qualified will be allowed to view and make changes to data in a database. Data Security continue The purpose of determining who has access, as well as the degree of access, is to protect the data from unauthorized use and sabotage.
Databases must also be protected physically from harm or accident. Some organizations have opted to store database files in a vault and limit employee access to the actual computer system using security devices that verify personal identity.
Data Security continue Data Recovery As with almost all complex forms of computer hardware and software, there is always the possibility of failure. Therefore, it becomes crucial for data administrators to have system recovery features in place to be able to recover database contents that are damaged or lost when problems occur. Performing an actual recovery can be a difficult task. Data Security continue Strategies for Data Recovery However, a variety of strategies may be used to facilitate system recovery when problems occur. Two of the more common approaches include mirroring and reprocessing. Mirroring involves making frequent simultaneous copies of a database to ensure that two or more copies are maintained in different locations at all times. Reprocessing involves going back to a known point of database activity before the problem occurred and reprocessing work from that point forward. Data Security Lesson Wrap-Up Preserving the integrity of a database depends on how well it is protected and the ability of database administrators and others to recover data that is lost or damaged. The quality and consistency of the data in a database can affect the quality of decisions made based on our interpretations of the data. Many databases have been developed at great cost, and contain data and information that is of immense value to end users. Therefore, it is critical that the right measures be taken to ensure that the data is secure and recoverable. Data Security End of Lesson 7 Now that we have completed this lesson, you should be able to: Justify the importance of data security. Describe some of the approaches used to provide database security. Describe the importance of data recovery. Identify some of the methods used to recover lost data.
Lesson 8 Database Development Process
Database Development Process Anyone with a desktop computer and the right software package can develop a small database. As we move to the development of large databases, such as those used by many business organizations, the task becomes much more complex. Before a new house can be built, architects must first develop a blueprint. A blueprint provides a symbolic representation of the house and its characteristics before it is actually created. In a similar manner, the process of developing an electronic database also depends on blueprints and advanced planning. Before a database can be created, developers must decide what data should be included and how the database should be structured. Database continue Database development is a systematic process that moves from concept to design to implementation. It also takes into account the needs of potential users and the operational and/or business processes in the organization.
Database continue Define Business Process Step One Many database development efforts begin by defining the key business and/or operational processes within the organization. Developers first create high-level models showing the major activity steps associated with marketing, sales, production, human resource management, public relations, research and development, and so on. Taken together, these process maps represent an enterprise-wide model of the organization and its core processes. Database continue Define Business Process Illustration
A Credit Approval Process Database continue Determine the scope of the database development effort: The next step in the database development effort is to select one process or a set of related processes for further analysis and improvement. Database continue Define the information needs Step three Once a business process (or set of processes) has been selected, the next step is to define the information needs of users involved in or affected by the business process. Identifying Objectives Defining Need Accessing Information systems Establishing Sources of Information Information Acquisition Use of Information
Database continue Develop Conceptual Design Step Four A basic understanding of these needs is used to create a conceptual design for the database. At this stage, a conceptual data model is created that illustrates relationships between information sources, users, and business process steps. Database continue Develop Conceptual Design Illustration
1:M 1:M place contains 1:M supplies has 0:M 1 1 1 1 Database continue Develop logical data model The conceptual data model is used to develop a logical data model based on one of the primary DBMS types: relational, hierarchical, network, or object-oriented approaches. Database continue Develop logical data model - Illustration 1 1:M 1 1:M 1 1 0:M 1:M Database continue Develop Physical design With the logical data model in hand, developers move to the physical design, which involves determining the specific storage and access methods and structures.
1:M place 1 contains supplies 1:M has 1:M 1 0:M 1 1 Database continue Create and Test database Once this step is complete, developers can go ahead and create the database using whatever DBMS has been selected. Small amounts of data can be entered into the database for testing purposes. This is also the time to start developing sample screens and reports to determine if the database design will meet the predefined requirements. It is much easier to revise and change the database during this testing phase, before all of the data have been entered. The term prototyping refers to the iterative process used to try different report formats and input screens to determine their suitability and effectiveness. Database continue Create and Test Database - illustration Using MS Access Database Lesson Wrap-Up The full potential of a database will only be realized if it is properly planned and developed. Database development is a systematic process that takes into account the needs of the organization and potential users. This lesson provides a high-level roadmap of the basic steps that are followed to created effective databases. By now you should understand the purpose and logic of the database development process.
Database End of Lesson 9 Now that we have completed this lesson, you should be able to: Break down the database development process into its key steps. Describe the tasks associated with each of the key steps.