- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Smita Kapse has Published 558 Articles
![Smita Kapse](https://www.tutorialspoint.com/assets/profiles/13597/profile/60_103706-1512718957.jpg)
Smita Kapse
240 Views
To drop a MongoDB database from the command line, use the following syntax:mongo yourDatabaseName --eval "db.dropDatabase()"To understand the above syntax, let us display all the database from MongoDB. The query is as follows −> show dbs;The following is the output −StudentTracker 0.000GB admin 0.000GB config 0.000GB local 0.000GB sample 0.000GB ... Read More
![Smita Kapse](https://www.tutorialspoint.com/assets/profiles/13597/profile/60_103706-1512718957.jpg)
Smita Kapse
58 Views
The flatMap() method in LongStream class returns a stream consisting of the results of replacing each element of this stream with the contents of a mapped stream produced by applying the provided mapping function to each element.The syntax is as follows −LongStream flatMap(LongFunction
![Smita Kapse](https://www.tutorialspoint.com/assets/profiles/13597/profile/60_103706-1512718957.jpg)
Smita Kapse
70 Views
To fetch the value from an Octet Tuple, use the getValueX() method. Here X is the index for which you want the value.For example, to fetch the 5th element i.e. 4th index, use the getValueX() method as −getValue(4);Let us first see what we need to work with JavaTuples. To work ... Read More
![Smita Kapse](https://www.tutorialspoint.com/assets/profiles/13597/profile/60_103706-1512718957.jpg)
Smita Kapse
426 Views
You can delete everything in a MongoDB database using dropDatabase() function. The syntax is as follows −use yourDatabaseName; db.dropDatabase();The above syntax will delete everything in a MongoDB database.To delete everything in a MongoDB database, let us first display all the databases from MongoDB. The query is as follows −> show ... Read More
![Smita Kapse](https://www.tutorialspoint.com/assets/profiles/13597/profile/60_103706-1512718957.jpg)
Smita Kapse
235 Views
Yes, it is possible to cast in a MongoDB query −db.yourCollectionName.find("this.yourFieldName >yourValue);To understand the concept, let us create a collection with the document. The query to create a collection with a document is as follows −> db.castingDemo.insertOne({"Amount":"200"}); { "acknowledged" : true, "insertedId" : ObjectId("5c947e874cf1f7a64fa4df42") } > db.castingDemo.insertOne({"Amount":"100"}); { ... Read More
![Smita Kapse](https://www.tutorialspoint.com/assets/profiles/13597/profile/60_103706-1512718957.jpg)
Smita Kapse
783 Views
The binascii module enables conversion between binary and various ASCII encoded binary representations. The binascii module contains low-level functions written in C for greater speed. They are used by the higher-level modules such as uu, base64 or binhex modules.The binascii module defines the following functions. These function are named as ... Read More
![Smita Kapse](https://www.tutorialspoint.com/assets/profiles/13597/profile/60_103706-1512718957.jpg)
Smita Kapse
92 Views
The iterator() method of the AbstractCollection class in Java is used to return an iterator over the elements contained in this collection.The syntax is as follows −public abstract Iterator iterator()To work with AbstractCollection class in Java, import the following package −import java.util.AbstractCollection;For Iterator, import the following package −import java.util.Iterator;The following ... Read More
![Smita Kapse](https://www.tutorialspoint.com/assets/profiles/13597/profile/60_103706-1512718957.jpg)
Smita Kapse
2K+ Views
Use $gte operator along with ISODate() to work Date query with ISODate in MongoDB.To understand the concept, let us create a collection with the document. The query to create a collection with a document is as follows −> db.dateDemo.insertOne({"StudentName":"John", "StudentAge":26, "AdmissionDate":new ISODate("2013-06-07")}); { "acknowledged" : true, "insertedId" : ... Read More
![Smita Kapse](https://www.tutorialspoint.com/assets/profiles/13597/profile/60_103706-1512718957.jpg)
Smita Kapse
2K+ Views
To SELECT from table A that does not exist in table B, you can use left join. Following is the syntax −select yourTableNameA.* from yourTableNameA left join yourTableNameB on yourTableNameA.yourColumnName = yourTableNameB.yourColumnName where yourTableNameB.yourColumnName IS NULL;Let us first create a table. Following is the query −mysql> create table table_A ... Read More
![Smita Kapse](https://www.tutorialspoint.com/assets/profiles/13597/profile/60_103706-1512718957.jpg)
Smita Kapse
185 Views
You can achieve pagination with the help of limit() and skip() in MongoDB.To understand the concept, let us create a collection with the document. The query to create a collection with a document is as follows −> db.paginationDemo.insertOne({"CustomerName":"Chris", "CustomerAge":23}); { "acknowledged" : true, "insertedId" : ObjectId("5c949de44cf1f7a64fa4df52") } > ... Read More