sql - Save two dimensional table to database -
How can I efficiently represent the following table in the database, assuming that the number of rows and columns is hundreds of more (The idea to create a database with the I 100 field is not a good idea :))
I am using Ruby on Rails / SQLite.
What you have here is a classical de-normalization task. And the classical approach (do not know your read-write patterns or other needs) is to create three tables:
id. Name --------- 1 | Gothmist 2 | Giga ohm 3 Quick Online Tips ID | Name ---------- 1 | China 2 | Children 3 Music 4 Yahoo ID1 | ID 2 | Price ----------------- 1. 1 | 0 1 | 2 | 3 ... 3 | 4 | 22
Comments
Post a Comment