Development notes

Thoughts, notes and ideas about development

Indexes into Relational Databases

A database index is a data structure that improves the speed of data retrieval operations on a database table (increase database performance). But such performance has a cost of additional writes to hard drive and storage space to maintain the index data structure. In nutshell, index is a quick path to a single row into database. Indexes allow us to go directly to he required column without scanning the entire database table. Continue reading

How to start Ghost as a service on Ubuntu 16.04

Official Ghost documentation Deploying Ghost describes how to start Ghost as a service using script for /etc/init.d. This approach work well only for Ubuntu prior version 16.04. In this tutorial I’ll describe how to start Ghost as a service using new systemd service manager. Requirements Ghost should be already installed. *How to install Ghost described here: How to install Ghost on Ubuntu 16.04. Ghost is installed in /var/www/ghost Create systemd script Open terminal as root (or sudo user). Continue reading

SQL Transactions and ACID

Transaction is a sequence of one or more SQL operations treated as a logical unit. Transaction could be completed either entirely successfully or not executed at all. Transactions and locking are important aspects of database for supporting multiple users. Into this tutorial we’ll take a look atTransaction, ACID, Isolation Levels. ACID Transaction must have the following properties called ACID, which means the following: Atomicity: means that transaction must happen as a single unit and exactly once. Continue reading

PostgreSQL functions

PostgreSQL has a lot of built-in functions, such as Trigonometric Functions, String Functions, IP address functions, etc. But we’re not limited by built-in functions. PostgreSQL (as well as other RDBMS) allows to create custom functions. In this tutorial we will take a look at user-defined functions. PostgreSQL supports the following programming languages for writing functions: SQL PL/pgSQL C PL/Python PL/Tcl some other languages Create functions with PL/pgSQL Functions written in PL/pgSQL can contain a variable declaration, conditional and looping constructions, exception handling and so on. Continue reading

How to install Maven on Windows 10

Maven is build tool primary for Java projects. In this tutorial I will describe how to install maven on Windows 10 operating system. Download and install Java To use maven we need to install Java first. If maven is used for Java projects java jdk should be installed, otherwise jre would be enough. Jdk or Jre could be found here. Download maven After Java (jre or jdk) is installed we need to download Apache Maven from official web site https://maven. Continue reading

Git cheat sheet

2016-11-22 Git Alexey Bogdanov
Git is distributed version control system It is very powerful tool and has a lot of features. Also there’re a lot GUI tools for working with git. But in this post I’ll show how to work with git from terminal (console) in Linux or using git-bash in Windows. The list of commands will be updated periodically. Identifying yourself To add user name and email globally: git config --global "John Doe" git config --global user. Continue reading

PostgreSQL data types cheat sheet

In this tutorial I will show main PostgreSQL data types such as Boolean, Character, Number, Temporal. Also I will describe when and how we can use them. By the way, Postgres is not limited by the mentioned data types. It also supports such types like JSON, Monetary, Geometric, Network Addresses, etc. The full list of supported data types could be found here: Data Types Boolean Data Type The boolean type (could be shortened to bool) can store only 2 possible values true or false and NULLin case when value is unknown. Continue reading
Older posts Newer posts