Presentation on theme: "1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and."— Presentation transcript:
1 Chapter 6 Secondary Storage
2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and data stored in main memory will disappear when the computer is turned off. n Secondary storage hold data and programs that are not currently being used by the processor, and provides permanent, nonvolatile storage of data and programs. n Other common terms for secondary storage are external storage and auxiliary storage.
3 Advantages of Secondary Storage n Convenient n Economical n Reliable n Large Capacity
4 The Hierarchy of Data Organization: Bits to Databases
5 Objectives 1. To describe and illustrate the relationships between the levels of the hierarchy of data organization. 2. Define the terms: character, field, record, and file. Give an example of each. 3. Explain the purpose of the key field.
6 Hierarchy of Data n Logical data structure - how data items are related or organized to have meaning. n Physical data structure - how data items are stored and located by the computer for processing. n Data is organized into several levels of complexity. There are six levels in this hierarchy: Bits Bits Bytes (characters) Bytes (characters) Fields Fields Records Records Files Files Databases Databases
7 Bit and Character n A character is the smallest unit of usable data. It is a single letter, numeral, punctuation mark, or other symbol (such as $ or %), and is represented within the computer as a unique combination of bits (byte). n A typically, a character code consists of seven or eight bits. n Whereas the bit is the basic unit of primary and secondary storage, the character is the basic unit for human perception.
8 Field n Just as single letters are combined to form words, characters are combined to form fields. n A field is a single item of information (such as a name) composed of a sequence of characters. n Fields contain specific kinds of information, such as employee names, social security numbers, addresses, etc. n Whereas the field is the general reference, the specific content of a field is called the. n Whereas the field is the general reference, the specific content of a field is called the data item. n For example, a social security number is a field, but the actual number, , is a data item.
9 Record n A record is a group of related fields that are treated as a unit. n A typical payroll record for an individual employee might include fields such as name, social security number, address, gross pay, taxes withheld, etc.
10 File n A file is a collection of records having one or more common characteristics or functions. n A file describes a class of items, while a record describes a particular member or element of that class. n The employee file contains a record for each employee. An inventory file contains a record for each inventory item. n In a computer system, files are usually stored on some auxiliary storage media such as magnetic tape or disks.
11 Database n The database is the data resource for every computer-based information system. n A database is a collection of files that are in some way logically related to one another. n In a database, the data are integrated and related so that data redundancy is minimized.
12 Database (continued) n For example, if records are kept in a traditional file environment at a university and a student moves, his or her address must be changed in all files that maintain address data (registrar, financial aid, health services, and so on). n In a database, employee-address data are stored only once and are made available to all departments. Therefore, only one update is needed.
13 n Figure 4.1 summarizes a hierarchy of data.
14 0, 1 Bits A Characters (Bytes) Dr. Mahmoud Wahdan Fields (Data elements) Wahdan …$1200 Records WahdanNohaWaleedWaelIslam Files Employee master Inventory master Customer master …Supplier master database Figure 4.1 Data Hierarchy
15 Hierarchy of Data: An Example
16 Key field n A key field is a particular field within a record that is used to identify and locate individual records within a file. n What distinguishes a key field from any other field is its use, and not how it is stored.
17 Key field n A record may be part of more than one file if it contains more than one key field. n For example, a particular record may be part of the personal file using the employee name as the key. At the same, the record may also be part of the payroll file using the social security number as the key. n A key field may be either (as a name) or (as a social security number). n A key field may be either alphabetic (as a name) or numeric (as a social security number).
18 Data Storage and Retrieval n Sequential access - data records are accessed one record after another, generally in the order in which they were stored. n Random access - data records are accessed (based on their relative positions in the file) in any order, without regard to which record was most recently accessed. n Indexed sequential access - data records can be accessed either sequentially or randomly (based on their key field values).
19 Sequential File Organization/Accessing
20 Random File Organization/Accessing
21 Indexed File Organization/Accessing
22 Magnetic Disk Storage
23 Magnetic Disks n Magnetic disks are the most common type of secondary storage technology. Because they may be accessed sequentially or randomly, magnetic disks are often called direct-access storage devices (DASDs). n There are two main types of magnetic disks: hard disks and diskettes. Hard disks are platters that are either fixed (permanently installed in the computer system) or removable. Hard disks are platters that are either fixed (permanently installed in the computer system) or removable. A diskette, also called a floppy disk, is a removable storage medium made of Mylar plastic. A diskette, also called a floppy disk, is a removable storage medium made of Mylar plastic.
24 Hard Disks for Large Systems n Hard disks usually consist of multiple platters mounted on a shaft and housed in a container called a disk pack. n Disks packs come in both removable and nonremovable forms. Removable disk packs are normally stored off-line and loaded into the computer system when needed. Removable disk packs are normally stored off-line and loaded into the computer system when needed. Nonremovable disk packs are permanently installed and sealed, making them much less vulnerable to contamination. Nonremovable disk packs are permanently installed and sealed, making them much less vulnerable to contamination.
25 Hard Disks for Microcomputers n The hard disk is a vital part of a microcomputer. Without the 200 MB to 1 GB drives that are typical today, applications would not be nearly as powerful and the data they use would be much less plentiful. n Hard cards are hard disks that are attached to add-in circuit boards that fit in a slot inside your computer. n Bernoulli drives (or other similar products) are considered to be removable hard disks. They are much slower than fixed hard drives, but have much greater capacity than floppy diskettes.
26 Locating Data on Disks
27 Accessing Data on a Disk
28 Reading and Writing Data n On a hard disk, data is written and read by a read/write head that floats on a cushion of air very close to the disk surface. On a diskette, the read/write head actually touches the disk surface. n Read/write heads are attached to a device called an access arm. The access arm is, in turn, attached to an actuator mechanism that moves the arm assembly in and out over the disk tracks.
29 Disk Access Time n The time it takes between entering a request for data and receiving the data is called the disk access time. n The time is dependent on three factors: Seek time - the time that the read/write head takes to move the desired track or cylinder. Seek time - the time that the read/write head takes to move the desired track or cylinder. Rotational delay time - the time it takes to complete the alignment. Rotational delay time - the time it takes to complete the alignment. Transmission time -. Transmission time - the time it takes to read the data from disk and transfer it to the computer.
30 Why Hard Disks are Sealed
31 Magnetic Tape Storage
32 Magnetic Tape Storage n Magnetic tape was developed to replace the earlier bulky, expensive method of storing data on punched cards. Today, it is used to store large, seldom used data files and for backup. n A backup is the copy of data or programs that is stored in a safe location to ensure that its preserved in case the original is damaged or destroyed.
33 Types of Magnetic Tape Storage n Reel-to-reel tapes, which look like audio tapes, are typically 1/2 wide with lengths ranging from 200 to 3600 feet. Reel-to-reel tapes use two reels: the supply reel and the take-up reel that is usually mounted permanently in the tape drive. n Cassette tapes look like small versions of reel-to-reel, but with both reels contained in a plastic case. They are used on a variety of computer systems. n Cartridge tapes are really closer to the reel-to-reel because the tape is wrapped around a supply reel contained in a plastic case.
34 Magnetic Tape Drive
35 Tape Cassette
36 Tape Cartridge
37 Representing Data on Tape n There are two types of tape formats. n In the nine-track format, one byte of data is recorded vertically across the tape plus the error- detecting parity bit. n In serpentine formats, the bits are recorded horizontally along anywhere from 18 to 32 tracks.
38 Bits on the Tape
39 Other Storage Media
40 Storage Media Capacities
41 Mass Storage Systems n Mass storage systems (MSS) are capable of storing as much as 500 Gigabytes (500+ billion characters). n MSSs combine the low cost of magnetic tape with the direct-access capabilities of magnetic disks. Because they are also relatively slow and hard to maintain, their days are numbered.
42 Optical Disk Storage n One of the newest forms of high-density storage is optical disk storage, of which there are three basic technologies: CD-ROM, WORM and magneto-optical. n Optical disk storage takes advantage of the precision of laser technology to place bits on the storage media with a very high density. n It offers several advantages over magnetic tape and magnetic disks, including greater data density, lower expense (bit-for-bit), extreme durability and little danger of data loss due to mechanical problems.
43 CD-ROM n CD-ROM (compact disk read-only-memory) disks are produced by using a focused laser to burn pits into the disk surface. To read the data, a laser- photodetector mechanism is used. n One CD-ROM can store over 500 MB of data, more than a whole encyclopedia.
44 WORM n A type of optical storage that allows data to be written to a disk once, but read as many times as the user wishes, is called a write once, read many (WORM) disk. n WORM disks are made of plastic or glass covered by a thin layer of metal that a laser beam can mark. To write data, the laser burns a hole into, or raises a bubble on, the surface of the metal. n Reading the data requires a laser-photodetector mechanism similar to that used on the CD-ROM.
45 Magneto-Optical n The most popular erasable optical disk technology is called magneto-optical. As its name implies, this technology makes use of both magnetics and laser optics. n Magnetic particals (similar to that used on disk drive and tape surfaces) are embedded in a material that changes from a solid to a plastic when enough heat is applied - by a laser. Data is written when a magnet aligns the embedded particles while the material is in its plastic state. n Reading the data requires another laser-photodetector device.