Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to create temporary collection in mongoDB like temp table in sql server?

I Want to create a temp collection in mongodb just like temp table in Sql Server.If it is possible then please let me know how can I do this.

like image 281
soulgear Avatar asked Aug 23 '16 08:08

soulgear


People also ask

What is the alternative for temporary table in SQL Server?

A valuable alternatives for the SQL temp table and table variable are SCHEMA_ONLY Memory-Optimized tables and the Memory-optimized Table Variable, where the data will be completely stored in the memory without the need to touch the TempDB database, providing the best data access performance.

Can you create a temporary table in SQL?

Create a Global Temporary Table in SQL Server. You can also create a global temporary table by placing double hash (##) before the temporary table name. The global temporary table will be available across different connections. 3 records will be inserted into the table.

What are the 2 types of temporary tables in SQL Server?

SQL Server provides two types of temporary tables according to their scope: Local Temporary Table. Global Temporary Table.

Which database is used to store temporary tables and data?

SQL Server uses the TempDB database for working storage of temporary tables and temporary stored procedures.


1 Answers

No there are no temporary collections.

You may have a look at capped collections which "are fixed-size collections" and they behave like this: "once a collection fills its allocated space, it makes room for new documents by overwriting the oldest documents in the collection."

like image 108
sergiuz Avatar answered Oct 02 '22 09:10

sergiuz