Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Best way of storing grids in database?

Status
Not open for further replies.

whodaman

Programmer
May 23, 2001
60
CA
Hi all,

I am trying to store a large grid i.e 20480x10240. Think of this data as a picture, where each value represents a data.

I would like to store this data into a database and be able to query a smaller area within that gird, much like cropping that picture and only transfering that area back to the user. What is the most efficent way of doing that?

Here are my two options that I can think of:
1) Storing it into fields: rows, columns, and value. This way I can do a simple SQL query where rows is between y1, y2, and cols is between x1 and x2. This is the most trivial way of doing it, but it does have a major storage burden on the SQL server.

2) Storing using IDH: This will make the query string very long by saying between this and this value for every row.

Is there any other formats out there? I am thorn on which format to choose.

Thank you in advance.
 
It sounds like you are struggling to decide whether the data storage is the big issue or the ease of retreival is the big issue. A lot of that will depend on the tools, software and hardware involved.

I tend not to worry about data storage as much as ease of data retreival. Basically it is easier to upgrade hardware and/or software than to rewrite a program (and usually cheaper). I would use a database and store the data in tables. This will also allow me to tweak the database structure and configuration to optinize performance and allow a tool to do the job it ws designed to do. The only real question would be how many tables (ie. database design)? That will depend entirely on you and your data.

Hope this helps in some way.

Thanks and Good Luck!

zemp
 
I was leaning towards ease of data retreival... and then you pushed me! Thus that's the way i'm going. Thank you very much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top