M
MeshWorld.
Back to Tags
Topic View

#Database.

21 posts filed under this topic.

Cheatsheet 5 min read

SQL Cheat Sheet: Queries, Joins, Aggregates & More

Complete SQL reference — SELECT syntax, JOINs, GROUP BY, subqueries, window functions, CTEs, transactions, constraints, data types, and common patterns for any relational database.

Vishnu
Vishnu
HowTo 5 min read

How to Run PostgreSQL Locally with Docker

Run a full PostgreSQL database locally in under 2 minutes using Docker — with persistent volumes, docker-compose setup, GUI client access, and dump/restore commands.

Vishnu
Vishnu
HowTo 5 min read

How to Debug a Slow SQL Query in PostgreSQL

Step-by-step: find slow queries with pg_stat_statements, read EXPLAIN ANALYZE output, identify missing indexes, fix N+1 queries, and diagnose lock contention.

Vishnu
Vishnu
Laravel 5 min read

Unsigned Columns in Laravel Migrations

How to declare unsigned integer columns in Laravel migrations using unsignedBigInteger(), foreignId(), and the unsigned() modifier. Updated for Laravel 12.

Vishnu
Vishnu
Cheatsheet 5 min read

PostgreSQL Cheat Sheet: SQL, Indexes, EXPLAIN & psql

Complete PostgreSQL reference — psql commands, CRUD queries, joins, indexes, EXPLAIN ANALYZE, CTEs, window functions, JSONB operators, and admin queries.

Vishnu
Vishnu
Laravel 5 min read

Nested Eager Loading in Laravel Explained

Learn how nested eager loading in Laravel Eloquent reduces database queries for deeply related models. Covers syntax, conditional loading, practical examples, and when to use it.

Vishnu
Vishnu
Laravel 5 min read

Update a Laravel Record Without Touching Timestamps

Four ways to update a Laravel Eloquent record without changing updated_at: timestamps property, saveQuietly(), withoutTimestamps(), and the query builder. With version notes.

Vishnu
Vishnu
MySQL 5 min read

MySQL - List all Databases

In this article, you will see how to retrieve list of databases with MySQL.

Vishnu
Vishnu
SQL 5 min read

Introduction to SQL

In this article we look into intro about SQL aka **Structured Query Language**. Used by numerous big giant tech companies & by widely popular applications.

Vishnu
Vishnu
SQL 5 min read

HackerRank SQL Practice Solutions

Solutions to common SQL practice problems on HackerRank.

Vishnu
Vishnu
Laravel 5 min read

Laravel Eloquent whereTime() Method Explained

Learn how Laravel's whereTime() method filters records by the time portion of a datetime column. Covers syntax, all operators, and practical examples for time-based queries.

Vishnu
Vishnu
Laravel 5 min read

Laravel Eloquent whereDate() Method Explained

Learn how Laravel's whereDate() method filters records by date, ignoring the time component. Covers syntax, operators, examples, and why raw where() fails for dates.

Vishnu
Vishnu
Laravel 5 min read

Laravel firstOrCreate(): Find or Create a Record

Learn how Laravel's firstOrCreate() finds the first matching record or creates a new one automatically. Covers syntax, parameters, real examples, and comparison with firstOrNew().

Vishnu
Vishnu
Laravel 5 min read

Laravel firstOrNew(): Find or Prepare a Record

Learn how Laravel's firstOrNew() finds the first matching record or returns an unsaved model instance. Covers syntax, when to use it over firstOrCreate(), and real examples.

Vishnu
Vishnu
Laravel 5 min read

Move Records Between Tables in Laravel

How to move a database record from one table to another in Laravel using replicate(), setTable(), and DB::transaction() to keep the operation atomic and safe.

Vishnu
Vishnu
Laravel 5 min read

Drop Composite Indexes in Laravel Migrations

How to drop a composite index in Laravel migrations using dropIndex() with a column array or a named index string. Updated for Laravel 12 anonymous class syntax.

Vishnu
Vishnu
Laravel 5 min read

Create Composite Indexes in Laravel Migrations

How to create composite (multi-column) indexes in Laravel migrations using anonymous migration syntax. Covers naming, column order rules, and how to drop them.

Vishnu
Vishnu
Laravel 5 min read

Create Database Indexes in Laravel Migrations

How to add single, unique, full-text, and primary key indexes in Laravel migrations. Includes naming, dropping, and when each index type makes sense.

Vishnu
Vishnu
Laravel 5 min read

Change Laravel Model Timestamp Column Names

How to rename created_at and updated_at in a Laravel Eloquent model using CREATED_AT and UPDATED_AT constants. Covers disabling timestamps and custom date formats too.

Vishnu
Vishnu
SQL 5 min read

SQL - CREATE TABLE Statement

A tutorial for creating database table with SQL

Vishnu
Vishnu
HowTo 5 min read

How to allow remote access to MySQL database server

How to allow remote access to MySQL database server

Vishnu
Vishnu