Download presentation
Presentation is loading. Please wait.
Published byHeather Hampton Modified over 8 years ago
1
Introduction to Computing Slides By ADEELA MUSTAFA
2
Database Management (10 th –Chapter) Databases, Data, and Information A database is a collection of data organized in a manner that allows access, retrieval, and use of that data. Data is a collection of unprocessed items, which can include text, numbers, images, audio, and video. For example, you can type text on a keyboard, talk into a computer’s microphone, transfer photos taken with a digital camera to a computer, and capture motion and sounds with a video camera and store the recordings on a computer.
3
Database Management Information is processed data, it is organized, meaningful, and useful. In addition to documents, information can be in the form of audio, images, and video. For example, voice communications can be sent in an e-mail message for a family member and friend or coworker to hear. We can say that computers process data in a database into information. Database software called a database management system (DBMS), users create a computerized database; add, modify, and delete data in the database; sort and retrieve data from the database and create forms and reports from the data in the database.
6
Database Management Data Integrity For a computer to produce correct information, the data that is entered into a database must have integrity. Data integrity identifies the quality of the data. An erroneous student address in a student database is an example of incorrect data. When a database contains this type of error, it loses integrity. The more errors the data contains, the lower its integrity. Garbage in, garbage out (GIGO) is a computing phrase that points out the accuracy of a computer’s output depends on the accuracy of the input. If you enter incorrect data into a computer (garbage in), the computer will produce incorrect information (garbage out).
7
Database Management The Hierarchy of Data a database contains files (sometimes called tables), a file contains records, a record contains fields, and a field is made up of one or more characters. Characters a bit is the smallest unit of data the computer can process. Eight bits grouped together in a unit comprise a byte. In the ASCII coding scheme, each byte represents a single character, which can be a number (4), letter (R), space, punctuation mark (?), or other symbol (&). The Unicode coding scheme, by contrast, uses one or two bytes to represent a character.
8
Database Management Fields A field is a combination of one or more related characters or bytes and is the smallest unit of data a user accesses. A field name uniquely identifies each field. When searching for data in a database, you often specify the field name. A database uses a variety of characteristics, such as field size and data type, to define each field. The type of data in a field is an important consideration. The data type specifies the kind of data a field can contain and how the field is used. Text (also called alphanumeric) — letters, numbers, or special characters Numeric (also called number) — numbers only AutoNumber — unique number automatically assigned by the DBMS to each added record
9
Database Management Currency — dollar and cent amounts or numbers containing decimal values Date (also called date/time) — month, day, year, and sometimes time Memo — lengthy text entries Yes/No (also called Boolean) — only the values Yes or No (or True or False) Hyperlink — E-mail address or Web address that links to a Web page on the Internet or document on a local network. Object (also called BLOB for binary large object) — photo, audio, video, or a document created in other programs, such as word processing or spreadsheet, stored as a bitmap in the database fields have a text data type; the Postal Code field has a number (numeric) data type. The E-mail Address field has a hyperlink data type, Date Admitted a date/time data type, and Photo an attachment data type.
10
Database Management Records A record is a group of related fields. For example, a student record includes a set of fields about one student. A primary key is a field that uniquely identifies each record in a file. The data in a primary key is unique to a specific record. the primary key consists of multiple fields, called a composite key. Files A data file is a collection of related records stored on a storage medium such as a hard disk or optical disc. A Student file at a school might consist of thousands of individual student records. Each student record in the file contains the same fields. Each field, however, contains different data. Typical fields about people often include First Name, Last Name, Address, City, State, Postal Code, and E-mail Address.
11
Data types of fields in the Instructor and Student files. A sample data file, stored on a hard disk, that contains four records, each with eleven fields.
12
Database Management File maintenance refers to the procedures that keep data current. File maintenance procedures include adding records to, modifying records in, and deleting records from a file. Adding Records Modifying Records Deleting Records Validating Data Validation is the process of comparing data with a set of rules or values to find out if the data is correct. Many programs perform a validity check that analyzes data, either as you enter it or after you enter it, to help ensure that it is correct.
13
Database Management Alphabetic/Numeric Check An alphabetic check ensures that users enter only alphabetic data into a field. A numeric check ensures that users enter only numeric data into a field. For example, data in a First Name field should contain only characters from the alphabet. Data in a Postal Code field should contain numbers (with the exception of the special characters such as a hyphen). Range Check A range check determines whether a number is within a specified range. Assume the lowest per credit hour fee at the school is $75.00 and the highest is $370.75. A range check for the Credit Hour Fee field ensures it is a value between $75.00 and $370.75.
14
Database Management Completeness Check A completeness check verifies that a required field contains data. For example, some fields cannot be left blank others require a minimum number of characters. One completeness check can ensure that data exists in a Last Name field. Another can ensure that a day, month, and year are included in a Birth Date field. Other Checks DBMSs that include the hyperlink and attachment data types can perform validity checks on data entered in those fields. Hyperlink entries can be tested to ensure that the Web address follows the correct format and that the link works. Similarly, an attachment entry can be validated by confirming that the file exists.
15
Database Management File Processing versus Databases Almost all application programs use the file processing approach, the database approach, or a combination of both approaches to store and manage data. File Processing Systems In the past, many organizations exclusively used file processing systems to store and manage data. In a typical file processing system, each department or area within an organization has its own set of files. The records in one file may not relate to the records in any other file. however, have two major weaknesses: they have redundant data and they isolate data.
16
Database Management Data Redundancy Each department or area in an organization has its own files in a file processing system. Thus, the same fields are stored in multiple files. If a file processing system is used at a school, for example, the Student file and the Student Schedule file both might store the same students’ names and addresses. Duplicating data in this manner wastes resources such as storage space and people’s time. When new students are added or student data is modified, file maintenance tasks consume additional time because people must update multiple files that contain the same data. Data redundancy also can increase the chance of errors. If a student changes his or her address, for example, the school must update the address wherever it appears. If the Address field is not changed in all the files where it is stored, then discrepancies among the files exist.
17
Database Management The Database Approach When an organization uses a database approach, many programs and users share the data in the database, While a user is working with the database, the DBMS resides in the memory of the computer. Instead of working directly with the DBMS. Reduced Data Redundancy Most data items are stored in only one file, which greatly reduces duplicate data. For example, a school’s database would record a student’s name and address only once. When student data is entered or changed, one employee makes the change once.
18
Database Management Improved Data Integrity When users modify data in the database, they make changes to one file instead of multiple files. The database approach increases the data’s integrity by reducing the possibility of introducing inconsistencies. Shared Data The data in a database environment belongs to and is shared, usually over a network, by the entire organization. This data is independent of, or separate from, the programs that access the data. Organizations that use databases typically have security settings to define who can access, add, modify, and delete the data in a database.
19
Database Management Easier Access The database approach allows nontechnical users to access and maintain data, providing they have the necessary privileges. Many computer users also can develop smaller databases themselves, without professional assistance. Reduced Development Time It often is easier and faster to develop programs that use the database approach. Many DBMSs include several tools to assist in developing programs, which further reduces the development time. Databases also have some disadvantages. A database can be more complex than a file processing system. People with special training usually develop larger databases and their associated applications. Databases also require more memory, storage, and processing power than file processing systems.
22
Database Management Database Management Systems A database management system (DBMS), or database program, is software that allows you to create, access, and manage a database. DBMSs are available for many sizes and types of computers. Whether designed for a small or large computer, most DBMSs perform common functions.
24
Many database management systems run on multiple types of computers
25
Database Management Data Dictionary A data dictionary, sometimes called a repository, contains data about each file in the database and each field in those files. For each file, it stores details such as the file name, description, the file’s relationship to other files, and the number of records in the file. For each field, it stores details such as the field name, description, field type, field size, default value, validation rules, and the field’s relationship to other fields. Because the data dictionary contains details about data, some call it metadata (meta means more comprehensive). Sometimes, a data dictionary also contains data about programs and users. It might keep track of who accessed data and when they accessed it. The data dictionary is a crucial backbone to a DBMS. Thus, only skilled professionals should update the contents of a data dictionary.
27
Database Management Query Language A query language consists of simple, English-like statements that allow users to specify the data to display, print, or store. Each query language has its own grammar and vocabulary. A person without a programming background usually can learn a query language in a short time a query language can be used to maintain (add, modify, and delete) data. Query by Example Most DBMSs include query by example (QBE), a feature that has a graphical user interface to assist users with retrieving data.
30
This figure shows how to use the Simple Query Wizard.
31
Database Management Form A form, sometimes called a data entry form, is a window on the screen that provides areas for entering or modifying data in a database. You use forms (such as the Student Maintenance Form to retrieve and maintain the data in a database. To reduce data entry errors, well designed forms should validate data as it is entered. When designing a form using a DBMS, you can make the form attractive and easy to use by incorporating color. A form that sends entered data across a network or the Internet is called an e-form, short for electronic form. E-forms generally use a means to secure the data while it is transported across the network. Often, the data in the e-form automatically enters in, or updates existing data in, a database on the network or the Internet. Thus, many DBMSs include the capability of creating e-forms.
33
Database Management Report Generator A report generator, also called a report writer, allows users to design a report on the screen, retrieve data into the report design, and then display or print the report Unlike a form, you use a report generator only to retrieve data. Report generators usually allow you to format page numbers and dates titles and column headings; subtotals and totals; and fonts, font sizes, color, and shading. Many allow you to include images, for example, a product catalog with photos and descriptions of products.
35
Database Management Data Security A DBMS provides means to ensure that only authorized users access data at permitted times. In addition, most DBMSs allow different levels of access privileges to be identified for each field in the database. These access privileges define the actions that a specific user or group of users can perform. Access privileges for data involve establishing who can enter new data, modify existing data, delete unwanted data, and view data.
36
Database Management Relational, Object-Oriented, Data Models for Popular DBMSs and Multidimensional Databases Every database and DBMS is based on a specific data model. A data model consists of rules and standards that define how the database organizes data. A data model defines how users view the organization of the data. It does not define how the operating system actually arranges the data on the disk. Three popular data models in use today are relational, object-oriented, and multidimensional. A database typically is based on one data model. For example, when using a relational database, users work with the relational data model. Some databases are called object-relational databases because they combine features of the relational and object-oriented data models.
37
Database Management Relational Databases A relational database is a database that stores data in tables that consist of rows and columns. Each row has a primary key and each column has a unique name. a file processing environment uses the terms file, record, and field to represent data. A relational database uses terms different from a file processing system. A developer of a relational database refers to a file as a relation, a record as a tuple, and a field as an attribute. A user of a relational database, by contrast, refers to a file as a table, a record as a row, and a field as a column.
38
Database Management A relational database also stores data relationships. A relationship is a link within the data. In a relational database, you can set up a relationship between tables at any time. The tables must have a common column (field). A developer of relational databases uses normalization to organize the data in a database. Normalization is a process designed to ensure the data within the relations (tables) contains the least amount of duplication.
39
Relationships among some tables in the School database. For example, the Schedule of Classes table is related to the Instructor table through the Instructor ID column
40
Database Management SQL Structured Query Language (SQL) A popular query language that allows users to manage, update, and retrieve data. SQL has special keywords and rules that users include in SQL statements. Most relational database products for servers and mainframes include SQL. Many personal computer databases also include SQL. The structure and wording in SQL statements may differ slightly among database management systems.
41
Database Management Object-Oriented Databases An object-oriented database (OODB) stores data in objects. An object is an item that contains data, as well as the actions that read or process the data. A Student object, for example, might contain data about a student such as Student ID, First Name, Last Name, Address, and so on. It also could contain instructions about how to print a student transcript or the formula required to calculate a student’s grade point average. A record in a relational database, by contrast, would contain only data about a student. Object-oriented databases have several advantages compared with relational databases: they can store more types of data, access this data faster, and allow programmers to reuse objects. An object-oriented database stores unstructured data more efficiently than a relational database.
42
Database Management A multimedia database stores images, audio clips, and/or video clips. For example, a GIS (geographic information system) database stores maps and other geographic data. A voice mail system database stores audio messages. A television news station database stores audio and video clips. A groupware database stores documents such as schedules, calendars, manuals, memos, and reports. Users perform queries to search the document contents. For example, you can search people’s schedules for available meeting times. A computer-aided design (CAD) database stores data about engineering, architectural, and scientific designs. Data in the database includes a list of components of the item being designed, the relationship among the components, and previous versions of the design drafts.
43
This Web application allows you to view the contents of a GIS database.
44
Database Management Object Query Language Object-oriented and object-relational databases often use a query language called object query language (OQL) to manipulate and retrieve data. OQL is similar to SQL. OQL and SQL use many of the same rules, grammar, and keywords. Because OQL is a relatively new query language, not all object databases support it. Multidimensional Databases A multidimensional database stores data in dimensions. Whereas a relational database is a two-dimensional table, a multidimensional database can store more than two dimensions of data. These multiple dimensions, sometimes known as a hypercube, allow users to access and analyze any view of the database data.
45
Database Management The key advantage of the multidimensional database is that it can consolidate data much faster than a relational database. A relational database typically does not process and summarize large numbers of records efficiently. With a multidimensional database, users obtain summarized results very quickly. For example, a query that takes minutes or hours to execute in a relational database will take only seconds to execute in a multidimensional database. No standard query language exists for multidimensional databases. Each database uses its own language. Most are similar to SQL.
46
Database Management Data Warehouses One application that uses multidimensional databases is a data warehouse. A data warehouse is a huge database that stores and manages the data required to analyze historical and current transactions. Through a data warehouse, managers and other users access transactions and summaries of transactions quickly and efficiently. Some major credit card companies monitor and manage customers’ credit card transactions using a data warehouse. The database in a data warehouse usually is quite large. Often, the database is distributed. The data in a distributed database exists in many separate locations throughout a network or the Internet. The data is accessible through a single server. The data’s location is transparent to the user, who usually is unaware that the data is stored in multiple servers.
47
Database Management Data warehouses often use a process called data mining to find patterns and relationships among data. A state government could mine through data to check if the number of births has a relationship to income level. Many e-commerce sites use data mining to determine customer preferences. A smaller version of a data warehouse is the data mart. A data mart contains a database that helps a specific group or department make decisions. Marketing and sales departments may have their own separate data marts. Individual groups or departments often extract data from the data warehouse to create their data marts.
48
Database Management Web Databases One of the more profound features of the Web is the vast amount of information it provides. The Web offers information about jobs, travel destinations, television programming, photos, movies, videos, local and national weather, sporting events, and legislative information. You can shop for just about any product or service, buy or sell stocks, search for a job, make airline reservations, register for college classes, and check semester grades. Much of this and other information exists in databases that are stored on the Web or are accessible through the Web. Some Web databases are collaborative databases, where users store and share photos, videos, recordings, and other personal media with other registered users
49
Database Management A Web database usually resides on a database server. A database server is a computer that stores and provides access to a database. One type of program that manages the sending and receiving of data between the front end and the database server is a CGI (Common Gateway Interface) script. CGI scripts run automatically as soon as you click the button to send or receive information. Writing a CGI script requires computer programming skills.
50
Media sharing Web sites store users’ digital videos, photos, and other media in a collaborative database, the contents of which are shared with other registered users.
51
Database Management Database Administration Managing a company’s database requires a great deal of coordination. The role of coordinating the use of the database belongs to the database analysts and administrators. To carry out their responsibilities, these IT (information technology) professionals follow database design guidelines and need cooperation from all database users.
53
Database Management Role of the Database Analysts and Administrators The database analysts and administrators are responsible for managing and coordinating all database activities. The database analyst (DA), or data modeler, focuses on the meaning and usage of data. The DA decides on the proper placement of fields, defines the relationships among data, and identifies users’ access privileges. The database administrator (DBA) requires a more technical inside view of the data. The DBA creates and maintains the data dictionary, manages security of the database, monitors the performance of the database, and checks backup and recovery procedures. In small companies, one person often is both the DA and DBA. In larger companies, the responsibilities of the DA and DBA are split among two or more people.
54
Database Management Role of the Employee as a User Employees should learn how to use the data in the database effectively. The amount of information available often amazes first-time database users. Instant access to information helps employees perform their jobs more effectively. For example, assume you want to change your class schedule. You call your advisor to find out other sections that have seats available. The advisor reads to you a list of available classes and enrolls you in the one you prefer. Today, employees access databases from their office desktop computers, notebook computers, or even smart phones and other mobile devices.
55
End Thank You All (have a nice day)
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.