Tag: database

  • Date range in a MariaDB query using the Sequence Engine

    One of my applications involved generating a date-wise report for items created on that day and we needed zeroes against the count of items on the date which had no entries. User selects a date range and the application must generate this report. Not so easy if I had not come across the MariaDB Sequence…

  • Group based HTTP basic authentication using Nginx and MySQL with help of Lua

    Group based HTTP basic authentication using Nginx and MySQL with help of Lua

    Recently I moved from Apache to Nginx on one of my servers due to increase in traffic. But I was using HTTP Basic authentication with group based authorization on Apache in this manner: However, there’s no AuthGroupFile  in nginx. But LUA, a programming language is supported in nginx. So here’s how I used LUA and…

  • SQLite Replication

    SQLite is probably the world’s simplest Relational Database Management System. Basically it’s a C library which can be embedded in programs easily. There is no server/client mechanism, the database is a single file. For small work loads, it often makes no sense to use a big RDBMS package like MySQL or PostgreSQL, unless of course…