Ruby on Rails, SQL Server, and dynamic “spider” Database Navigation

I’ve posted an article on The Code Project, which is the start of a web-based “database spider UI” — written in Ruby on Rails!  The implementation of this first cut accomplishes:

For the website:

  • Connect to SQL Server (yes, Ruby on Rails can connect to SQL Server.)
  • Use a separate database for session and other metadata store, leaving the database we’re connecting to for navigation untouched.
  • Rather than physical Models for each table, implement a dynamic Model.
  • Dynamic discovery of user tables and foreign key relationships by inspecting the database schema rather than relying on the Rails application schema (which would be otherwise generated from concrete Models backed by physical tables.)

For the user interface:

  • Selecting a table from a list
  • Viewing the data for that table
  • Selecting parent and child tables to navigate to
  • Selecting records to qualify navigation and display of parent/child records
  • Pagination
  • Breadcrumb trail of parent/child navigation

A tiny screenshot (see the article for a larger screenshot):



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s