|
1 | | -:description: This page describes how to manage composite databases. |
| 1 | +:description: This page describes how to create, start, and stop composite databases. |
2 | 2 | :page-aliases: fabric/configuration.adoc |
3 | 3 | [role=enterprise-edition not-on-aura] |
4 | | -[[composite-databases]] |
5 | | -= Managing composite databases |
| 4 | +[[manage-composite-databases]] |
| 5 | += Create, start, and stop composite databases |
6 | 6 |
|
7 | 7 | Composite databases are managed using Cypher(R) administrative commands. |
8 | 8 | Note that it is not possible to modify access options or database topologies for composite databases as these are inherited from the constituent databases. |
9 | 9 | For information about modifying access options, see xref:database-administration/standard-databases/alter-databases.adoc#manage-databases-alter[Alter database access mode]. |
10 | 10 | For information about about topologies for databases, see xref:clustering/setup/deploy.adoc#cluster-example-create-databases-on-cluster[Create databases in a cluster]. |
11 | | -// The above two links will have to be changed when server management and access control sections are migrated from Cypher Manual. |
12 | 11 |
|
13 | | -[[composite-databases-list]] |
14 | | -== Listing composite databases |
15 | | - |
16 | | -//// |
17 | | -[source, cypher, role=test-setup] |
18 | | ----- |
19 | | -CREATE COMPOSITE DATABASE `library`; |
20 | | -CREATE DATABASE `sci-fi`; |
21 | | -CREATE ALIAS `library`.`sci-fi` FOR DATABASE `sci-fi`; |
22 | | ----- |
23 | | -//// |
24 | | - |
25 | | -The `type` column returned by the `SHOW DATABASES` command will display which databases are composite databases. |
26 | | - |
27 | | -.Query |
28 | | -[source, cypher] |
29 | | ----- |
30 | | -SHOW DATABASES |
31 | | ----- |
32 | | - |
33 | | -.Result |
34 | | -[role="queryresult"] |
35 | | ----- |
36 | | -+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |
37 | | -| name | type | aliases | access | address | role | writer | requestedStatus | currentStatus | statusMessage | default | home | constituents | |
38 | | -+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |
39 | | -| "library" | "composite" | [] | "read-only" | "localhost:7687" | NULL | FALSE | "online" | "online" | "" | FALSE | FALSE | ["library.sci-fi"] | |
40 | | -| "neo4j" | "standard" | [] | "read-write" | "localhost:7687" | "primary" | TRUE | "online" | "online" | "" | TRUE | TRUE | [] | |
41 | | -| "sci-fi" | "standard" | ["library.sci-fi"] | "read-write" | "localhost:7687" | "primary" | TRUE | "online" | "online" | "" | FALSE | FALSE | [] | |
42 | | -| "system" | "system" | [] | "read-write" | "localhost:7687" | "primary" | TRUE | "online" | "online" | "" | FALSE | FALSE | [] | |
43 | | -+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |
44 | | ----- |
45 | | - |
46 | | -For a description of all the returned column of this command, ways in which the `SHOW DATABASE` command can be filtered, and details about the privileges required for the command, see xref:database-administration/standard-databases/listing-databases.adoc#manage-databases-list[listing standard databases]. |
47 | | - |
48 | | -For composite databases, the `constituents` column is particularly interesting as it lists the aliases that make up the composite database. |
49 | | - |
50 | | -.Query |
51 | | -[source, cypher] |
52 | | ----- |
53 | | -SHOW DATABASE library YIELD name, constituents |
54 | | ----- |
55 | | - |
56 | | -.Result |
57 | | -[role="queryresult"] |
58 | | ----- |
59 | | -+--------------------------------+ |
60 | | -| name | constituents | |
61 | | -+--------------------------------+ |
62 | | -| "library" | ["library.sci-fi"] | |
63 | | -+--------------------------------+ |
64 | | ----- |
| 12 | +Drivers and client applications connect to composite databases just like standard databases. |
| 13 | +For more information, see the manuals for the different link:{neo4j-docs-base-uri}/create-applications/[Neo4j drivers and applications]. |
65 | 14 |
|
66 | 15 | [[composite-databases-create]] |
67 | 16 | == Create a composite database |
68 | 17 |
|
69 | 18 | Composite databases can be created using `CREATE COMPOSITE DATABASE`. |
70 | 19 |
|
71 | | -Composite database names are subject to the same rules as xref:administration-databases-create-database[standard databases]. |
| 20 | +Composite database names are subject to the same rules as xref:database-administration/standard-databases/naming-databases.adoc[standard databases]. |
72 | 21 | One difference is however that the deprecated syntax using dots without enclosing the name in backticks is not available. |
73 | 22 | Both dots and dashes need to be enclosed within backticks when using composite databases. |
74 | 23 |
|
@@ -211,23 +160,3 @@ SHOW DATABASE inventory YIELD name, requestedStatus, currentStatus |
211 | 160 | | "inventory" | "online" | "online" | |
212 | 161 | +-----------------------------------------------+ |
213 | 162 | ---- |
214 | | - |
215 | | -[[composite-databases-delete]] |
216 | | -== Delete composite databases |
217 | | - |
218 | | -Composite databases can be deleted using the command `DROP COMPOSITE DATABASE name`. |
219 | | -This command will fail if the targeted database is not a composite database. |
220 | | - |
221 | | -.Query |
222 | | -[source, cypher] |
223 | | ----- |
224 | | -DROP COMPOSITE DATABASE inventory |
225 | | ----- |
226 | | - |
227 | | -It is also possible to use the shorter command `DROP DATABASE name` for composite databases, but this command will drop any database and not fail in case the targeted database is not a composite database. |
228 | | - |
229 | | -[[composite-databases-drivers]] |
230 | | -== Drivers and applications |
231 | | - |
232 | | -Drivers and client applications connect to Composite databases just like standard databases. |
233 | | -For more information, see the manuals for the different link:{neo4j-docs-base-uri}/create-applications/[Neo4j drivers and applications]. |
0 commit comments