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 :))

here Enter image details

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

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -