Databases

Questions about SQL, PostgreSQL, MongoDB, Redis, and data storage.

DatabasesEAV Model vs PostgreSQL JSONB: Pharmacy Catalog Design

Compare EAV model vs PostgreSQL JSONB for pharmacy e-commerce catalogs. Learn about schema flexibility, query performance, data integrity, and validation frameworks.

3 answers• 1 view
DatabasesPostgreSQL Case Insensitive Queries with ILIKE

Learn how to make PostgreSQL queries case-insensitive using ILIKE operator, LOWER/UPPER functions, citext extension, and indexing for optimal performance. Ensure 'administrator', 'ADMINISTRATOR', and 'Administrator' return identical results.

1 answer• 1 view
DatabasesSQL Server Latest Record Per Employee Without OUTER APPLY

Optimize SQL Server queries to get latest attendance records per employee without OUTER APPLY. Use ROW_NUMBER() or MAX() JOIN for better performance.

1 answer• 1 view
DatabasesView Live MySQL Queries on Linux: Real-time Monitoring Guide

Learn how to view live MySQL queries on Linux using mysql show processlist, performance schema, and query logging. Monitor database activity in real-time for optimization and troubleshooting.

1 answer• 1 view
DatabasesHow to Shrink SQL Server Transaction Log Safely

Learn how to clear or shrink oversized SQL Server transaction log for test databases. Step-by-step guide: switch to simple recovery model, backup log, DBCC SHRINKFILE, best practices to reduce transaction log size without data loss.

1 answer• 1 view
DatabasesElasticsearch match_all Query: Correct URL Syntax

Learn the correct elasticsearch query URL syntax to retrieve all records using match_all query. Fix common issues with Lucene syntax and JSON body approaches.

1 answer• 1 view
DatabasesSHACL Validation in Apache Jena Fuseki: Setup Guide

Learn how to configure SHACL validation endpoints in Apache Jena Fuseki, use POST requests with shapes for flexible RDF graph validation, best practices, curl examples, and troubleshooting for reliable data quality checks.

1 answer• 1 view
DatabasesMariaDB 1020 Error in Python Script After 11.8.3 Upgrade

Discover why MariaDB error 1020 ('Record has changed since last read') hits Python scripts post-upgrade to 11.8.3 due to innodb_snapshot_isolation=ON. Learn causes, repro steps, and fixes like session settings or retries for read-write-read patterns.

1 answer• 1 view
DatabasesEnable IDENTITY_INSERT SQL Server 2008: Fix Insert Error

Learn how to properly set IDENTITY_INSERT ON/OFF in SQL Server 2008 to avoid 'Cannot insert explicit value for identity column' error. SSMS guide, app code examples, session-specific tips, and troubleshooting for Baskets table.

1 answer• 2 views
DatabasesSQLite3 Column Names: Retrieve Table Columns Easily

Learn how to retrieve column names in SQLite3 databases using PRAGMA table_info, sqlite_master, and programmatic methods. Perfect for iPhone app migrations and schema validation.

1 answer• 2 views
DatabasesMySQL INT(11): Storage Size in Bytes & Max Value

Discover the storage size of MySQL INT(11) column: always 4 bytes. Max signed value is 2,147,483,647; unsigned reaches 4,294,967,295. Learn why (11) doesn't affect storage or range, with official docs and best practices.

1 answer• 2 views
DatabasesIntegrated Security True vs SSPI: Database Connection Differences

Learn the differences between Integrated Security=True and SSPI in database connections. Understand provider compatibility, security implications, and when to use each option for optimal database authentication.

1 answer• 2 views
DatabasesOptimize SAP HANA hdbcli Pandas Performance for Large Fetches

Boost SAP HANA hdbcli pandas performance fetching large datasets. Tune cursor arraysize, pandas chunksize, packetsize, and use hana-ml fetch_size to cut 60s fetches to under 10s with best practices and code examples.

1 answer• 1 view
DatabasesFix PostgreSQL 'Could Not Connect to Server' on macOS Homebrew

Resolve PostgreSQL 'could not connect to server: No such file or directory' error on macOS Mountain Lion with Homebrew 0.9.3. Fix stale PID, sockets (/tmp/.s.PGSQL.5432, /var/pgsql_socket), launchctl, and Rails rake db:migrate issues step-by-step.

1 answer• 1 view
DatabasesCreate PostgreSQL Read-Only User with SELECT Permissions

Learn how to create a PostgreSQL read-only user with proper SELECT permissions on specific databases while restricting all other privileges for enhanced security.

1 answer• 1 view
DatabasesWhy PostgreSQL INSERT Slow on Empty Tables with FKs

PostgreSQL INSERTs slow on empty tables with foreign keys due to planner stats (reltuples=0) causing seq scans. Seeding 1 row or ON CONFLICT fixes it. Best practices for bulk inserts, ANALYZE, libpq sync.

1 answer• 1 view
DatabasesQuickest Way to Copy PostgreSQL DB from Prod to Dev

Learn the fastest methods to copy a PostgreSQL database from production to development using pg_dump, pg_restore piping, pg_basebackup, and pgcopydb. Step-by-step guides, best practices for speed, security, and automation.

1 answer• 2 views
DatabasesCosmos DB DeleteItemAsync 404: Partition Key Fix

Fix Azure Cosmos DB DeleteItemAsync returning 404 Resource Not Found despite successful queries. Learn partition key mismatches, query projections, C# SDK fixes, and verification steps for iothub container deletes by date range.

1 answer• 1 view
DatabasesSet SQLite WAL Mode in Python 3.12 with autocommit=False

Fix OperationalError when setting SQLite journal_mode to WAL in Python 3.12 sqlite3.connect(autocommit=False). Commit implicit transaction first or use persistent WAL setup for sqlite3 python apps.

1 answer• 2 views
DatabasesUnderstanding MySQL Index Types: PRIMARY, UNIQUE, FULLTEXT

Learn the key differences between PRIMARY, UNIQUE, INDEX, and FULLTEXT index types in MySQL. Discover when to use each type for optimal database performance and design.

1 answer• 2 views