database
Why use your application-level cache if database already provides caching?
Because to get the data from the database’s cache, you still have to: Generate the SQL from the ORM’s “native” query format Do a network round-trip to the database server Parse the SQL Fetch the data from the cache Serialise the data to the database’s over-the-wire format Deserialize the data into the database client library’s … Read more
CREATE DATABASE using file in default path
Create the database ‘Documents’ and give file properties through an alter. USE [master] GO CREATE DATABASE [Documents] GO ALTER DATABASE [Documents] MODIFY FILE ( NAME = N’Documents’, SIZE = 512MB, MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB ) GO ALTER DATABASE [Documents] MODIFY FILE ( NAME = N’Documents_log’, SIZE = 256MB, MAXSIZE = UNLIMITED, FILEGROWTH = … Read more
how to drop partition without dropping data in MySQL?
ALTER TABLE tbl REMOVE PARTITIONING; Source: ALTER TABLE Statement in MySQL Reference Manual
Generating an image of a database schema used in a Rails app
Have you tried rake db:schema:dump? Essentially, make sure that your database.yml file is referencing the database you wish to dump, and then run the command. It’ll take all of the tables and indexes in said database and then write it out to schema.rb. Note that you should rename schema.rb once it contains the dump; otherwise, … Read more
One or multiple databases per Docker container
Since Docker container overhead is not significant and negligible here, the question is more about architecture in a microservices paradigm. Performance is indeed a complex question and there is no general advice, but maybe the following will help you: Personally, I doubt that at the beginning of the project one should try to solve all … Read more
Normalizing Human Skin Colors for User Interaction
olayforyou.com defines these skin tones alt text http://www.freeimagehosting.net/uploads/151ab0ddd7.jpg very fair fair olive dark very dark Any person using cosmetics regularly would understand these terms. These rest of us are just guessing 🙂
Is it recommended to use Database as a container in Production environment?
This blog post lists some reasons why you should not run production databases in containers. It also references another blog post describing problems with updating docker and unstable storage drivers. The main points here for me boil down to this: Dodgy storage drivers. This may be less of a problem when you write your database … Read more
What is the recommended equivalent of cascaded delete in MongoDB for N:M relationships?
What you are doing is the best and most optimal way of doing it in Mongo. I am in a similar situation and after going all possible implementations of the N:M design pattern, have also arrived to this same solution. Apparently, This is not a mongodb thing, but more of a concept of NoSQL, wherein, … Read more