Page 54 - CT_AI_Class-7
P. 54
Databases
A database is a system that stores data in an organised way. Think of it like a school library that
keeps track of all the books. The library organises its information in tables (like bookshelves), with
rows (each row is a book) and columns (each column stores specific details about the book, such
as its title, author or genre).
For example, if you wanted to find a book, the library’s database can quickly show you where
it is, its title, author and whether it’s available or checked out. Here are some key terms to
understand:
Table: A collection of similar data, like a list of all the students in your class.
Row (Record): One entry in the table, like details about one student.
Column (Field): Specific information about each record, like the student’s name or marks.
Imagine an online store that uses a database to store details about all the products they sell. Each
product has its own row in the table, with columns for its name, price and description. When you
search for a product, the database helps you find it by quickly looking through these rows and
columns.
Data Formats
Data formats refer to the ways information is stored, organised and represented. Like how books
are arranged on different shelves in a library, data can be stored in various formats depending on
its type and use. Understanding data formats helps you choose the best way to store and work
with data.
Text Files
Text files store data as plain text. They can be opened with any
basic text editor like Notepad.
Plain text files: Store only text with no special formatting.
CSV files: Store data in a table format with commas
separating each item.
Tab-separated files: Similar to CSV but with tabs separating
items.
Example: A list of students and their scores stored in a CSV file
looks like this:
Sunshine, 85
Happy, 78
Flower, 92
You can open this in Excel or Google Sheets to see the data in a neat table.
52 Artificial Intelligence (CT & AI)-VII

