π’οΈ Database & Schema
Connect MongoDB, PostgreSQL, and Oracle databases to your Sniffer project, pull schema snapshots, surface PII fields, and link schema objects to bugs.
π Overview#
Snifferβs Database module lets you attach real database schemas to your project so that bugs, code, and data are linked. When the AI analyzes a bug involving a SQL query, a 500 from a backend API, or a slow page, it can reference the actual schema β column types, indexes, PII tags, row counts β to give better fix suggestions.
Supports:
- π’ MongoDB
- π PostgreSQL
- π Oracle
πΌοΈ Insert image of the Databases page with several connected DBs listed.
Routes:
- Database list β
/sf/projects/:id/databases - Schema viewer β
/sf/projects/:id/databases/:alias/schema
β Connecting a Database#
- Navigate to Databases from the project sidebar.
- Click + Connect Database.
- Fill in the form:
Why a βConnection Refβ instead of password fields? Credentials are stored centrally in π’ Company Settings β SecretManagerΒ so the same DB can be reused across multiple projects without re-entering secrets.
- Click Test Connection to verify.
- Click Save β the DB appears in the list.
π Database List#
π Schema Viewer#
Click View Schema on any DB to open the Schema Viewer (/sf/projects/:id/databases/:alias/schema).
Top-Level Summary#
A summary header shows:
Health Indicators#
Sniffer flags common schema issues:
- π΅ Only-PK index β table has only a primary-key index (may be under-indexed)
- π‘ Over-indexed β too many indexes (write penalty)
- βͺ No fields β empty schema
- β« Empty objects β zero rows
- π£ Un-masked PII β PII field without auto-blur rule
Object Browser#
A tree on the left lists every object (table, view, materialized view, collection):
- Type icon next to the name
- Approximate row count
- β‘ Expand to see fields
Click an object to load the detail pane on the right.
πΌοΈ Insert image of the Schema Viewer with the object tree on the left and the detail pane on the right.
Object Detail Pane#
π PII Detection#
When schema is discovered, Sniffer automatically tags fields that look like PII:
email,phone,ssn,dob,address,name,credit_card,passport, β¦- Heuristics from field name + data-sample inspection
- Manually-tagged via the PII config in π’ Company Settings β PII ManagementΒ
Fields tagged as PII automatically:
- Get a β chip in the schema viewer
- Are added to the auto-blur list for screenshots/recordings
- Get masked in network log capture
- Trigger compliance alerts if accessed by un-authorized roles
πΌοΈ Insert image of a Schema Viewer table with PII fields highlighted.
π Refreshing Snapshots#
Snapshots are pulled on-demand and cached:
- Click Refresh to re-pull the schema immediately
- Schedule periodic snapshots from project settings (daily / weekly)
- Version history is kept β compare two snapshots to see drift
π Linking Bugs to Schema Objects#
When creating or editing a bug, you can link affected database objects:
- Open the π Bug DetailsΒ drawer
- Scroll to Database Objects section
- Click + Link Object and pick from a searchable list
- The bug now shows the affected schema in the π Bug DetailsΒ drawer and is queryable in the π DashboardΒ βHot Tablesβ widget
π€ AI Schema-Awareness#
When an external AI assistant connected via π€ MCP IntegrationΒ analyzes a bug with a linked DB object, it can:
- Suggest indexes for slow queries
- Identify columns missing in a SELECT
- Recommend joins
- Flag potential PII leaks in API responses
- Propose migrations
π Permissions#
π Troubleshooting#
See β Troubleshooting β Database Schema Not PullingΒ .