How to Use PostgreSQL Date Functions

Introduction If you’re using PostgreSQL to store and query your data, there will likely be times when you need to obtain the current date or the current time for your applications. You may even want to calculate a student or employee’s age. Fortunately, PostgreSQL offers a number of useful date and time functions to help … Continued

How to Use PostgreSQL LAST_VALUE Function

Introduction In this article we will learn how to use PostgreSQL LAST_VALUE function. Although the knowledge will apply to most SQL database systems we will be doing the demo in PostgreSQL so our prerequisite if you want to follow along is that you have PostgreSQL installed and running. What is PostgreSQL LAST_VALUE Function The PostgreSQL … Continued

How to List Redis Keys

Introduction Redis is a data structure server that supports various values, however, it is not a simple key-value store. String keys are typically associated to string values in traditional key-value stores. However, the value is not limited to a simple string in Redis, but is able to hold more complex data structures. This tutorial will … Continued

How to Use Redis HKEYS

Introduction If you’re just getting started with Redis, you may not yet have spent much time working with hashes. However, you’ll soon find that these structures can be incredibly useful for grouping related data. In this article, we’ll discuss the Redis HKEYS command– a handy tool that allows you to query for all keys of … Continued

NodeJS MongoDB Find by Id

Introduction NodeJS can be used with various databases such as MySQL and MongoDB. In this tutorial we’ll show you both how to find a document by id using plain MongoDB and also using the library Mongoose. Mongoose is one Object Document Mapper that allows us to define objects with a strongly-typed schema that could be … Continued

$project in MongoDB

Introduction There are methods such as find and findOne that are used to retrieve data from a MongoDB collection. We can always use projection to specify the fields we want returned in the output. The $project function in MongoDB is used to specify the fields in a document that are passed to the next stage … Continued

NodeJS MongoDB Authentication

Introduction NodeJS and MongoDB are two parts of the MEAN and MERN stacks. NodeJS is a runtime environment that executes javascript outside the browser and MongoDB is a very popular NoSQL database. NodeJS works with almost any database technology and very often with MongoDB. There are many reasons for this such as there is no … Continued

MongoDB findOne

Introduction The find method is used to retrieve data from a MongoDB collection. By default, the find method will return all the documents in a collection. If the query and projection are provided, the data will be filtered accordingly and only those documents will be retrieved that match the query. But there is one more … Continued

How to insert data in MongoDB using Python

Introduction Data can be inserted into MongoDB using the mongo shell but we can insert data in MongoDB using programming languages too. In this article, we will discuss how to insert documents into MongoDB using the Python programming language. Python Python is a high-level programming language. It is one of the most popular and widely … Continued

SQL OR Statement with PostgreSQL

Introduction Being able to select the exact data you need is vital in all database technologies. One of the most common operators you can use is the OR operator. If you’re unfamiliar with the SQL OR operator then this article will be a great introduction to it’s use. In this article we’ll be using PostgreSQL … Continued

Keep in the know!

Subscribe to our emails and we’ll let you know what’s going on at ObjectRocket. We hate spam and make it easy to unsubscribe.