Skip to content

Data Relationships

For an AI to answer questions across multiple tables (e.g., “Which customer bought the most products?”), it must understand how those tables are connected. AnalytAI uses a unique Triple-Tier Relationship System to map your data perfectly.


When you connect a SQL database, AnalytAI automatically reads your existing Foreign Key relationships. These are the “hard links” already defined in your database schema.

  • Status: Automatic & Instant.
  • Reliability: Highest (100% accuracy).

Often, databases have tables that should be linked but aren’t explicitly connected with Foreign Keys. AnalytAI uses a proprietary Cosmic Detection algorithm to find these hidden links.

  • How it works: The algorithm analyzes column names, data types, and actual data patterns to suggest potential relationships.
  • Approval: These relationships appear as “Pending” in your project settings. You can review and Approve them to activate them for the AI.

For complete control, AnalytAI provides a visual Manual Linking interface powered by React Flow.

  • Visualization: See your entire database schema as a visual map.
  • Creation: Simply click and drag a line from one column to another to create a relationship.
  • Compatibility: The system automatically validates that the data types (e.g., Number to Number) are compatible before allowing the link.

You can find all relationship settings in your Project SettingsRelationships tab.

  • Database List: Shows all hard links from your SQL schema.
  • Cosmic Suggestions: A list of links for you to “Accept” or “Reject”.
  • Manual Map: The visual canvas for custom relationships.