I want to aggregate data from different sources, Twitter lastfm and that sort. I just can't figure out how to store the data. Clearly in a database but I can't figure out how abstract to make the table to hold all this data without compromising the logical understanding of the data in each column. I was wondering if anybody else had experience with this and now they tackled it in rails.
Aggregating Data in Rails 3
482 Views Asked by Logan Bailey At
2
There are 2 best solutions below
Related Questions in RUBY-ON-RAILS
- Rails HABTM: Select everything a that a record 'has'
- Best way to make an HABTM association via console
- dynamically create an ical / ics file from a rails model
- Ruby destroy is not working? Or objects still present?
- NoMethodError: undefined method `update_average_rating' for nil:NilClass
- Select results where joined table contains records with an attribute, but without another
- Showing posts only created when boolean was true
- Ruby on rails and HAML - Print a hash with background color
- How can I monitor an endpoint's status with Ruby?
- How to create dynamic pages without form_for helper in Rails?
- Rails 4.2 jQuery loads only after refresh
- "Access Denied" - User's Permissions to S3 Bucket
- ActiveRecord, Rails 4: has_many :through with scoped conditions failure
- Rails - formatting a list of options
- Rails - Ajax do not work properly on production server
Related Questions in RUBY-ON-RAILS-3
- Jruby: How to use third party java library?
- How do I update create route from rails 3 to 4
- Can't update user in Ruby on Rails
- Rails Ancestry. How can I display a single comment with all its descendants?
- LinkedIn API returns Positions without Title
- Catch emails to all [email protected], and execute code
- Cannot run elastic search in circleci to make my rspec for elasticsearch to pass?
- How do I clear values from text_field_tag after browser refresh?
- Rails submit create action succeeding
- f.select with enum in rails 3
- Rails 3 join where query - print only on row
- Rails testing button functionality with capybara.
- Fix spurious rspec "photo can't be blank" failures for Carrierwave
- ActiveRecord Slow Object Instantiation
- Ruby on Rails 3 Multiple Associations
Related Questions in TWITTER
- Removing URL features from tokens in NLTK
- Optimizing for Social Leaderboards
- Customizing tweet view using Fabric SDK
- Get email address from Twitter
- Click tweet button after changing data-text
- MongoDB string index that is not text?
- how can I access user details through "oauth_token" from twitter api in ionic framework
- Vine API - User Data based on Anchor
- Twitter/Facebook in-app browser on Android not displaying my site correctly
- how to get stats for twitter ad campaign
- twitter response: "error 32: Could not authenticate you" from Heroku, but not desktop
- Twitter share android titanium with social.js file not working
- Ruby, update twitter avatar and background
- Insights for Twitter service in IBM Bluemix: Search case-sensitive string and other questions
- twitter json formatting in php
Related Questions in LAST.FM
- code is working laggy in postExecute but won't work in doInBackground?
- guzzle and last fm API
- Last.fm java.lang.ClassCastException - reading in User objects from file
- Free APIs for downloading mp3
- Filling HashMaps <Object, Collection<Object>>
- Error Authenticating to LastFM "Must not send passwords in query string"
- ReferenceError: LastFMCache is not defined in Javascript
- last.fm API pagination
- Request user recenttracks from lastfm with codeigniter and xmlrpc
- Last.fm event venues query
- How to use Last.fm XML-RPC response with CodeIgniter?
- Aggregating Data in Rails 3
- Python Not Importing
- Creating/Accessing a JSON object using jQuery $.ajax with Last.FM API
- PHP exec python not working
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
One option, if you want to stick with SQL, would be to have a Model/Table which contains fields common to every data source (title, url, summary) which is associated to other Models/Tables which contain the fields specific to individual data sources. The associations could be regular or polymorphic. And if you wanted to get in to some metaprogramming you could use method_missing to delegate method calls for fields not present in the 'common' Model to the associated models. This would work best with a polymorphic join. Psudeo-code:
The other option would be STI, so one table with all fields and a 'type' field which tells Rails which model the record should be wrapped in. This depends on how many different sources you have and how different they are from each other.
If the fields don't need to be searchable storing a Hash in a Text field works well. See Serialize and the attr_bucket gem.
Or if you want to trendy a NoSQL type database allows on-the-fly fields to be generated.