In this part, we will examine the distinctive Database Methods in ArangoDB.
In the first place, let us get the properties of the Database −
- Name
- ID
- Way
To start with, we conjure the Arangosh. Once, Arangosh is conjured, we will list the information bases we made up until now −
We will utilize the accompanying line of code to summon Arangosh −
127.0.0.1:8529@_system> db._databases()
Yield
[
"_system",
"song_collection"
]
We see two data sets, one _system made of course, and the second song_collection that we have made.
Allow us presently to move to song_collection data set with the accompanying line of code −
127.0.0.1:8529@_system> db._useDatabase("song_collection")
Yield
127.0.0.1:8529@song_collection>
We will investigate the properties of our song_collection information base.
To discover the name
We will utilize the accompanying line of code to discover the name.
127.0.0.1:8529@song_collection> db._name()
Yield
song_collection
To discover the id −
We will utilize the accompanying line of code to discover the id.
song_collection
Yield
4838
To discover the way −
We will utilize the accompanying line of code to discover the way.
127.0.0.1:8529@song_collection> db._path()
Yield
/var/lib/arangodb3/databases/database-4838
Allow us currently to check on the off chance that we are in the framework information base or not by utilizing the accompanying line of code −
127.0.0.1:8529@song_collection&t; db._isSystem()
Yield
false
It implies we are not in the framework information base (as we have made and moved to the song_collection). The accompanying screen capture will assist you with getting this.
To get a specific assortment, state tunes −
We will utilize the accompanying line of code the get a specific assortment.
127.0.0.1:8529@song_collection> db._collection("songs")
Yield
[ArangoCollection 4890, "songs" (type document, status loaded)]
The line of code restores a solitary assortment.
Allow us to move to the basics of the data set activities with our ensuing sections.