2 Ways to Show all Databases in PostgreSQL

January 29, 2022 A Goodman

This concise and straightforward article walks you through a couple of different ways to view all databases (on your server) in PostgreSQL. Using psql command The quick way Open a terminal window on your computer then…

PostgreSQL: Create Tables with Auto-Increment IDs

January 24, 2022 A Goodman

This article walks you through 2 different approaches to creating tables with auto-generated primary keys in PostgreSQL. Without any further ado, let’s get in action. Using generated as identity This syntax is available from PostgreSQL 10…

How to Create/Delete a Database with MongoDB Shell

October 2, 2021 A Goodman

This short post demonstrates how to create and drop a MongoDB database by using the command line. Creating a New Database The “use [your database name]” command will create a new database if it doesn’t exist,…

How to Check MongoDB Version on Windows, Mac, and Linux

October 2, 2021 A Goodman

You can see the version of MongoDB installed on your computer or server by using the following command: Here’s the result I get on my Mac after executing the mentioned command: And this’s the output I…

MongoDB: Renaming a Database with Command Line

October 2, 2021 A Goodman

This short post shows you how to change the name of a MongoDB database by using the command line (MongoDB shell). At this time, there are no official out-of-the-box tools from the MongoDB team that can…

SQLite: Select Random Records from a Table

September 12, 2021 A Goodman

In SQLite, you can randomly get one or multiple rows from a table by using the following select statement: Example Let’s say we have a table named users: Column Data Type id INTEGER email TEXT name…

MongoDB: Get a Random Document from a Collection

September 12, 2021 Guest Contributor

This short and straight-to-the-point post shows you how to randomly retrieve single or multiple documents from a collection in your MongoDB database by using the $sample aggregation. 1. To get a random document: If you want…

MongoDB: Import/Export a Database with Command Line

September 12, 2021 A Goodman

If you’re using MongoDB, you can export or import a whole database by using a single command line. All of the collections of that database will be exported/imported at once. It’s super convenient when backup/restore data….

5 Ways to Store Data Offline in Flutter

April 23, 2022 A Goodman

There are many cases where you need to store data locally on users’ devices instead of using remote cloud servers or APIs, for example, you may need to persist data across app launches, or download a…

How to see your MySQL version in macOS

February 23, 2022 A Goodman

In order to check your MySQL version in macOS, just open the terminal and perform the following command: You’ll see something similar to this: Simple as that. Further reading: Using ENUM Type in TypeORM 2 Ways…

1 2 3 4