Managing Composite databases
Composite databases are managed using administrative commands.
They are created with the CREATE COMPOSITE DATABASE
command.
Create a Composite database
CREATE COMPOSITE DATABASE cineasts
Constituent graphs are added with the CREATE ALIAS
administrative command, for example:
Create an alias on a Composite database
CREATE ALIAS cineasts.latest
FOR DATABASE movies2022
Aliases can also be created for databases on other DBMSs:
Create an alias for a remote database on a Composite database
CREATE ALIAS cineasts.upcoming
FOR DATABASE upcoming
AT 'neo4j+s://other.dbms.com'
USER $user
PASSWORD $secretpassword
The SHOW DATABASE
administrative command includes Composite databases.
Their type
is reported as "composite"
, and the constituents
column lists the names of the aliases contained.
Show a Composite database
SHOW DATABASE cineasts YIELD name, type, constituents
+---------------------------------------------------------------------+ | name | type | constituents | +---------------------------------------------------------------------+ | "cineasts" | "composite" | ["cineasts.latest", "cineasts.upcoming"] | +---------------------------------------------------------------------+
The SHOW ALIASES FOR DATABASE
administrative command can be used to inspect aliases on Composite databases in further detail.
Show Composite database aliases
SHOW ALIASES FOR DATABASE
+----------------------------------------------------------------------------------------+ | name | database | location | url | user | +----------------------------------------------------------------------------------------+ | "cineasts.latest" | "movies2022" | "local" | NULL | NULL | | "cineasts.upcoming" | "upcoming" | "remote" | "neo4j+s://other.dbms.com" | "cineast" | +----------------------------------------------------------------------------------------+
For a full description of the administrative commands for managing Composite databases, see Cypher Manual → Database management.
Connect to drivers and applications
Drivers and client applications connect to Composite databases just like standard databases. For more information, see the respective Neo4j Driver manual.
Was this page helpful?