Neo4j Data Types (Supports basic types such as strings and numbers, as well as special types such as geographic coordinates)

Basic Types

neo4j supports the following basic types:

1. String

A string refers to a sequence of characters. neo4j supports two string types: String and URI.

  • String: Used to store text data.
  • URI: Used to store URLs or other URI references.

2. Number

A number is a value used to represent a numerical value. neo4j supports the following number types:

  • Integer: A single or multi-digit integer.
  • Float: A 64-bit floating-point number.
  • Double: A 64-bit double-precision floating-point number.

3. Boolean

A boolean is a value used to represent truth. neo4j supports the following boolean types:

  • Boolean: An integer value of 1 or 0.
  • True and False: Values directly representing true or false.

Special Types

neo4j also supports the following special types:

1. Geospatial Coordinates

Geospatial coordinates are data used to store geographical locations. neo4j supports the following geospatial coordinate types:

  • Point: Stores point coordinates (e.g., latitude and longitude).
  • LineString: Stores line segment coordinates (e.g., a line segment from point A to point B).
  • Polygon: Stores polygon coordinates (e.g., the exterior and interior of a polygon).

2. Time

Time is a value used to store time data. neo4j supports the following time types:

  • Date: Represents a value of the date type.
  • DateTime: Represents a value of the datetime type.

3. Time Interval

A time interval is a value used to represent a time interval. neo4j supports the following time interval types:

  • TimeSpan: Represents a value of a time interval type (e.g., duration).