Design a lending database and recover its records
CompTIA Tech+ FC0-U71 objectives 5.1–5.4
Notebook question
Two students check out the same laptop at the same time. What could go wrong in a shared flat file?
Lesson notes
A relational schema defines tables, fields and constraints. A primary key uniquely identifies a row; a foreign key refers to another table. Tables suit structured records, JSON documents hold semistructured data, and photos are unstructured. Key/value stores retrieve a value by key. Persistent storage survives restarting the app.
Investigation
Build Devices(DeviceID, Model) and Loans(LoanID, DeviceID, Returned) with three fictional rows each. Reject a duplicate DeviceID and a loan for a missing device. Filter open loans, join to model names and produce a count by model. Compare a local offline copy and a cloud database for concurrent users, speed, growth and availability. Decide which data is critical, what a usage trend might tell a buyer, and why correlation alone cannot explain it. Discuss monetization and when data volume or variety requires big-data tools.
Show your learning
Submit the tables, one rejected record, and a purchasing recommendation supported by your report. Name the backup you would restore after accidental deletion.
