Files: TXT, CSV, and JSON
Text files store text. CSV represents rows and columns. JSON organizes values as objects, arrays, and other types and is common for data exchange. A format does not automatically provide a complete data-management system.
Browser local storage can retain information, but it normally belongs to the current browser and website origin. It does not automatically sync across devices and can be cleared.
An exported task JSON file can carry titles and completion states. It is useful for backup or transfer; simultaneous editing requires additional conflict handling.
Take this with you · When asking to save data, specify where, for how long, and who can access it.
A system for organizing and querying
A database system organizes, queries, and updates data. In relational databases, a row is a record and a column is a field. Constraints can prevent certain invalid records from entering.
A database is not automatically faster, nor does it necessarily mean cloud storage. Files may suit a small project; growing query, concurrency, permission, and consistency needs can justify a dedicated system.
A task table might have id, title, done, and created_at. Update by stable ID so identical titles don't confuse two different records.
Take this with you · Sketch the fields and relationships before choosing a storage solution with AI.
Create, read, update, delete
CRUD names four common operations on data. Many interface features map to creating, reading, updating, or deleting records.
Completing a task usually updates done rather than deleting the task. Showing unfinished tasks usually filters a read rather than erasing completed records. Different operations have different consequences.
After you turn off an unfinished-only filter, completed tasks should reappear. If they were actually deleted, the implementation did the wrong thing.
Take this with you · Distinguish filtering, updating, and deleting in your requirements.
Your first little data table
Create, read, update, and delete rows. Turn on unfinished-only filtering to see why filtering is not deletion.
| id | title | done | Action |
|---|---|---|---|
| 1 | Meet data | ||
| 2 | Learn a concept |
Stored: 2 · Visible: 2. Remove the filter to see retained records again.
This is an in-memory table for learning operations, not a connection to a database.
Tables and other ways to organize information
Relational databases emphasize tables, relationships, and constraints, commonly queried with SQL. NoSQL refers to a family of other models, including documents, key-value stores, and graphs, not just flexible documents.
Every model needs thoughtful data and query design. Flexibility doesn't remove rules, and a relational model doesn't mean putting everything into a single rigid table.
Users and tasks can be separate tables linked by user_id. One user can have many tasks, with ownership recorded explicitly.
Take this with you · Explain what data exists, how it relates, and how you usually query it before choosing a database.
Indexes: faster lookup with a cost
An index maintains an auxiliary structure for certain lookups, like a book's index. It can reduce the records examined by some queries, but uses space and adds maintenance work during updates.
Indexing every field is not automatically best. Start with real queries, execution plans, and measurements. A simple scan may already be sufficient for a small dataset.
Frequent email lookups may benefit from an email index. For a ten-task list, correctness is more urgent than a distributed indexing system.
Take this with you · Measure performance rather than adding technology in response to a vague feeling of slowness.
You want completed tasks hidden now but available later. What should happen?
Choose an answer before reading the explanation.
Describe your task fields, saving scope, and filtering behavior.
Think first, then uncover help as needed. Later chapters expect more complete descriptions and clearer checks.
Bring this chapter's context to your AI. Going deeper is optional; you can keep reading without it.
Explain tables, rows, fields, IDs, and CRUD using an address book.
One approach you can make your own
I'm learning computers and AI-assisted programming from scratch. In this chapter I learned: Data:Distinguish files, browser storage, and databases;Describe features with fields, records, and CRUD;Understand the benefits and costs of an index Explain tables, rows, fields, IDs, and CRUD using an address book. Check my understanding first. Explain one small question at a time with a concrete example and the limits of any analogy. Ask a scenario question, then adapt to my answer. Distinguish facts, guesses, and uncertainty; suggest hands-on ways to check. Confirm the version before giving tool-specific advice, and don't invent features or references.
Complete this chapter
Mark the sections as read, finish the experiment, and pass the scenario check to record completion. You can visit the next chapter at any time.
Read the original references
This is an introduction. These official resources help you check details and explore further.
PostgreSQL · The SQL LanguageMDN · Web Storage APIOne computer can handle many needs. What changes when the data and workload grow much larger?