Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best way to view a table with *lots* of columns?

At the risk of being downmodded, I want to ask what the best mechanism (best is obviously subjective for the practice violation inherent here) for viewing data from a table, using C#, with a lot of columns. By a lot, I mean something like 1000.

Now before you get all click happy, or throw out responses like "why the hell would you ever have a table with that many columns" let me say that it's actually part of a design requirement. We are collecting data as fast as we can from 1000 data points. We need to store these as fast as possible, hence the flat table. The data needs to be directly accessible from SQL Server, hence the database (we're using SQL Compact with table-direct).

So let's forget, for now, all that we've learned about proper database design, the rules of normalization, etc. and just focus on the fact that I have a table with 1000 columns and I want to be able to display the data on screen to verify that the data is actually going in there.

I've tried a data grid. It pukes because (not surprisingly) it's not designed to handle that many columns.

I've tried using the viewer in Studio. It pukes after 256, plus the end user won't have Studio installed anyway.

For now the result need not be pretty, it need not be updateable, nor does it need to be sensitive to data changes - just a static snapshot of data in the table at a given point in time.

Relevant (or semi-relevant) info:

  • Table has 1000 columns (read above before getting click happy)
  • Using SQL Compact version 3.5
  • Running on the desktop
  • Looking for a managed-code answer
like image 651
ctacke Avatar asked Nov 05 '08 23:11

ctacke


People also ask

How do I display the contents of a table?

Select names of tables in the grid, then right-click and select Display Rows from the shortcut menu, or select Display Rows from the File menu. You can use ctrl or shift to select more than one table name, or use the Select All and Invert Selection options on the Edit menu or the grid shortcut menu.

How many columns can a view have?

2 Answers. Show activity on this post. According to the MySQL 5.7 reference manual, there is a maximum of 4096 columns per table.

How many columns does a table in Design view display?

Each tab contains two columns and various rows. To create a column in the Design View, click an empty cell under Field Name and type the desired name. To change the name of an existing column, double-click its name in the Field Name column to select it and type the desired name.


1 Answers

If you're going to implement your own custom user control, you could do a Fisheye Grid like this:

Dead image link

This example shows a full-size 3x4 panel moving around within a 9x10 table. Since (I assume) you don't need to edit this data, the UI could just be something where the user grabs the panel and drags it around. If you're really masochistic and/or have lots of free time, you can even have multiple fisheye panels on the same grid, allowing you to compare one or more regions of the grid simultaneously.

Update: Silverlight has one of these, apparently. Sort of.

like image 159
MusiGenesis Avatar answered Oct 15 '22 07:10

MusiGenesis