diff --git a/modules/ROOT/pages/clauses/use.adoc b/modules/ROOT/pages/clauses/use.adoc index 1e79b1efa..a98b3dce1 100644 --- a/modules/ROOT/pages/clauses/use.adoc +++ b/modules/ROOT/pages/clauses/use.adoc @@ -24,7 +24,7 @@ Where `` refers to the name or alias of a database in the DBMS. [[query-use-syntax-composite]] === Composite database syntax -When running queries against a link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/composite-databases/concepts/[composite database], the `USE` clause can also appear as the first clause of: +When running queries against a link:{neo4j-docs-base-uri}/operations-manual/current/scalability/composite-databases/concepts/[composite database], the `USE` clause can also appear as the first clause of: * Union parts: + diff --git a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc index 33c835da7..f6e7959b7 100644 --- a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc +++ b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc @@ -38,7 +38,7 @@ For more information, see: | Feature | Details -a| +a| label:functionality[] label:new[] @@ -63,7 +63,7 @@ label:functionality[] label:updated[] [source, cypher] ---- -PROFILE +PROFILE WITH "Person" AS label MATCH (people:$(label)) RETURN people.name @@ -129,7 +129,7 @@ If not specified, the default language for the database is set to the default la For more information, see the following sections in the Operations Manual: * link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/create-databases/#_set_a_default_cypher_version_for_a_standard_database[Set a default Cypher version for a standard database]. -* link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/composite-databases/create-composite-databases/#composite-databases-default-language[Set the default Cypher version for a composite database]. +* link:{neo4j-docs-base-uri}/operations-manual/current/scalability/composite-databases/create-composite-databases/#composite-databases-default-language[Set the default Cypher version for a composite database]. a| label:functionality[] @@ -386,7 +386,7 @@ CASE x ... WHEN contains - 1 THEN ... END a| Using a variable named `contains` (or any casing variant, like `CONTAINS`) in addition or subtraction operations within a `WHEN` operand of a xref:expressions/conditional-expressions.adoc#case-simple[simple `CASE`] expression is deprecated. To continue using variables with this name, use backticks to quote the variable name: -* Additions: `CASE x ... WHEN ++`contains`++ + 1 THEN ... END` +* Additions: `CASE x ... WHEN ++`contains`++ + 1 THEN ... END` * Subtractions: `CASE x ... WHEN ++`contains`++ - 1 THEN ... END` a| @@ -401,8 +401,8 @@ CASE x ... WHEN in["abc"] THEN ... END ---- a| Using the `[]` operator on a variable named `in` (or any casing variant, like `IN`) within a `WHEN` operand of a xref:expressions/conditional-expressions.adoc#case-simple[simple `CASE`] expression is deprecated. To continue using variables with this name, use backticks to quote the variable name: - -* `CASE x ... WHEN ++`in`++[1] THEN ... END` + +* `CASE x ... WHEN ++`in`++[1] THEN ... END` * `CASE x ... WHEN ++`in`++["abc"] THEN ... END` @@ -601,7 +601,7 @@ label:functionality[] label:updated[] [source, cypher, role="noheader"] ---- -CREATE (n:Label {property: 'name'}), +CREATE (n:Label {property: 'name'}), ()-[r:REL_TYPE]->() ---- | Neo4j's link:{neo4j-docs-base-uri}/operations-manual/current/database-internals/store-formats/#store-format-overview[block format] now implements xref:appendix/gql-conformance/index.adoc[GQL's] limit on the maximum length of identifiers. @@ -652,7 +652,7 @@ RETURN t AS team, players [source, cypher, role="noheader"] ---- -OPTIONAL CALL db.labels() YIELD label +OPTIONAL CALL db.labels() YIELD label RETURN label ---- @@ -716,7 +716,7 @@ DROP [COMPOSITE] DATABASE ... [RESTRICT \| CASCADE ALIAS[ES]] | Added the ability to drop database aliases while deleting a database. This will affect local database aliases targeting the database and constituent database aliases belonging to the composite database. -For more information, see link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/delete-databases/#delete-databases-with-aliases[Delete a database with local database aliases targeting it] and link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/composite-databases/delete-composite-databases/#composite-databases-delete-with-aliases[Delete a composite database with constituent database aliases]. +For more information, see link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/delete-databases/#delete-databases-with-aliases[Delete a database with local database aliases targeting it] and link:{neo4j-docs-base-uri}/operations-manual/current/scalability/composite-databases/delete-composite-databases/#composite-databases-delete-with-aliases[Delete a composite database with constituent database aliases]. a| label:functionality[] @@ -1003,7 +1003,7 @@ MATCH SHORTEST 2 GROUPS (:A)-[:R]->{0,10}(:B) a| Introduced new graph pattern matching keywords to find variations of the xref:patterns/shortest-paths.adoc[shortest paths] between nodes. -a| +a| label:functionality[] label:new[] diff --git a/modules/ROOT/pages/functions/graph.adoc b/modules/ROOT/pages/functions/graph.adoc index 086635fec..33a73b0b1 100644 --- a/modules/ROOT/pages/functions/graph.adoc +++ b/modules/ROOT/pages/functions/graph.adoc @@ -16,7 +16,7 @@ .Considerations |=== -| `graph.names()` is only supported on link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/composite-databases/concepts/[composite databases]. +| `graph.names()` is only supported on link:{neo4j-docs-base-uri}/operations-manual/current/scalability/composite-databases/concepts/[composite databases]. |=== .+graph.names()+ @@ -71,7 +71,7 @@ The names of all graphs on the current composite database are returned. .Considerations |=== -| `graph.propertiesByName()` is only supported on link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/composite-databases/concepts/[composite databases]. +| `graph.propertiesByName()` is only supported on link:{neo4j-docs-base-uri}/operations-manual/current/scalability/composite-databases/concepts/[composite databases]. | The properties in the returned `MAP` are set on the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/aliases/manage-aliases-standard-databases/[alias]that adds the graph as a constituent of a composite database. |=== diff --git a/modules/ROOT/pages/functions/scalar.adoc b/modules/ROOT/pages/functions/scalar.adoc index 86a4f20c7..47d606ed4 100644 --- a/modules/ROOT/pages/functions/scalar.adoc +++ b/modules/ROOT/pages/functions/scalar.adoc @@ -383,8 +383,8 @@ It is therefore recommended to use application-generated IDs instead. [NOTE] ==== -On a link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/composite-databases/concepts/[composite database], the `id()` function should be used with caution. -It is recommended to use xref:functions/scalar.adoc#functions-elementid[`elementId()`] instead. +On a link:{neo4j-docs-base-uri}/operations-manual/current/scalability/composite-databases/concepts/[composite database], the `id()` function should be used with caution. +It is recommended to use xref:functions/scalar.adoc#functions-elementid[`elementId()`] instead. When called in database-specific subqueries, the resulting ID value for a node or relationship is local to that database. The local ID for nodes or relationships from different databases may be the same. diff --git a/modules/ROOT/pages/introduction/cypher-neo4j.adoc b/modules/ROOT/pages/introduction/cypher-neo4j.adoc index 76d52810d..ba0721fe4 100644 --- a/modules/ROOT/pages/introduction/cypher-neo4j.adoc +++ b/modules/ROOT/pages/introduction/cypher-neo4j.adoc @@ -8,7 +8,7 @@ This section discusses aspects of Neo4j that are important to consider when usin [[cypher-neo4j-editions]] == Cypher and the different editions of Neo4j -Neo4j consists of two editions: a commercial Enterprise Edition, and a Community Edition. +Neo4j consists of two editions: a commercial Enterprise Edition, and a Community Edition. Cypher works almost identically between the two editions, but there are key areas in which they differ: @@ -62,15 +62,15 @@ For more information, see the link:{neo4j-docs-base-uri}/operations-manual/curre Cypher queries are executed against a Neo4j database, but normally apply to specific graphs. It is important to understand the meaning of these terms and exactly when a graph is not a database. -*DBMS*:: A Neo4j Database Management System is capable of containing and managing multiple graphs contained in databases. Client applications will connect to the DBMS and open sessions against it. +*DBMS*:: A Neo4j Database Management System is capable of containing and managing multiple graphs contained in databases. Client applications will connect to the DBMS and open sessions against it. A client session provides access to any graph in the DBMS. -*Graph*:: Refers to a data model within a database. +*Graph*:: Refers to a data model within a database. Normally there is only one graph within each database, and many administrative commands that refer to a specific graph do so using the database name. Cypher queries executed in a session may declare which graph they apply to, or use a default, given by the session. Composite databases can contain multiple graphs, by means of aliases to other databases. Queries submitted to composite databases may refer to multiple graphs within the same query. -For more information, see link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/composite-databases/concepts/[Operations manual -> Composite databases]. +For more information, see link:{neo4j-docs-base-uri}/operations-manual/current/scalability/composite-databases/concepts/[Operations manual -> Composite databases]. *Database*:: A database is a storage and retrieval mechanism for collecting data in a defined space on disk and in memory. @@ -87,12 +87,12 @@ A fresh installation of Neo4j includes two databases: For more information about the _system_ database, see the sections on link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/[Database management] and link:{neo4j-docs-base-uri}/operations-manual/current/authentication-authorization/[Access control]. -=== Query considerations +=== Query considerations -Most of the time Cypher queries are reading or updating queries, which are run against a graph. +Most of the time Cypher queries are reading or updating queries, which are run against a graph. There are also link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/syntax[administrative commands] that apply to a database, or to the entire DBMS. -Administrative commands cannot be run in a session connected to a normal user database, but instead need to be run within a session connected to the `system` database. -Administrative commands execute on the `system` database. +Administrative commands cannot be run in a session connected to a normal user database, but instead need to be run within a session connected to the `system` database. +Administrative commands execute on the `system` database. If an administrative command is submitted to a user database, it is rerouted to the system database. [[cypher-neo4j-transactions]] @@ -125,11 +125,11 @@ Transactions in Neo4j can be either explicit or implicit. | Can execute a single Cypher query. | Committed, or rolled back, by the user. -| Committed automatically when a transactions finishes successfully. +| Committed automatically when a transactions finishes successfully. |=== -Queries that start separate transactions themselves, such as queries using xref::subqueries/subqueries-in-transactions.adoc[`+CALL { ... } IN TRANSACTIONS+`], are only allowed in _implicit_ mode. -Explicit transactions cannot be managed directly from queries, they must be managed via APIs or tools. +Queries that start separate transactions themselves, such as queries using xref::subqueries/subqueries-in-transactions.adoc[`+CALL { ... } IN TRANSACTIONS+`], are only allowed in _implicit_ mode. +Explicit transactions cannot be managed directly from queries, they must be managed via APIs or tools. For examples of the API, or the commands used to start and commit transactions, refer to the API or tool-specific documentation: @@ -166,7 +166,7 @@ The query will be categorized either as a read or write query depending on the d For more information, see the link:{neo4j-docs-base-uri}/operations-manual/current/procedures[Operations Manual -> Procedures.] ==== -=== ACID compliance +=== ACID compliance Neo4j is fully ACID compliant. This means that: diff --git a/modules/ROOT/pages/queries/select-version.adoc b/modules/ROOT/pages/queries/select-version.adoc index 34d56d7b9..7d5f4f4a6 100644 --- a/modules/ROOT/pages/queries/select-version.adoc +++ b/modules/ROOT/pages/queries/select-version.adoc @@ -100,10 +100,10 @@ For more information about how to change and view the default language of new an * link:{neo4j-docs-base-uri}/operations-manual/current/configuration/cypher-version-configuration/[Configure the Cypher default version] * link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/create-databases/#_set_a_default_cypher_version_for_a_standard_database[Set a default Cypher version for a standard database] -* link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/composite-databases/create-composite-databases/#composite-databases-default-language[Set a default Cypher version for a composite database] +* link:{neo4j-docs-base-uri}/operations-manual/current/scalability/composite-databases/create-composite-databases/#composite-databases-default-language[Set a default Cypher version for a composite database] * link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/aliases/manage-aliases-standard-databases/#set-default-language-for-remote-database-aliases[Set a default Cypher version for remote database aliases] * link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/alter-databases/#alter-database-default-language[Alter the default Cypher version of an existing database] -* link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/composite-databases/alter-composite-databases/#alter-default-language-composite-database[Alter the default Cypher version of a composite database] +* link:{neo4j-docs-base-uri}/operations-manual/current/scalability/composite-databases/alter-composite-databases/#alter-default-language-composite-database[Alter the default Cypher version of a composite database] * link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/aliases/manage-aliases-standard-databases/#alter-default-language-remote-database-alias[Alter the default Cypher version of a remote database alias] * link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/listing-databases/#_show_the_default_cypher_version_of_a_database[Show the default Cypher version of a database] * link:{neo4j-docs-base-uri}/operations-manual/current/authentication-authorization/dbms-administration/#_grant_privilege_to_modify_the_default_language_of_standard_databases[Grant privilege to modify the default language of standard databases] @@ -122,7 +122,7 @@ The following example demonstrates how a query that works in Cypher 5 can be rew .Original Cypher 5 query [source, cypher, role=test-skip] ---- -MATCH (n:Order)-[r:SHIPPED_TO]->(:Address) +MATCH (n:Order)-[r:SHIPPED_TO]->(:Address) SET n = r ---- @@ -173,7 +173,7 @@ SET n = properties(r) [source,cypher] ---- CYPHER 5 -MATCH (n:Order)-[r:SHIPPED_TO]->(:Address) +MATCH (n:Order)-[r:SHIPPED_TO]->(:Address) SET n = r ---- // end::queries_select_version_cypher_5[] diff --git a/modules/ROOT/pages/subqueries/subqueries-in-transactions.adoc b/modules/ROOT/pages/subqueries/subqueries-in-transactions.adoc index 19fe76391..09c38e0f1 100644 --- a/modules/ROOT/pages/subqueries/subqueries-in-transactions.adoc +++ b/modules/ROOT/pages/subqueries/subqueries-in-transactions.adoc @@ -221,7 +221,7 @@ For larger data sets, you might want to use larger batch sizes, such as `10000 R [[composite-databases]] == Composite databases -As of Neo4j 5.18, `CALL { ... } IN TRANSACTIONS` can be used with link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/composite-databases/concepts/[composite databases]. +As of Neo4j 5.18, `CALL { ... } IN TRANSACTIONS` can be used with link:{neo4j-docs-base-uri}/operations-manual/current/scalability/composite-databases/concepts/[composite databases]. Even though composite databases allow accessing multiple graphs in a single query, only one graph can be modified in a single transaction. `CALL { ... } IN TRANSACTIONS` offers a way of constructing queries which modify multiple graphs. @@ -433,7 +433,7 @@ RETURN n.num 1+d|Rows: 4 |=== -In this case, the first inner transaction includes `i = 1` and `i = 0`. +In this case, the first inner transaction includes `i = 1` and `i = 0`. Since `i = 0` causes an error, the entire transaction is rolled back, resulting in `null` for both elements. ===== @@ -521,7 +521,7 @@ RETURN n.num In the following example, `ON ERROR FAIL` is used after the failed inner transaction to prevent the remaining inner transactions from executing and to cause the outer transaction to fail as well. -.Transactions batched in 1 row with `ON ERROR FAIL` +.Transactions batched in 1 row with `ON ERROR FAIL` [source, cypher, role=test-fail] ---- UNWIND [1, 0, 2, 4] AS i