Example of Neo4j ypher query

We are aware of SQL “Structured Query Language“ which we usually use in SQL databases. Here we are using CQL “Cypher Query Language“.

Neo4j is based on node and relations. Node can be considered as tables in SQL and relations can be considered as foreign keys in there.

What is CQL?

  1. Is a query language for Neo4j Graph Database.
  2. Is a declarative pattern-matching language.
  3. Follows SQL like syntax.
  4. The syntax is very simple and in human-readable format.
  5. Neo4j CQL has commands to perform database operations.
  6. Neo4j CQL supports many clauses such as WHERE, ORDER BY, etc., …

Neo4j basic structure

The very first and simple answer is “It is Database”. Going further we can elaborate it as “It is a Graph Database”. and it uses “Cypher Query Language”.

You may come across a lot of questions related to -

  1. What is a graph database and
  2. Need and usefulness

For all such questions, you can seek links provided in the reference area. They have provided an ample number of videos and documentation around it. Let’s just check how graph database stores data in dB and how Cypher Query Language looks like.


You can always seek on neo4j.com for the latest download link but for a specific version Here I am providing the link.

We can use the following link and install Neo4j -

For a Linux -

https://neo4j.com/download-thanks/?edition=community&release=3.5.5&flavour=unix

Steps to install

  1. After clicking on the above link “neo4j-community-3.5.5-unix.tar.gz” gets downloaded.

For Linux -

  1. Open up your terminal/shell.
  2. Extract the contents of the archive, using:
tar -xf <filecode>.

tar -xf neo4j-community-3.5.5-unix.tar.gz

8. Place the extracted files in a permanent home on your server. The top-level directory is referred to as NEO4J_HOME.

To run Neo4j as a console application, use:


<NEO4J_HOME>/bin/neo4j console

To…


Here we are going to cover how to preserve data outside our container because when the container exits it destroys all the data inside. Which is the biggest problem? But there are ways to sync data out of the container. Let’s find out.

Volume — inside docker host

  1. It creates volume automatically if it is not present
  2. Create volume using command -
docker run — mount src=”$(pwd)”,target=$HOME/app,type=volume webapp:1.0

Bind — outside docker host but on host machine.

  1. It does not create a directory if not present but will send an error
  2. Add mount using the command
docker run — mount…

There are several approaches to integrate dockers according to the project structure.

Docker-compose approach

  1. In this approach, each module (web, server, database) resides in different containers.
  2. We have to write different docker files for each
  3. There will be different images for each also.
  4. Only the thing is docker-compose is another top-level file that binds and connects all those images in one project.
  5. It is the standard approach that helps in the micro-system approach.
  6. Here initially we have tried it for our project and then switched to another approach.

How docker-compose works?

  1. Use YAML files to configure application services (docker-compose.yaml)
  2. Can…

Docker Commands

Installation -

  1. Installation of docker can change or become more convenient on time being so I am not listing down installation steps here rather I am providing an official link for installation. Follow the steps there according to your system.
  2. Docker on Windows
  3. Docker on Mac
  4. Docker on Ubuntu Linux
  5. For Ubuntu Linux, if you are willing to install it with fewer efforts then follow this link. here you can install it using a script. there are other manual options also you can try if you are more interested in it.

Frequently used commands:-

docker build

  1. To create an…

With Docker, developers can build any app in any language using any tool-chain. “Dockerized” apps are completely portable and can run anywhere on OS X and Windows laptops, QA servers running Ubuntu in the cloud, and production data center VMs running Red Hat.

Developers can get going quickly by starting with one of the 1,00,000+ apps available on Docker Hub. Docker manages and tracks changes and dependencies, making it easier for sysadmins to understand how the apps that developers build work. …


Assuming that you are aware of downloading AOSP code and setup ubuntu for machine for the same. If not please go through my previous two chapters.

  1. Setup AOSP on Ubuntu machine
  2. Compile and Build AOSP commands

We have multiple options to open source code in android studio. Depends upon task or need. Considering you are an android developer and just want to explore the code then you can open full source code in the android studio. But if you want to make changes in the particular part of source code then some more settings related to Framework SDK setup needed.


The power of CLI is always admirable.

#Overview

  • In the last chapter Aosp setup on Ubuntu machine, We have covered how to set up Ubuntu machine and download AOSP source code. Now after downloading we need to explore, compile and build source code so that it will open in Emulator or physical device. Here I have listed few commands which are mostly used in compiling and building process.
  • We will definitely cover exploring, editing, and customising our own Android OS in the coming chapters.

# Compile full source code after downloading
$: source build/envsetup.sh
$: lunch
$: make -j8

  • After preparing the compilation environment, the first step…


More than 100Gb source code becomes 250Gb+ after compilation…. that’s AOSP

#AOSP recommended computer configuration

  • Android AOSP is approximately 100GB code in today (2020) but after compilation and build it grows around 250GB.
    1. Processor — i5 /i7 latest generation
    2. Ram — 16Gb minimum (for less ram it will take a lot of time to compile full OS )
    2. OS — prefer Ubuntu latest version because the android team itself tests on Ubuntu and Mac Pc’s.

NOTE — Here onwards we have used ($:) symbol for showing ubuntu terminal. Commands start after that symbol.

# Installing essential packages On Ubuntu to compile and build, it needs few packages with…

Parmeshwar C

Software Engineer. (Mobile and Web)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store