Why isn’t RDBMS Partition Tolerant in CAP Theorem and why is it Available?

It is very easy to misunderstand the CAP properties, hence I’m providing some illustrations to make it easier. Consistency: A query Q will produce the same answer A regardless the node that handles the request. In order to guarantee full consistency we need to ensure that all nodes agree on the same value at all … Read more

How should international geographical addresses be stored in a relational database?

I will summarize my thoughts from my blog post – A lesson in address storage (on archive.org). On my current project [I work for a logistics company] we’re storing international addresses. I’ve done research on addresses all over the world in the design of this portion of the database. There’s a lot of different formats. … Read more

Drop all tables command

While it is true that there is no DROP ALL TABLES command you can use the following set of commands. Note: These commands have the potential to corrupt your database, so make sure you have a backup PRAGMA writable_schema = 1; delete from sqlite_master where type in (‘table’, ‘index’, ‘trigger’); PRAGMA writable_schema = 0; you … Read more

Best practices for storing postal addresses in a database (RDBMS)?

For more international use, one schema to consider is the one used by Drupal Address Field. It’s based on the xNAL standard, and seems to cover most international cases. A bit of digging into that module will reveal some nice pearls for interpreting and validating addresses internationally. It also has a nice set of administrative … Read more