Design Pattern: Active Record

Active Record An Active Record Object represents a row in a DB table. The object has fields mapping to a column in the table and methods to access table data. Active Record connects classes to relational database tables to establish an almost zero-configuration persistence layer for applications. The library provides a base class that, when…

PostGres: Update Column with Array Values

Update an Array UPDATE users SET topics = '{crows, cats}'; Append an Array UPDATE users SET topics = topics || '{cats,mice}'; Append operation creates duplicates. Reference

Mongo DB: Good to know things

Mongo DB is a No-SQL, free, open-source solution that is highly scalable, highly available and high performance solution. Engine is coded in C++ Works in a client-server model Major components: mongod: The storage server mongos: The sharding server config server(s): Stores metadata that accomplish sharding Is actually a mongod process Mongo provides write operations durability…

%d bloggers like this: