Skip to content
VJ Classes

One place to learn science, commerce, arts, computers and life skills

Your school or college keeps the roll numbers, marks and fees of thousands of students. The railway keeps data of crores of tickets. Such data is not stored in loose papers but in a database. This lesson explains the simple ideas behind it, and the file types you meet every day.

Data and information

Data is raw facts, such as 45, "Ravi" or "Jind". Information is data that has been processed and has meaning, such as "Ravi, roll number 45, lives in Jind". A database is an organised collection of related data kept together so it is easy to search and update.

A DBMS (Database Management System) is the software that creates and manages a database. Examples are MS Access, MySQL, Oracle and SQL Server. A DBMS reduces data redundancy (the same data repeated again and again), keeps data consistent and allows many users to share it safely.

Parts of a database

Data is kept in tables, which look like an Excel sheet.

Roll No Name City
101 Ravi Jind
102 Meena Rohtak
103 Sunil Hisar
  • Field (attribute): one column, such as Name.
  • Record (tuple): one row, such as all the details of Meena.
  • Table (relation): the whole set of records.
  • Primary key: a field whose value is unique for every record and is never empty. Roll No is a primary key, because two students cannot have the same roll number.
  • Foreign key: a field in one table that points to the primary key of another table. It links the tables.

Name is not a good primary key

Two students can have the same name, so Name cannot identify a record. A primary key must be unique, such as roll number, Aadhaar-linked ID or an account number.

RDBMS and SQL

A Relational DBMS (RDBMS) stores data in related tables. A school can have one table for students and another for marks. The two are joined using the roll number.

SQL (Structured Query Language) is the language used to talk to a relational database. Four basic commands are asked most.

Command Meaning
SELECT Read or search data
INSERT Add a new record
UPDATE Change existing data
DELETE Remove records

For example, SELECT Name FROM Students WHERE City = 'Jind' gives the names of all students from Jind.

Bank passbook

A bank has a Customers table and a Transactions table. Each transaction has the account number of the customer, which is a foreign key. The bank can find every transaction of one customer without keeping the customer's address again and again.

Files and extensions

A file is a named collection of data. A folder (or directory) holds files. The extension is the short code after the dot in the file name, which tells the computer which program can open it. In "result.pdf", pdf is the extension.

Type Common extensions
Text .txt, .docx, .pdf
Spreadsheet .xlsx, .csv
Presentation .pptx
Image .jpg or .jpeg, .png, .gif, .bmp
Audio .mp3, .wav
Video .mp4, .avi, .mkv
Compressed .zip, .rar
Program .exe
Web page .html
  • JPEG is best for photos and uses lossy compression.
  • PNG keeps quality and allows a transparent background.
  • GIF supports small animations.
  • PDF (Portable Document Format) keeps the look of a document the same on every device, so it is used for forms and results.
  • ZIP reduces file size by compression and puts many files in one.

Lossy compression removes some data to make the file smaller, and the lost detail cannot be recovered. Lossless compression makes it smaller without losing anything.

Digital documents

Marksheets, e-Aadhaar and income tax returns are often shared as PDF files. DigiLocker (digilocker.gov.in) is the Government of India's service for keeping such documents digitally.

Check yourself

  1. What is one row of a table called? (A record or tuple)
  2. Which SQL command adds a new record? (INSERT)
  3. Which image format allows animation? (GIF)

Main points

  • Data is raw facts; information is processed data with meaning.
  • A DBMS manages a database; MySQL, Oracle and MS Access are examples.
  • A primary key is unique for every record; a foreign key links two tables.
  • SELECT, INSERT, UPDATE and DELETE are basic SQL commands.
  • The extension tells which program opens a file; PDF is for fixed-layout documents.

Download all the notes of this course (PDF)

Doubts

Log in to ask a doubt

No answered doubts for this lesson yet.