ArangoDB installation and use
The process of installing ArangoDB is as follows:
1. Download and install ArangoDB:
-Go to ArangoDB's official website( https://www.arangodb.com )Download the version that is suitable for your operating system.
-Install according to the requirements of the operating system.
2. Start ArangoDB:
-For Windows systems, open a Command Prompt (CMD) and navigate to the ArangoDB installation directory.
-Execute the following command to start the ArangoDB server:
arangod --server.endpoint tcp://127.0.0.1:8529
3. Access ArangoDB web interface:
-Open a web browser and enter the following URL: http://127.0.0.1:8529
-Enter username and password (default username: root, password:)
After installation and startup, we can use the following example to demonstrate how to create data tables, insert, modify, query, and delete data in ArangoDB.
Data Table Creation:
sql
CREATE COLLECTION myCollection
Data insertion:
sql
INSERT { "name": "John", "age": 25 } INTO myCollection
Data modification:
sql
UPDATE { "_key": "123abc", "name": "John", "age": 25 } IN myCollection
UPDATE { "name": "John" } WITH { "age": 26 } IN myCollection
Data Query:
sql
FOR doc IN myCollection FILTER doc.age > 30 RETURN doc
Data deletion:
sql
REMOVE { "_key": "123abc" } IN myCollection
In the above example, 'myCollection' is a table name, and you can customize the table name and fields as needed. Using ArangoDB's AQL (ArangoDB Query Language), you can perform various data operations, including creating tables, inserting data, modifying data, querying data, and deleting data. Please operate according to your own needs.