Copyright © Prentice Hall Database Management Systems Chapter 13 Getting Data Together
Copyright © Prentice Hall Applications Tools Recall that there are three main applications tools: Word processorsWord processors SpreadsheetsSpreadsheets DatabasesDatabases This chapter will focus on databases.
Copyright © Prentice Hall Databases A database is an organized collection of related data. Phone books, file cabinets, and index cards are non- computer versions of a database.
Copyright © Prentice Hall Database Management System (DBMS) A database management system is software that helps you organize data in a way that allows fast and easy access to the data. DBMS
Copyright © Prentice Hall Advantages of Databases There are several advantages to using a database to organize data, including: Reduced redundancyReduced redundancy Integrated dataIntegrated data IntegrityIntegrity
Copyright © Prentice Hall Reduced Redundancy Data can be retrieved from any place in the database so that many specific data items need not be repeated.
Copyright © Prentice Hall Integrated Data A database is considered integrated because any item of data can be used to satisfy an inquiry or report.
Copyright © Prentice Hall Integrity File integrity means that the data is accurate and up-to- date. As data redundancy is reduced, data integrity increases.
Copyright © Prentice Hall Building Blocks of Databases Like a phone book, a database is a collection of related data. The parts that make up that collection include: Data items and fieldsData items and fields RecordsRecords FilesFiles
Copyright © Prentice Hall Data Items and Fields A phone book contains fields: CapronH.123 Digit LastFirstAddressPhone In each field, there are data items
Copyright © Prentice Hall Records Using the phone book analogy, each individual is a record. The larger the city, the more records it contains. CapronH.123 Digit NoyesD.341 Market FellC.2467 Buyer
Copyright © Prentice Hall Files Continuing with the phone book analogy, the book is the collection of records. In a database, this collection of records is the database file.
Copyright © Prentice Hall Database Power The power of a database is in the relationship between data in one field to that in another—even when the data is in different files. The user is often not aware of the complexity of the database structure—only how to use it.
Copyright © Prentice Hall Creating a Database Planning is as important to creating databases as it is to spreadsheets.
Copyright © Prentice Hall File Structure A user needs to first design the structure of the file they need.
Copyright © Prentice Hall Begin With a Sketch Careful planning will include a paper sketch of the file structure and the kind of data that will be put into each field.
Copyright © Prentice Hall Field Name Each field must have a unique name. LastFirstAddressPhone
Copyright © Prentice Hall Field Type There are four commonly used types of fields: CharacterCharacter NumericNumeric DateDate LogicLogic
Copyright © Prentice Hall Character Field Type Character fields contain descriptive data (text). Which of these fields are character fields? LastFirstAddressPhone
Copyright © Prentice Hall Numeric Field Type This field type contains numbers used for calculation. Our phone book analogy contains no numeric field types since calculations are not performed on the data. Think of a database that would need numeric field types.
Copyright © Prentice Hall Data Field Type Date field types are needed when the contents of the field will contain dates. Think of a database that would need data field types.
Copyright © Prentice Hall Logical Field Type This field type is used when the contents will contain true/false, yes/no conditions.
Copyright © Prentice Hall Field Widths Field width determines the maximum number of characters or digits to be contained in the field, excluding decimal points.
Copyright © Prentice Hall Key Fields A key field is a field that has been designated as the field on which an inquiry to the database will be based. LastFirstAddressPhone In the above example, Address is the key field.
Copyright © Prentice Hall Entering Data Using the paper version as a template, the file structure is set up on the computer database. Later, data items are entered into each field.
Copyright © Prentice Hall Using a Database The following operations are available to use with a database once data items have been entered. List records List records List specific fields List specific fields Query Query Add records Add records Modify records Modify records Delete records Delete records
Copyright © Prentice Hall List the Records Listing records means to display existing records on the screen or print them on paper. The user might need to scroll to see all the records in a database.
Copyright © Prentice Hall List Specific Fields A database might contain dozens of fields. Being able to list specific fields allows a user to only view or print some of the fields. In addition, the fields can be sorted in a particular order.
Copyright © Prentice Hall Query A query allows a user to find all records that match a key field. In the phone book example, a user could find all people (records) who have the same last name (key field).
Copyright © Prentice Hall Add New Records At any given time, new records can be added to a database. In addition, new fields can be added.
Copyright © Prentice Hall Modify Records At any given time, the data items can also be modified. Modifying records is necessary to keep them updated and accurate.
Copyright © Prentice Hall Delete Records Deleting records is another important option for database file maintenance.
Copyright © Prentice Hall Conclusion There are many database options beyond the basic features discussed in this presentation. The best way to learn more about a database management system is to use one.