Menu

Memory & Storage

Storage

Contents

  1. Secondary Storage
  2. Types of Secondary Storage
  3. Hard Disk Drives (HDDs)
  4. Magnetic Tape
  5. Solid State Storage
  6. Optical Storage
  7. Comparing Storage Devices
  8. Choosing Storage for an Application

Secondary storage is storage that keeps its contents when the power is switched off, which makes it non-volatile. It holds the operating system, your programs and your files for the long term, so everything is still there the next time you switch the computer on. A smartwatch's built-in flash memory and an external hard drive plugged into a desktop computer are both examples of secondary storage.

Why computers need it

Primary storage has a small capacity compared with secondary storage, and RAM is volatile: switch off the power and everything in RAM disappears. RAM is also expensive, so it could never store an operating system, several open programs and a folder full of videos all at once. Secondary storage solves these problems, because it keeps data without power and gives you far more room at a much lower cost per gigabyte.

The CPU still cannot run a program straight from secondary storage. When you open a program, its instructions and the file you are working on are copied into RAM, and the CPU fetches them from there. That is why a large program takes a moment to start: the copy has to happen first.

How it compares with primary storage

FeaturePrimary storage (RAM)Secondary storage
Keeps data without powerNoYes
CapacitySmallMuch larger
Cost per gigabyteHighLow
SpeedVery fastSlower
Reached directly by the CPUYesNo, only after copying into RAM

Internal and removable

Secondary storage can be internal, fixed inside the computer, or external and removable, such as a microSD card you slot into a portable speaker to play stored music. Removable storage is handy for backing up files and for taking them to a different place. Backup is only one use, though: the operating system and your programs sit on secondary storage permanently, not just as a spare copy.

Secondary storage comes in three common types: magnetic, solid state and optical. Each type uses a different method to store data, and each one has a family of devices and media that use it.

TypeHow data is storedDevices and media
MagneticSmall areas of a surface are magnetised, and each area is set to one of two magnetic states to store 1s and 0sHard disk drive (HDD), magnetic tape
Solid stateData is stored electronically in circuits, with no moving partsSolid state drive (SSD), USB flash drive, SD card, built-in flash memory
OpticalA laser is used to read the pattern of marks on a discCD, DVD, Blu-ray disc

A storage type is only a category, such as solid state. A storage device or storage medium is one particular item inside that category, such as an SSD or an SD card. So an SSD is not a type of storage; it is a device that belongs to the solid state type. In the same way, a Blu-ray disc is a medium of the optical type, and magnetic tape is a medium of the magnetic type.

Keeping the two ideas apart matters because an answer has to match the wording of the question. If you are asked for a type, write solid state rather than naming an SSD, because an SSD is a device. If you are asked for a device, name something specific such as a USB flash drive rather than saying solid state. For example, a question that asks which type of storage an SD card uses is answered with solid state, because the SD card is one particular device inside that category.

A hard disk drive (HDD) is a magnetic storage device. It stores data using magnetism on surfaces inside the drive, so it belongs to the magnetic type of storage.

HDDs offer high capacity, so one drive can hold a very large number of files, such as a family's whole collection of photos and videos. Their speed is medium: they are slower than solid state storage, so an SSD loads programs more quickly, but they are faster than optical storage. They also have a low cost per gigabyte, which makes them a cheap way to store lots of data.

Moving parts bring risks

An HDD contains moving parts that work while the drive is running. A drop or knock can damage these parts, especially if the drive is being used at the time. The movement also means the parts wear out over time. Strong magnets placed near an HDD can damage the data too, because the data is stored magnetically.

Fixed or portable

An internal HDD is fixed inside a computer and is not designed to be carried around. An external portable HDD can be connected by a cable and moved between places, but it is larger and heavier than flash storage such as a USB flash drive. If you need to carry a lot of data in a pocket, flash storage is easier to carry. If you need lots of space at low cost and the drive can stay in one place, an HDD is a good fit.

Magnetic tape is a magnetic storage medium. The tape comes in a cartridge, and a tape drive reads data from it and writes data to it.

Very high capacity, very low cost per gigabyte

Magnetic tape holds a huge amount of data in one cartridge. It also has a very low cost per gigabyte, so storing each gigabyte costs very little. This makes tape cheap when you need to keep a large collection of files for a long time.

Sequential access is slow for one file

Magnetic tape uses sequential access. The drive must read the tape in order from the start, so to reach a file near the end it winds past everything before it. For example, a school radio club stores 500 recordings on one tape. To play recording 480, the drive must pass recordings 1 to 479 first, which takes time. Having lots of capacity does not make finding one file quick; the order is the reason access is slow.

Best for backup and archiving

Because tape is cheap for huge amounts of data but slow to search, it suits backing up or archiving large amounts of data that are rarely read back. A backup is a spare copy you can restore if the original is lost, and an archive is data you keep for the long term but hardly ever open. A local history society could copy thousands of scanned photographs and recordings onto tape and keep the cartridges safe for many years. Writing it all in one long run is cheap, and nobody needs to jump to one file quickly, so the slow search does not matter. Tape is a poor choice for files you are working on now, because you would wait for the drive to wind through the tape.

Solid state storage keeps data using electronic circuits. It has no moving parts at all, which explains most of how it behaves: nothing spins, nothing slides and nothing has to be moved into position before data can be read or written.

Devices that use solid state storage

  • Solid state drives (SSDs) – fitted inside a computer instead of a hard disk drive.
  • USB flash drives and SD or microSD cards – removable storage you plug into a device.
  • Built-in flash memory – solid state storage fixed inside a device, such as the internal storage of a phone or tablet.

Speed and capacity

With no parts to move, an SSD can find and read data almost immediately. SSDs are the fastest type of secondary storage and have medium to high capacity. If a school replaced the drives in its office computers with SSDs, the machines would reach the login screen in seconds rather than minutes, and large programs would open far sooner.

Strengths

  • Durable – with no moving parts it survives drops, knocks and vibration, and magnets do not damage the data.
  • Portable – small and light, so it is easy to carry and connect, which suits moving files between devices.
  • Low power and silent – nothing spins, so it drains a battery slowly and makes no noise.
  • Reliable – there is no fragile mechanism to fail, so it keeps working over long periods of repeated use.

Solid state storage has a higher cost per gigabyte than magnetic storage, so holding the same amount of data costs you more. It also does not last for ever: each part of the memory can only be erased and rewritten a certain number of times, so a drive that is heavily used will eventually stop storing data properly and need swapping for a new one.

USB flash drives and memory cards usually hold less than a full-size SSD, but they are still small, light, durable and easy to plug in. Built-in flash memory is the same technology inside a device, where being tiny, using little power and coping with shocks matters most.

Optical storage uses a laser to read data from a disc. The three common optical media are CDs, DVDs and Blu-ray discs. A Blu-ray disc generally holds more than a DVD, and a DVD generally holds more than a CD.

An optical drive reads a disc, and some drives can also write to it. Not every disc can be written: a read-only disc (ROM, such as a CD-ROM) is fixed when it is made and can only be read, an R disc (such as a DVD-R) can be written once and then only read, and an RW disc (such as a DVD-RW) can be rewritten many times. For example, a read-only disc might hold the finished video of a school show, while an RW disc could be reused for each year's rehearsals.

Weaknesses

Optical storage has a low capacity and is slow next to magnetic and solid state storage. A disc holds far less than a hard disk or SSD, and reading or writing data takes longer. A disc is thin and light, which makes it easy to carry and post, but it only works in an optical drive, and many modern computers no longer have one.

Discs are also fragile. They are easily scratched, cracked or snapped, and because the laser reads the surface, a scratch can make part of the data unreadable. They can degrade over time too, especially if they are stored badly, such as in a hot, sunny or damp place.

Where discs are useful

Optical discs are inexpensive to buy, and making them in large batches keeps the price low. That makes them a practical way to hand out copies of media, such as a museum giving visitors an audio guide on CD, and for small backups or archives, such as a family keeping a copy of old photographs on a disc in a drawer. They are less suitable for everyday work where you need lots of space and quick access.

To compare storage devices and media fairly, you use six characteristics: capacity, speed, portability, durability, reliability and cost. Each one shows a different strength or weakness, so a fair comparison uses all six.

  • Capacity — how much data the device or medium can hold.
  • Speed — how quickly data can be written to it and read back from it.
  • Portability — how easily it can be carried somewhere else and connected to another device, including its size and weight.
  • Durability — how well it resists physical harm such as drops, knocks, vibration, scratches, heat and magnets.
  • Reliability — how dependably it keeps working and keeps data intact, without errors, over long periods and repeated use.
  • Cost — the purchase price, and above all the price of each gigabyte stored.

How the types compare

CharacteristicMagnetic HDDSolid stateOptical discMagnetic tape
CapacityHighHighLowVery high
SpeedSlower than solid stateFastestSlowSlowest at finding one file
PortabilityFixed drives stay in the case; portable ones are bulkySmall, light, easy to connectThin and light but needs a driveNeeds a drive; cartridges are clumsy
DurabilityKnocks and magnets can harm itNo moving parts; resists knocks and magnetsScratches easilyMust be stored carefully
Cost per gigabyteLowHighestCheap per disc, poor per gigabyteLowest of all

In order of speed, solid state is fastest, then a magnetic HDD, then optical. Magnetic tape is slowest at finding one file because it reads in order from the start, so it suits copying whole archives rather than picking out a single file.

Magnetic and solid state storage hold the most data, while an optical disc holds very little. Hard disks and tape are cheapest per gigabyte and solid state the dearest, so keeping a large amount of data costs least on a hard disk. A disc is cheap to buy, but holding so little makes its cost per gigabyte poor.

Solid state is the most portable and the most durable: it is small, light, unaffected by magnets and has no moving parts for a knock to disturb. An HDD can be damaged by knocks, especially while its disks spin, and a scratch can make part of an optical disc unreadable. Reliability is about longer use: storage that loses data after repeated use, or degrades while stored, is less reliable even if nothing has been dropped.

Worked example: a 2 TB hard disk costing £60 works out at about 3p per gigabyte, while a 1 TB solid state drive costing £120 works out at 12p per gigabyte. The solid state drive is faster and tougher, but each gigabyte costs four times as much.

Choosing storage for an application means picking a device or medium that suits the job, then explaining why it suits it. More than one answer can be sensible — a USB flash drive or an external SSD might both work — so what counts is how well you justify your choice using the characteristics that matter.

Weigh up the characteristics

  • Capacity — compare it with how much data must be stored and how large the files are. 200 high-resolution photos need far more room than a few text documents.
  • Speed — compare it with how quickly data must be read or written. Files only copied onto storage to carry them can be slower; programs run from it need fast reading.
  • Portability and durability — consider whether the storage will be carried, or used where it may be knocked or vibrated.
  • Reliability — matters for storage kept a long time or used again and again.
  • Cost — think about the purchase price and the cost per gigabyte, not just one or the other.
  • Compatibility — does it need an extra drive or connection? A USB flash drive needs no separate drive, but an optical disc needs an optical drive.

Match the type to the job

Solid state storage suits portable use, places with knocks or vibration, fast access, low power and silence. Magnetic storage suits high capacity at low cost where the device will not be moved much. Optical storage suits cheap physical distribution or a small archive where low capacity and slow access are acceptable.

A worked example

A small family-run campsite takes bookings on a laptop in a wooden reception hut powered by a solar panel and battery. An SSD is a strong choice: it draws little power, has no moving parts to suffer when the laptop is carried out to a pitch, and opens the booking program quickly. The owner also keeps ten years of scanned paperwork and hundreds of site photos, rarely opened and never taken off site, so a high-capacity HDD is the better buy — room per pound counts for more than speed when files are only checked now and then.