Introduction: Composite keys, which consist of two or more columns, are often used in database design to uniquely identify rows in a table. However, using a composite key as the primary key can create some challenges and limitations, which is why surrogate keys are generally preferred. In this blog post, we'll explore why surrogate keys … Continue reading Using Surrogate Keys and unique_together in Django for Efficient Database Modeling
Bose NC 700 HP Review – Noise cancellation headphone.
I've been using the BOSE headphones for over a year now, and I must say it's one of the best headphones I've ever used. The headphone boasts top-notch noise cancellation that works exceptionally well in different environments. Whether I'm at a busy cafe or on a flight, I can focus on my work without any … Continue reading Bose NC 700 HP Review – Noise cancellation headphone.
Using Python to execute MySQL Insert and Update queries
There are requirements at times where we have to execute the queries on the Prod database which changes the data in the table i.e insert & update queries. While inserting could be a straightforward case as the number of record is known same can't be said for UPDATE queries as the number of effected rows … Continue reading Using Python to execute MySQL Insert and Update queries
Setup Oracle in Ubuntu 20.04
In this tutorial we will be setting up Oracle on the Ubuntu system. For the tutorial purpose I will be using the Oracle XE 19.3.0 version. The same tutorial should work for any other oracle version as well. Pre-requisite - Ubuntu 18.04 +, Git 1. Set up docker on Ubuntu following below instructions. https://docs.docker.com/engine/install/ubuntu/ 2. … Continue reading Setup Oracle in Ubuntu 20.04
Create a folder in Python of Current date format
If you'd need to create a folder for current date in format as YYMMDDHH using python - You can use below code. This will create folder with "00" in hour if the time is between 00:00 to 12:00PM and from 12PM till 00:00AM, it will created folder with "12". For 2022-06-26 09:00:00 - It will … Continue reading Create a folder in Python of Current date format
Dump only Data in PostgreSQL table backup
Use below command to get only table data from a PostgreSQL table. It will not dump table create structure.
Number of rows per partition in a MySQL table
You can use the below query to get number of rows per partition in a MySQL table.
What is GIPSA ?
GIPSA (General Insurance Public Sector Association) is a group of four public sector insurance companies. These insurance companies are - New India Assurance CompanyNational Insurance CompanyUnited India Insurance CompanyOriental Insurance Company It has created a standard pricing for major & frequent medical treatments. It has restricted their cashless claims service to hospitals which follows their … Continue reading What is GIPSA ?
Difference between two dates in mysql
You can use MySQL's inbuilt function TIMESTAMPDIFF to get difference between two dates in MySQL. A typical query would be
Reading CSV file in python
Python's official Documentation says below thing about CSV files, The so-called CSV (Comma Separated Values) format is the most common import and export format for spreadsheets and databases. CSV format was used for many years prior to attempts to describe the format in a standardized way in RFC 4180. Reading & Writing CSV files is very … Continue reading Reading CSV file in python