Database study
The data arm surveys tables, relationships, the foreign keys that actually exist, money and date types and soft deletes, before anyone writes a query.
Deliverable: database map, with what exists and what is missingOcto for databases · data arm
Constraints and foreign keys give you control over the data; money calls for an exact type. Octo's data arm works at this step: it studies tables, relationships, actual foreign keys, money and date types and soft deletes before any query or change. The development arm only changes the database when the approved plan says so, with the rollback ready. Access to the production database is authorized by the tech lead.
Four possible deliverables. Migrations, the model and production access are approved by the tech lead.
The data arm surveys tables, relationships, the foreign keys that actually exist, money and date types and soft deletes, before anyone writes a query.
Deliverable: database map, with what exists and what is missingWhen the plan calls for a database change, the migration comes with its rollback, and a bulk change shows up front how many rows it will touch.
Deliverable: migration and rollback for approvalPoints out where the database relies only on the code: a foreign key that doesn't exist, a money column with an inexact type, a field that should be required.
Deliverable: list of proposed constraintsMaps where personal data lives and checks that passwords, session identifiers and sensitive personal data don't end up in the log.
Deliverable: personal data map for the data protection officerThe same Octo cycle, applied to this step. Each arm has a narrow role; your company's tech lead is in charge and approves.
Which database, which version, where it runs and how the system connects to it.
Tables, relationships, actual foreign keys, money, dates and soft deletes.
Personal data, credentials and what the log records.
Migration, rollback and order: database before code.
The migration runs with the rollback ready and the row count shown beforehand.
Queries through the real path after the migration, by content.
The migration ships before the code that depends on it.
The database map goes into the system dossier.
Octo studies and proposes; approving migrations and the model, authorizing access to the production database and deciding retention and handling of personal data with the data protection officer are up to your team.
Reference rules. The documentation for the database your company uses remains the reference; the type points come from PostgreSQL.
| Rule | What Octo checks | Basis |
|---|---|---|
| Referential integrity | Foreign key declared wherever there is a relationship | PostgreSQL, constraints |
| Money | Exact type (numeric), never real or double precision | PostgreSQL, numeric types |
| Injection | Parameterized query | OWASP Top 10 2025, A05 |
| Log | No passwords, no session identifiers, no sensitive personal data | OWASP, Logging Cheat Sheet |
Three steps. Each one only makes sense once the previous one has shown results on your team.
A proposal, not a promise
The data arm studies the database you already have, without changing anything.
Every database change now comes with a rollback and a count beforehand.
The missing constraints are added gradually, each one in its own task.
Each point below has a source published by the organization responsible for the standard, the specification or the tool, or in Brazilian federal law. The sources are in the next section.
7
points with a published source, each with its reference alongside.
Octo prepares everything, but does not sign. The document of record stays with whoever is accountable for it.
Maps, plans, codes on the task branch, reviews with evidence and prepares the release: plans, code, reviews, security reports and the system dossier.
Deliverable: material ready for reviewWhoever is in charge is the company's tech lead or senior developer: they approve the plan, review the PR and merge it. Nothing goes to production without their approval.
Step: approval by whoever is in chargeOcto does not sign and is not accountable for the system. The tech lead accepts the risk and is accountable for the system in production; a security report or opinion is signed by a professional at the company.
Accountable: the company's tech leadPostgreSQL documentation, OWASP and federal legislation published on the Planalto website. Accessed October 31, 2026.
The assessment starts with the database you already have, read-only, without changing anything. You get the map and decide with it in hand.