Everything you need to know about Serialization in Ruby on Rails: Part II

In the previous article of the Serialization in Ruby on Rails series, we became familiar with various serialization formats provided by the Ruby libraries. In this article, we will see how the YAML and JSON formats are used by Rails to store Ruby objects in a database. Serialization in Rails for Storage Rails framework allows complex objects to be stored in a database column via the ActiveRecord::Serialization module. But understanding when to store serialized data in a column is more crucial than knowing how to do it. Through this article, we will first learn "when" to store serialized data

Introduction to Neo4j - Graph Database

Neo4j is a Graph Database. It uses Graph Data Model to represent the data, unlike other databases which use tables, documents, etc. Graph Data Model or Graph Data Structure is composed of Nodes and Relationships that connect nodes. Neo4j Browser A query workbench and a visualization interface. To install Neo4j and run Neo4j Browser - you can head to https://neo4j.com/download/ and download a community or an enterprise edition based on your requirements. Based on your OS the installation steps may vary - and once you have a Neo4j application installed - you can now choose the location

Beyond Rails ActiveRecord Series - Postgres AutoVacuum

Postgres uses a mechanism called MVCC(Multi Version Concurrency Control) to track changes in your database. Due to this reason, some of the rows become “dead”. Dead rows are generated by DELETE and UPDATE operations, as well as transactions that have to be rolled back. Refer this link learn more about MVCC. These dead rows keep on adding as there are lots of updates and deletes. Periodic clean up of these dead rows is necessary to not only save space but also maintain the performance of your database queries. The space taken by these dead rows is called bloat. You

Migrating (export and import) PostgreSQL database from Heroku to SoftLayer (or dedicated server)

Recently we had requirement in one of the project to migrate Heroku PostgreSQL database to SoftLayer (dedicated server) psql database. One major issue we faced during migration i.e. import Heroku pg database to SoftLayer database using pg_restore is the version conflict between the dump file that Heroku generates (for psql backups) and the old version 8.4. of PostGreSQL that SoftLayer instance has. We upgraded PostgreSQL to version 9.1 on SoftLayer. Remember to upgrade version above Heroku dump file or use same version but not below versions as pg_restore doesn't handle backward compatibility properly for dump