Hopefully, I can get answers for each database server.
For an outline of how indexing works check out: How does database indexing work?
Since most of the answers are given for SQL databases, I am writing this for NOSQL databases, specifically for MongoDB.
Below is the syntax to create an index in the MongoDB using mongo shell.
db.collection.createIndex( , )
example - db.collection.createIndex( { name: -1 } )
In the above example an single key descending index is created on the name field.
Keep in mind MongoDB indexes uses B-tree data structure.
There are multiple types of indexes we can create in mongodb, for more information refer to below link - https://docs.mongodb.com/manual/indexes/