Forum Moderators: open

Message Too Old, No Replies

MySQL Structure Help!

         

ngomaichi

3:27 am on Apr 23, 2016 (gmt 0)



Hi, im very new to MySQL ( i have done some proyects but this is a special one)

I really dont know how to implement the following:

I have a grid of numbers 100*100 = 10000, each number is just a very small int ( it has a value from 0 to 9)

i need to store every number to a MySQL database, but i dont know how to approach this.
Do i have to do a table with 10000 columns?, or do i just do 2 columns and in the second one store all the data like "159875621511884...... until i have the 10000 numbers and then separate each number for its retrival? or which is the best way to do it?

i will use C# to do this, or maybe C# => php => mySQL,

what do you guys think?, thanks for your answers and sorry for my english (not my first language)

NgoMaiChi

LifeinAsia

5:08 am on Apr 23, 2016 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



I'm not exactly sure how you will be retrieving the numbers, but in general I would probably do a table with 3 columns:
- column_number
- row_number
- cell_value
Then you would end up with 10,000 rows in your table- a fairly trivial size and a fairly trivial query to get the value for the value in grid row X and column y.