Data refers to raw facts and figures that can be collected, stored, and processed.
Examples of data include:
For example:
| Name | Age | Marks |
|---|---|---|
| Ali | 20 | 85 |
| Ahmed | 21 | 78 |
| Sara | 19 | 92 |
The names, ages, and marks in this table are examples of data.
Information is data that has been processed or organized to make it meaningful and useful.
Example:
Information helps people understand facts and make decisions.
Imagine a university with 10,000 students.
The university needs to maintain:
Managing this information manually using paper registers can be difficult.
A database provides an organized way to store, manage, retrieve, and update information.
| Organization | Database Usage |
|---|---|
| University | Student and examination records |
| Bank | Customer accounts and transactions |
| Hospital | Patient and medical records |
| Library | Books and member records |
| Shopping Website | Products and customer orders |
| Airline | Flights and passenger reservations |
dvdrental Sample DatabaseThe dvdrental database is a sample database commonly used for learning and practising PostgreSQL.
It represents a DVD rental business where customers rent films.
It contains sample information about:
Students can use this database to practise SQL queries with realistic business data.
Learning SQL requires practical examples.
Instead of working only with small tables containing a few records, students can use dvdrental to practise queries involving multiple related tables.
It helps students understand:
Some important tables include:
| Table Name | Description |
|---|---|
| actor | Stores actor information |
| film | Stores film information |
| category | Stores film categories |
| customer | Stores customer information |
| rental | Stores rental transactions |
| payment | Stores payment information |
| staff | Stores staff information |
| store | Stores store information |
| inventory | Stores film inventory |
| language | Stores language information |
The dvdrental database contains related tables.
For example:
film table stores information about films.actor table stores information about actors.customer table stores information about customers.rental table stores rental transactions.payment table stores payment transactions.These tables are connected through relationships.
For example, a rental record identifies the customer and the inventory item involved in a rental.
dvdrental database?1. What does DBMS stand for?
A. Database Management System
B. Data Backup Management System
C. Database Monitoring Software
D. Data Management Service
2. Which of the following is an open-source relational DBMS?
A. Microsoft Word
B. PostgreSQL
C. PowerPoint
D. Notepad
3. Which language is used to communicate with relational databases?
A. HTML
B. CSS
C. SQL
D. XML
4. A table consists of:
A. Rows and columns
B. Images and videos
C. Files and folders
D. Programs and functions
5. What is another name for a row?
A. Field
B. Record
C. Database
D. Schema
6. Which PostgreSQL tool provides a graphical interface?
A. psql
B. pgAdmin
C. pg_dump
D. pg_restore
7. Which key uniquely identifies a row in a table?
A. Foreign Key
B. Primary Key
C. Default Key
D. Secondary Key
8. Which table stores film information in the DVD Rental database?
A. customer
B. rental
C. film
D. payment
9. Which SQL command retrieves data from a table?
A. INSERT
B. DELETE
C. SELECT
D. UPDATE
10. Which of the following is a database management system?
A. PostgreSQL
B. Google Chrome
C. Microsoft Paint
D. Windows Explorer
Activity 1: Explore PostgreSQL
postgres database.SELECT version();
Activity 2: Explore DVD Rental
dvdrental database.public schema.film table.Activity 3: Identify Database Components
Choose any three tables from dvdrental and identify:
By completing this module, students should understand:
dvdrental sample database.Next Module: Module 2 – Database Management
In the next module, students will learn how to create, connect to, view, rename, and delete databases in PostgreSQL.