Free Study Material

Memory & Data Management

Introduction

The Memory Unit from the last chapter isn't one single thing — a computer actually uses several different kinds of memory, each suited to a different job.

Concept

  • Primary Memory — directly accessible to the CPU, and split into two kinds:
    • RAM (Random Access Memory) — volatile: holds data only while the computer is powered on, and loses it completely the moment power is cut. Used for whatever the CPU is actively working with right now.
    • ROM (Read Only Memory) — non-volatile: retains its data even without power. Typically holds fixed startup instructions the computer needs before an operating system has even loaded.
  • Secondary (Storage) Memory — non-volatile, much larger capacity, but slower than primary memory: a Hard Disk Drive (HDD), a Solid State Drive (SSD), a USB pen drive.
  • Cache Memory — a very small, very fast memory sitting between the CPU and RAM, storing the data the CPU is likely to need next, to avoid waiting on slower RAM.
  • Units: memory is measured in bits and bytes, scaling up — Kilobyte (KB), Megabyte (MB), Gigabyte (GB), Terabyte (TB) — each roughly 1,000 times the one before it.

Explanation

"Volatile vs. non-volatile" is the single most exam-relevant distinction in this topic: RAM's speed comes at the direct cost of losing everything on power-off, which is exactly why a document you haven't saved disappears in a power cut — it was still sitting only in RAM, never yet written to secondary storage.

Note: Cache, RAM, and secondary storage form a speed-vs-capacity trade-off in that exact order — cache is fastest and smallest, secondary storage is slowest and largest, with RAM in between on both counts.

Summary

Primary memory (RAM, volatile; ROM, non-volatile) is directly CPU-accessible; secondary memory (HDD, SSD, pen drives) is non-volatile and much larger but slower; cache memory is small and very fast, sitting between the CPU and RAM. Memory capacity is measured in bytes, scaling from KB through MB, GB, and TB.

💾 Understanding Memory

Memory is the storage space in the computer where data is to be processed and instructions required for processing are stored. Computer memory is measured in Bits and Bytes.

Measuring Memory (Units)

The smallest unit of data is a Bit (Binary Digit). Every piece of data you see is just a collection of 0s and 1s.

Unit Equivalent To
Nibble4 Bits
Byte (B)8 Bits
Kilobyte (KB)1024 Bytes
Megabyte (MB)1024 KB
Gigabyte (GB)1024 MB
Terabyte (TB)1024 GB

Primary Memory (Main Memory)

Directly accessible by the CPU. It is fast but usually has limited capacity.

  • RAM (Random Access Memory): Volatile memory. It stores data currently in use. When the power goes off, data is lost.
  • ROM (Read Only Memory): Non-volatile. It stores permanent instructions like the BIOS (Basic Input/Output System) needed to start the computer.

Secondary Memory (Storage)

Used for permanent storage of data. It is non-volatile and much larger than primary memory.

HDD / SSD
Internal Storage
Pen Drive
Flash Storage
Cloud Storage
Remote Storage
⚠️ Data Deletion & Recovery (IP Focus)

When you "Delete" a file, the computer doesn't immediately erase the data. It simply marks that space as "Available." Until new data overwrites it, the old data can often be recovered using special tools. This is why Data Security is vital when disposing of old hard drives!

Introduction

"Deleting" a file feels final, but it's worth understanding exactly what actually happens on the storage device — because it's rarely what it looks like.

Concept

  • Deletion (everyday sense) — moving a file to the Recycle Bin / Trash. The file's data is untouched; only its location changes, and it can be restored with no loss.
  • Deletion (permanent sense) — emptying the Recycle Bin, or deleting directly. Even then, the file's actual data usually still physically exists on the storage device — only the pointer marking that space as "in use" is removed, freeing the space for something else to eventually overwrite it.
  • Data Recovery — specialised software can often retrieve "permanently deleted" data, precisely because it's still physically present, as long as nothing has overwritten that space yet.

Explanation

This is why a genuinely sensitive file needs secure deletion software (which deliberately overwrites the freed space, usually more than once) rather than ordinary deletion — ordinary deletion only removes the pointer, leaving the actual data recoverable for as long as nothing happens to write over that same physical location.

Note: The longer a device keeps being used after a "permanent" deletion, the less likely recovery becomes — every new file written increases the chance of overwriting the old, still-present data.

Summary

Everyday deletion just moves a file to the Recycle Bin, fully recoverable. Even "permanent" deletion typically only removes the pointer to the data, not the data itself — which is exactly why recovery software can often retrieve it, and why genuinely sensitive data needs secure deletion (deliberate overwriting) instead.

🗑️ What Happens When You Delete?

When you delete a file from your computer, it doesn't actually disappear immediately. Understanding this is crucial for Data Privacy and Digital Forensics.

How Deletion Works

Think of your Hard Disk as a Book and the file system as the Index (Table of Contents):

  • The "Delete" Command: The computer doesn't erase the content of the "page." It simply removes the entry from the Index and marks that space as "Available."
  • Data Residue: The actual 0s and 1s remain on the disk until a new file needs that space and overwrites them.

🔄 Data Recovery

Data Recovery is the process of retrieving deleted or inaccessible data from storage media when it cannot be accessed normally. Special software can scan the "available" space on a disk to find data that hasn't been overwritten yet.

🔐 Security Concerns

Because data persists after deletion, simply "emptying the trash" is not enough when disposing of a device. To truly protect your privacy, you must use:

Method Description
Data Shredding Software that overwrites the space with random 0s and 1s multiple times.
Degaussing Using strong magnets to disrupt the magnetic field of HDDs (rendering them unreadable).
Physical Destruction Physically breaking or crushing the storage chip/disk.

Introduction

Now that you know deleted data often isn't really gone, this topic covers the practical side of that fact: keeping stored data safe, both from being lost and from falling into the wrong hands.

Concept

  • Backup — keeping a separate, current copy of important data on another device or location, so a single device failing doesn't mean the data is gone.
  • Password Protection — restricting who can open a file or device to only those who know the correct password.
  • Encryption — scrambling data into an unreadable form, so that even if it's accessed without permission, it can't actually be read without the correct key to reverse the scrambling.
  • Physical Security — protecting storage devices themselves from theft, loss, or physical damage.

Explanation

Backup and encryption solve two genuinely different risks, not the same one: a backup protects against losing data (a device fails or is stolen), while encryption protects against that data being read by someone unauthorised, even if they do get hold of it — a stolen unencrypted laptop's data is instantly readable, while a stolen encrypted one is not, which is exactly why sensitive data benefits from both together, not either alone.

Note: A backup that lives right next to the original device (like on the same desk) is a weak backup — it fails the exact scenario, theft or physical damage to that location, a backup exists to protect against.

Summary

Storage security rests on four practices: Backup (protects against data loss), Password Protection (restricts access), Encryption (makes data unreadable without the right key even if accessed), and Physical Security (protects the device itself) — backup and encryption specifically address two different risks: losing data, and someone unauthorised reading it.

🛡️ Security Concerns in Storage

Storing data isn't just about saving it; it's about making sure it stays Private, Available, and Unchanged. There are several ways our stored data can be compromised.

1. Major Threats to Stored Data

In Informatics Practices, we categorize storage threats into three main areas:

Physical Damage

Hard drives can fail due to drops, heat, moisture, or age (Hardware crashes).

Unauthorized Access

Hackers or unauthorized users viewing sensitive files stored on your local or cloud drive.

Data Corruption

Malware (Viruses/Ransomware) or software glitches that make files unreadable.

2. How to Protect Stored Data

To ensure data remains secure, professionals use a "layered" defense strategy. Here are the most common methods:

Strategy Real-World Example
Encryption Converting data into an unreadable code (Ciphertext). Even if stolen, the data is useless without the Key.
Access Control Using Passwords, PINs, or Biometrics (Fingerprints) to restrict who can open the storage.
Backups Keeping a second copy of data on a separate drive or Cloud. (Essential for fighting Ransomware).
Firewalls & Antivirus Software that prevents malware from entering the system and corrupting stored files.

Want the full course?

Unlock all chapters, video lectures, and SQL practice exercises.

Get Full Access