Solved

Database Developement Theory. One table with 500 columns vs 1000 individual Tables.

Posted on 2016-10-17
5
66 Views
Last Modified: 2016-10-18
Thank you all in advance!

We are importing legacy data from 100's of tables. Those tables have very similar columns. In fact 35% or so of the column are the same columns that are actually capturing the same data type. Quick origin story on that, the legacy application has one table for each webform. Thus, over time, the deployment of 100s of webforms has lead to 100's of tables.

I want to clean this up. If I can. To that end, I read Sql Server 2016 can have a max of 2,147,483,647 objects (UDFs, stored procs, tables views, etc). Thus, I don't think we will run into issues on the sql side continuing to make a table for each webform. However, I get the feeling the JOIN to bring all the webform data together would be...epic.

I could spend some time consolidating all those tables into one, standardizing column headings to eliminate redundant columns and make unique ones where necessary. However, that would lead to a table with about 500 columns.

My feeling is that proper Normalization of the tables would produce one table in lieu of the current multi table structure. Was just looking for your thoughts before boiling down those tables.



thanks again in advance!
0
Comment
Question by:Victor Nares
  • 2
  • 2
5 Comments
 
LVL 33

Accepted Solution

by:
paulmacd earned 500 total points
Comment Utility
I would look at reducing the number of tables to the bare minimum, but not necessarily shoot for a single table.  If the data would be normalized through the use of a single table, go for it, but it probably makes sense to have a handful (or double-handful) of tables that you do do joins on when you need to.
2
 
LVL 26

Expert Comment

by:Zberteoc
Comment Utility
MySQL or SQL servers are RELATIONAL database DBMS platforms. Tables make sens in a relations DBMS if there are relations defined between them . The reason for relationships is to reduce data redundancy and at the same time to make the data well structured. If you have a bunch of tables with no relations between them that represent just web forms probably would be better to use a document database platform, or NoSQL, like  MongoDB.
0
 
LVL 26

Expert Comment

by:Zberteoc
Comment Utility
The question is tagged as MySQL but I see now that you are mentioning the SQL(MS I assume) Server 2016. I think you should add the MS SQL tag.
0
 

Author Closing Comment

by:Victor Nares
Comment Utility
This is exactly the kind of response I was hoping for. I was looking at the extremes and your response involving intermediate solution is something I didn't see.

I'm working now to to find some commonality between the existing tables and should be able to consolidate them down to a more manageable number...about 5-10.

Thanks again.
0
 
LVL 33

Expert Comment

by:paulmacd
Comment Utility
Happy to help.  Thanks for the points.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now