I want to build an application that lets me (the end user accessing a
web page) design a simple list with columns and add records. E.g., if
the end user says I want a table that has a list of songs, he can create
a list (title, date, artist, label) and then make another list of, e.g.,
books on his bookshelf with the necessary columns (title, author,
The end user shouldn’t have to do any database programming, schema
designs, etc. Just select the columns and types (from a very limited
list – date, text, longtext).
Of course in PHP I could just have the program create tables and keep
another table of the lists that has each column in a particular list in
a row (list_num, name_of_list, column_name, column_type).
Another way to do it that doesn’t result in the end user having to
create new tables is to have a table that has core columns for ALL lists
(id, title, description) and then join that table to columns by type of
data on the fly.
So, select * from core_list_items where list_num=X and then join it with
columns in the Date_items table and the text_items table and then the
date_items table. I have to do multiple join statements, sometimes from
the same table.
ID TITLE DESCRIPTION SONG_NAME (from text table) PUB_DATE (from date
table) RECORD_LABEL (also from text table).
I have made this work in PHP, but is there a way to do this in rails? I
posted this under a different topic, and I’ve seen suggestions that
require migrations and other back-end work to make this happen. But an
end-user won’t be able to do that, so i want to not have to do any