Comparing MongoDB vs PostgreSQL

Database Type MongoDB: A NoSQL document database that stores data in flexible JSON-like documents. Ideal for schema-less data structures or scenarios where data may evolve over time. PostgreSQL: An object-relational database (ORDBMS) that enforces a structured schema with defined data types. Well-suited for relational data with well-defined relationships between entities. Data Modeling MongoDB: Documents can… Continue reading Comparing MongoDB vs PostgreSQL

Difference Between MySQL and MariaDB ?

1. MySQL : MySQL is an open-source relational database management system(RDBMS) based on Structured Query Language (SQL). It is developed and managed by oracle corporation and initially released on 23 may, 1995. It is widely being used in many small and large scale industrial applications and capable of handling a large volume of data. After the acquisition… Continue reading Difference Between MySQL and MariaDB ?

PostgreSQL UPDATE guide

PostgreSQL is a powerful, open-source relational database system. One of the essential operations any developer or DBA will perform is updating existing data. This guide walks you through the UPDATE statement in PostgreSQL, its syntax, options, and some best practices. Basic Syntax The most basic form of the UPDATE statement is: UPDATE table_name SET column1 = value1, column2 =… Continue reading PostgreSQL UPDATE guide

How to enable row-level security (RLS) in PostgreSQL

What is Row-Level Security (RLS)? Row-level security (RLS) is a feature in PostgreSQL that allows you to define policies to restrict access to individual rows in a table. This ensures that users can only access or modify data that they’re authorized to see. Enabling RLS on a table First, let’s turn on RLS for a… Continue reading How to enable row-level security (RLS) in PostgreSQL

How to use Firestore Database in React JS

It is a comprehensive backend solution offered by Google that simplifies the process of building, managing, and growing applications. When developing mobile or web apps, handling the database, hosting, and authentication can be challenging tasks. Firebase addresses these challenges by providing a range of features. Now for using The Firestore in the React JS project… Continue reading How to use Firestore Database in React JS

phpMyAdmin: How to Convert tf8_general_ci Database to utf8mb4_unicode_ci

Back up your WordPress database. Go to your WordPress folder and open your wp-config.php file using Text Editor. Find this line: define(‘DB_CHARSET’, ‘utf8′); Change the utf8 text to utf8mb4 then save the file. If utf8mb4 is already set in your wp-config.php continue with the next step. Follow the instructions in the image below. 3. Log into your phpMyAdmin using your MariaDB 10… Continue reading phpMyAdmin: How to Convert tf8_general_ci Database to utf8mb4_unicode_ci

How to add GROUP BY clause to a Sequelize find method

In Sequelize, you can add the group option in your query method findAll() to add the GROUP BY clause to the generated SQL query.For example, suppose you have a Users table with the following data: Now you want to select all firstName values and group any duplicate values of the column. Here’s the code for… Continue reading How to add GROUP BY clause to a Sequelize find method

How to perform a bulk update in nodejs using Sequelize

While Sequelize doesn’t provide a bulkUpdate() method, both update() and bulkCreate() methods allow you to update multiple rows with a single method.If you need to update multiple rows with the same values, you can use the update() method When you need to update multiple rows with different values, you can use the bulkCreate() method.Bulk update… Continue reading How to perform a bulk update in nodejs using Sequelize

Insert Contents into the table of database

The contents can be inserted by using the function given below: function my_plugin_insert_db() {  global $wpdb;  $username = ‘wordpress’;  $email = ‘test1@wordpress.com‘;  $table_name = $wpdb->prefix . ‘db_plugin’;  $wpdb->insert(  $table_name,  array(  ‘username’ => $username,  ’email’ => $email,  )  );  }  if(isset($_POST[‘button2’])) {      global $wpdb;      $username = $_POST[“fname”];      $email = $_POST[“email”];      $table_name =… Continue reading Insert Contents into the table of database