Skip to Content
InsightsDatabase & Schema

πŸ›’οΈ 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#

  1. Navigate to Databases from the project sidebar.
  2. Click + Connect Database.
  3. Fill in the form:
FieldRequiredDescription
Aliasβœ… YesFriendly name (used in queries and bug links)
Engineβœ… YesMongoDB / PostgreSQL / Oracle
Connection Refβœ… YesReference to stored credentials in Company SecretManager
EnvironmentNoDev / Staging / Prod tag
Default SchemaNo(Postgres / Oracle) β€” schema/owner to focus on
Scope Field PolicyNoOptional JSON rules defining tenant-scope columns (e.g., org_id)

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.

  1. Click Test Connection to verify.
  2. Click Save β€” the DB appears in the list.

πŸ“‹ Database List#

ColumnDescription
AliasFriendly name
EngineMongo / Postgres / Oracle chip
EnvironmentDev / Staging / Prod
Object CountTables / Collections discovered
Last SnapshotWhen the schema was last pulled
Statusβœ… Healthy Β· ⚠️ Stale Β· ❌ Unreachable
ActionsView Schema Β· Refresh Β· Edit Β· Delete

πŸ” 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:

MetricDescription
Total ObjectsTables + views + collections
Total FieldsSum of fields across all objects
Total IndexesSum of indexes
Approx RowsApproximate row count
Health ScoreComposite score (see below)
PII Coverage% of PII fields with masking rules
Last SnapshotWhen this snapshot was taken

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#

SectionContents
DDLReconstructed CREATE statement
FieldsName, type, nullable, default, PII flag, indexed flag
IndexesName, fields, unique?, type
Approx RowsEstimated count
Linked BugsSniffer bugs that reference this object
Scope CoverageWhether the tenant-scope column is present

πŸ” PII Detection#

When schema is discovered, Sniffer automatically tags fields that look like PII:

Fields tagged as PII automatically:

  1. Get a β›” chip in the schema viewer
  2. Are added to the auto-blur list for screenshots/recordings
  3. Get masked in network log capture
  4. 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:

  1. Open the πŸ› Bug DetailsΒ  drawer
  2. Scroll to Database Objects section
  3. Click + Link Object and pick from a searchable list
  4. 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#

ActionRequired Permission
View databases / schemaDATABASE.VIEW
Connect a databaseDATABASE.CONNECT
Refresh / snapshotDATABASE.CONNECT
Edit PII tagsPII.EDIT
Delete databaseDATABASE.DELETE

🐞 Troubleshooting#

See ❓ Troubleshooting β†’ Database Schema Not PullingΒ .


TopicDescription
🏒 Company Settings β†’Β SecretManager / PII Management live here
πŸ› Bug Details β†’Β Link bugs to schema objects
πŸ€– MCP Integration β†’Β Lets your editor’s AI use the schema

Β© 2026 Your Company