ArangoDB - Database Methods
In this chapter, we will discuss the different Database Methods in ArangoDB.
To start with, let us get the properties of the Database −
First, we invoke the Arangosh. Once, Arangosh is invoked, we will list the databases we created so far −
We will use the following line of code to invoke Arangosh −
[ "_system", "song_collection" ]
We see two databases, one _system created by default, and the second song_collection that we have created.
Let us now shift to song_collection database with the following line of code −
We will explore the properties of our song_collection database.
To find the name
We will use the following line of code to find the name.
To find the id −
We will use the following line of code to find the id.
To find the path −
We will use the following line of code to find the path.
Let us now check if we are in the system database or not by using the following line of code −
It means we are not in the system database (as we have created and shifted to the song_collection). The following screenshot will help you understand this.
To get a particular collection, say songs −
We will use the following line of code the get a particular collection.
[ArangoCollection 4890, "songs" (type document, status loaded)]
The line of code returns a single collection.
Let us move to the essentials of the database operations with our subsequent chapters.