Building Offline-First Apps With Node.js and SQLite

"Offline first" is an application development paradigm in which developers ensure that an app's functionality is unaffected by a temporary loss of network connectivity. Progressive web applications, which feel like native applications but run like web applications, are often built on this paradigm.

This tutorial will teach you how to build an offline-first application with Node.js and a SQLite database. Let's start with an introduction to progressive web apps.

Introduction to PWA

Progressive Web Apps (PWAs) are web apps that use service workers, manifests, and other web-platform features and progressive enhancement to provide users with an experience comparable to native apps.

A Look at IndexedDB

Memory usage is an important metric for Arctype. Developers expect their tools - especially UIs - to be fast and smooth. Recently we improved our memory management algorithms using IndexedDB, Socket.IO, and Typescript. This post takes you inside our reason for the changes, design considerations, implementation, and impact.

Prior to this work, querying a database from Arctype was simple. We would grab every row up to 10,000 and load them into memory. We would display a fraction of rows in the results pane, the spreadsheet view, or a chart. When you needed more rows, we would throw out the first 10,000 and fetch another batch.

Querying Shopify Data in Postgres

Introduction to Shopify

Shopify is a SaaS company that simplifies the process of setting up and running an online business. Businesses that use Shopify have access to important information about their products, orders, customers, and more within Shopify. In most cases, businesses will want to extract this data and combine it with other data into a central database. In this article, we will be discussing how to migrate data from Shopify to Postgres.

Create the Postgres Database

You need to have a Postgres database in which you will store your Shopify data. You can create the database directly from Postgres, in which you will use the CREATE DATABASE database_name command. For example to give the database the name shopify, run the following command:

Build Pivot Tables in MySQL Using User Variables

One of the most prominent tasks when dealing with databases is to properly filter and extract meaningful data from the underlying database. Due to that, there can be requirements to pivot the data from rows to columns leading to the creation of pivot tables to visualize data better.

Some databases like Microsoft SQL Server or Oracle come with inbuilt functionality to create a pivot table using the inbuilt pivot() function. However, this function is not available in some databases such as MySQL and MariaDB. In this post, we will discuss how to create pivot tables in MySQL without depending on any special functions.

Use MySQL Window Functions to Get More Out of Your Data

MySQL Windows Functions

Window Functions in MySQL

Window functions are an advanced feature offered by MySQL to improve the execution performance of queries. These functions act on a group of rows related to the targeted row called window frame. Unlike a GROUP BY clause, Window functions do not collapse the rows to a single row — preserving the details of each row instead. This new approach to querying data is invaluable in data analytics and business intelligence.

Window Functions vs. Aggregate Functions

Aggregate functions are used to return a single scalar value from a set of rows. Some prominent aggregate functions available in MySQL are SUM, MIN, MAX, AVG, and COUNT. We can use these functions combined with the GROUP BY clause to get an aggregated value.

Tackling Gender Bias Using Analytics

Introduction

Chances are when you hear "0.77 cents on the dollar," an increasingly contentious subject — the gender pay gap — comes to mind.  Today, we will explore a US Bureau of Labor Statistics dataset containing information about America's workforce (as of Jan. 2015) to answer the following questions:

  • Which industries are most and least affected?
  • Is the gender wage gap the same across all industries?
  • How much does an average American salary vary by gender?

To answer these questions, we'll be importing the dataset mentioned above (available on Kaggle) into an Arctype SQLite database, where we'll use queries and dashboards to manipulate and interpret the data.