Chapter 15 Databases I. DATABASE Definition: a collection of related data that can be sorted, logically organized, queried and stored. o Used to create a structure for data and allow processed data to be used and interpreted o Business transactions create data that needs to be managed and stored o Can turn data into useable information LISTS vs USING DATABASE 20 years ago, teachers would keep student grades in books or lists. At report card time, all the lists would be compiled. Now schools use databases to organize grades. o Problems with lists: Lead to data redundancy Lack of proper updating of information can lead to data inconsistency Lists are difficult to secure Data inconsistency occurs when different versions of the same data are presented in different lists. Lists work well for short tasks. Use database when the data is more complex ADVANTAGES OF USING DATABASE Allow for the storage of large amounts of data efficiently and securely Enable data sharing and help to secure data integrity Allow for centralization where data is maintained in only one file II. DBMS Allows users to create, modify, and access a database Makes it easy to create the forms and reports that make databases useful Common DBMS Software o Microsoft access o Oracle Database o Microsoft SQL Server DBMS software is compromised of five subsystems: o DBMS Engine o Data definition o Data manipulation o Application Administration o Data Administration III. DATA INTEGRITY Is the database reliable, accurate and aligned to the goals of the organization? o The way data is entered greatly impact its integrity o Data centralized (keeping data in one databases) helps increase data integrity Multiple lists = information can become inconsistent causing decreased integrity IV. TYPES OF DATABASES Individual Database: a combined set of data files intended to be used by one person Company Database: created for use by an organization. Users access the database through the company local area network (LAN) Distributed Database: data in a database is stored in different physical locations and accessed via client/server networks Commercial Database: large database that covers specific subjects. Commercial databases are also referred to as information utilities or data banks V. DATABASE HIERARCHY Databases are structured in a hierarchy with characters starting at the lowest point and database at the highest point. This diagram represents the hierarchy of data commonly used in databases. VI. DBMS STRUCTURE- RELATIONAL Organizes data into tables based on structured data groupings o Use links called relationships between tables o Information in tables is stored in rows (records) and columns (fields) o A common field that is included in both tables is used to create the relationship o VII. DATABASE TABLE In Microsoft access o Table in a database is a collection of associated records o This table includes 18 unique records Databases often have more than one table VIII. DATABASE FIELD Field: Column in a table that represents a characteristic of someone or something. o Move from field to field by using the left or right arrow buttons on keyboard with left click on the mouse Examples: Member ID, First Name, Last Name, Zip code, etc. DATA TYPE AND FIELD PROPERTIES: Design view lets you change field names and field properties Data type specifies the data in field such as text, numeric or date/time Setting data types for each field decreases data input mistakes As you move from one field to the next the field properties change Wide array of field properties you can adjust Examples would be start time, number, currencies, auto number, Etc. FIELDS TO INCLUDE IN A TABLE: When designing a database, first determine the categories of data that will be included Categorize the data in a database o Characteristics of Fields: Uniquely identify each data category you need to capture Should not combine two separate pieces of data IX. DATABASE RECORD Record: a collection of related fields in a data file o Collection of characteristics that describe of identify on entity o referred to as a row in a table Select a record by moving cursor to the left of the record you want to select then click left mouse button You can also select a record by using the buttons at the bottom of the table X. DIFFERENCE BETWEEN A PRIMARY AND A FOREIGN KEY PRIMARY KEY Primary Key: a special relational database field designated to uniquely identifying all records in a table o Must contain a unique value o Cannot contain null values Most individuals deal with primary keys but don't realize it Examples are student ID numbers, Social Security numbers, and customer ID numbers FOREIGN KEY An entity relationship diagram (ERD)in Microsoft Access o ERD illustrates the use of a foreign key In a relational database that foreign key is a common field between tables that’s not the primary key XI. RELATIONSHIPS Relationships: A link between tables that defines how the data is related o common field between 2 tables used to create link o a relationship takes 1 of 3 forms Microsoft Access is a relational database o organizes data into various tables based on logical groupings o In design viewselect designrelationships XII. FORMS Forms: Used to control how data is entered into database o Structured data input to ensure data integrity o Data is entered into the blank areas of the form o Forms turn data into information o Forms are created using DBMS structure Navigate to enter records that have forms using the buttons at bottom of forms window XIII. DATABASE REPORTS Reports: Offer a way to view format and summarize the information in a database o Can be used to display of distribute a summary of data and archive snapshots of the data o Use to provide details about individual records and to create labels XIV. QUERY Query= a question- a request for information from a database o Information is generated using specific language o Structured query language (SQL) is one of the most poplar query languages o Queries can filter based on a specific criterion, calculate/summarize data and automate data management