top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Database or Excel in Rails Application

+2 votes
302 views

Users of my system will be uploading an excel spreadsheet. The issue is should I just read straight from this excel spreadsheet into my front-end or should I load this spreadsheet into my MySQL database and then to my front-end.

I have asked numerous people about this issue and have researched on-line to no avail.

posted Nov 25, 2013 by Anderson

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote
  1. Do you need to modify any of the data (or is it just to be displayed)?
  2. Do you need to keep the data available in the long term?
  3. Do you have to show multiple views of the data (so the spreadsheet would have to be interrogated multiple times)?
  4. Is this a system that will be modified and extended over time?

If the answer to any of those is yes then extract the data from the spreadsheet into the database. If you are just providing a simple web based view on data from the spreadsheet then you could just extract it
on the fly. I would advise using the database however. I think in the long run it would be simpler and easier to maintain.

answer Nov 25, 2013 by Naveena Garg
Similar Questions
+6 votes

Our Application require (Rails1 and Rail 4: Users would see a mix of the two versions. Some pages would be served by Rails 1 and others by Rails 4.) both the Rails 1 and Rails 4 versions to use the same database. Will this work? What problems with this approach should we be anticipating?

+1 vote

Can anyone help me to run a rails application in a LAMP or WAMP server?

+2 votes

How can I separate the database DBA user and app access user in rails? The app user will be able to run the app but perform no DDL. The DBA user will be used for migrations.

I do not want the user that runs the rails app to be able to create, drop or modify database objects. This type of user access-rights separation is a pretty minimal best practice and I am concerned that this does not seem to be the norm in the rails world. What am I missing?

My current thinking is that I should create 2 stanzas per database in the database.yml file. One for the dba user and one for the normal app user. Does anyone have any better suggestions?

+3 votes

I am using rails 3.1 and ruby 1.9.3,Now i want to use uuid concept in rails 3 for existing data

so I did like :-

create_table :posts, :id => false do |t|
 t.string :uuid, :limit => 36, :primary => true
end

ActiveRecord::Base.class_eval do

# old rails versions
set_primary_key 'uuid'

before_create :generate_uuid
def generate_uuid
self.id = UUIDTools::UUID.random_create.to_s
end
end

This is working for new data,now i want to migrate existing data with relation.for uuid they are using datatype as string,in postgresql the data type used for primary_key and foreign key is integer ,so if i am trying to change foreign key integer to string it is throwing error. Can someone please tell me some example,how to do this.

...