[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Using "text tables" to store data - good or bad?

Posted on 2007-04-01
3
Medium Priority
?
178 Views
Last Modified: 2010-03-19
As anyone who has looked into the inner workings of WordPress will have seen, they sometimes use text fields to store tabular data instead of creating an extra SQL table. An example of this is the "recently_edited" row in the "options" table.

For example: {a,b,c}{d,e,f} could be a three column, two row table.

My question: Is this a good or bad idea? Is there a name for this technique?

As far as I know any book on database design would always suggest moving this data into a separate table so that the information can be manipulated with an SQL query. However when you have a large database, it's often tempting to do this to cut down the number of tables and joins.

Thanks in advance for you input. Most useful response will get the points!
0
Comment
Question by:philwilks
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 27

Expert Comment

by:MikeToole
ID: 18831561
In SQL Server 2005 you can effectively do this with it's ability to store and query XML data
0
 
LVL 52

Expert Comment

by:Gustav Brock
ID: 18832370
It's indeed a bad idea if this is data you use in your application/database and you use this method as a quick and dirty way of storing data which by nature is relational.

However, several engines offer the option to store an array in one field - InterSystems Caché and the new engine of Access in version 2007 - comes to my mind.
The reason to do this should be that the single elements of the array carry no useful information; the useful information is exactly the _collection_ of data elements.

An example could be RGB colour settings for, say, a background. Usually you create a compound value of the discrete values for R, G, and B respectively. This means that you have to perform a calculation both when storing and when retrieving a colour set to have the three values. Storing a three element array with the three values is much easier.
Of course, if you are able to store an array in an element of another array, this can be expanded, but I would say you should have very good reasons for doing so.

/gustav
0
 
LVL 22

Accepted Solution

by:
NovaDenizen earned 750 total points
ID: 18836196
I think it's ok if it's data you always use as a whole, it's limited in size, and you will never need to use the field in a WHERE clause.  
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
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…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

656 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