TinyDB Multiple-Choice Questions (MCQs)

TinyDB is a document-oriented database, which is purely written in Python, and it does not have any external dependencies. TinyDB is designed to be easy and fun to use by providing a simple and clean API.

TinyDB MCQs: This section contains multiple-choice questions and answers on the various topics of TinyDB. Practice these MCQs to test and enhance your skills on TinyDB.

List of TinyDB MCQs

1. TinyDB is based upon____?

  1. Java
  2. Python
  3. C
  4. C++

Answer: B) Python

Explanation:

TinyDB is based on Python.

Discuss this Question


2. Is TinyDB open-source?

  1. Yes
  2. No

Answer: A) Yes

Explanation:

Yes, TinyDB is an open-source database.

Discuss this Question


3. TinyDB is designed for ____.

  1. Small-scale Projects
  2. Large-scale Projects
  3. Both

Answer: A) Small-scale Projects

Explanation:

TinyDB is designed for small-scale projects.

Discuss this Question


4. TinyDB is a ____.

  1. SQL
  2. Graph Database
  3. NoSQL
  4. None

Answer: C) NoSQL

Explanation:

TinyDB is a NoSQL database.

Discuss this Question


5. TinyDB stores data in which format?

  1. Vertex and Edges
  2. CSV
  3. JSON

Answer: C) JSON

Explanation:

TinyDB stores data in JSON format.

Discuss this Question


6. Is TinyDB designed for distributed systems?

  1. Yes
  2. No

Answer: B) No

Explanation:

TinyDB is not designed for the distributed system.

Discuss this Question


7. Does TinyDB has external dependencies?

  1. Yes
  2. No

Answer: B) No

Explanation:

TinyDB has no external dependencies.

Discuss this Question


8. TinyDB follows which kind of NoSQL database?

  1. Graph database
  2. Key-value pair database
  3. Document-oriented

Answer: C) Document-oriented

Explanation:

TinyDB is a document-oriented database.

Discuss this Question


9. Which of the following method is used to insert an item in TinyDB?

  1. Db.put()
  2. Db.input()
  3. Db.add()
  4. Db.insert()

Answer: D) Db.insert()

Explanation:

Db.insert() method is used to insert an item in TinyDB.

Discuss this Question


10. To insert an item, the data should be in the form of a ____?

  1. MAP
  2. LIST
  3. DICT

Answer: C) DICT

Explanation:

The data should be in the form of a Python dictionary.

Discuss this Question


11. Use the ____ function to verify the stored objects in the database?

  1. Full ()
  2. All()
  3. Complete ()
  4. List()

Answer: B) All()

Explanation:

Use the all() function to verify the stored objects in the database.

Discuss this Question


12. To insert many objects at once, which of the following method is used?

  1. Insert_several
  2. Insert_various
  3. Insert_multiple

Answer: C) Insert_multiple

Explanation:

To insert many objects at once, the Insert_multiple method is used.

Discuss this Question


13. The ____ function delivers just one document that matches.

  1. Get()
  2. Search()
  3. One()

Answer: A) Get()

Explanation:

The get() function delivers just one document that matches.

Discuss this Question


14. You may use the ____ command to delete all data from a database.

  1. Delete
  2. Remove
  3. Delete_all
  4. truncate

Answer: D) truncate

Explanation:

You may use the truncate command to delete all data from a database.

Discuss this Question


15. The ____ query checks the availability of a JSON file's subfield data.

  1. Is()
  2. Present()
  3. exists()

Answer: C) exists()

Explanation:

The exists() query checks the availability of a JSON file's subfield data.

Discuss this Question


16. Does The exists() query operates based on a Boolean condition?

  1. True
  2. False

Answer: A) True

Explanation:

True, The exists() query operates based on a Boolean condition.

Discuss this Question


17. Which of the following method finds at least one value in the database?

  1. One()
  2. Any()
  3. Some()

Answer: B) Any()

Explanation:

any() method finds at least one value in the database.

Discuss this Question


18. TinyDB's ____ assures data consistency and avoids data redundancy by separating data into distinct tables.

  1. data normalisation
  2. data integration
  3. data sharding
  4. data modeling

Answer: A) data normalisation

Explanation:

TinyDB's data normalization assures data consistency and avoids data redundancy by separating data into distinct tables.

Discuss this Question


19. Can TinyDB be used to store geographical data, such as maps?

  1. Yes
  2. No

Answer: B) No

Explanation:

TinyDB can store geospatial data by producing a JSON object.

Discuss this Question


20. Does TinyDB support indexing?

  1. Yes
  2. No

Answer: B) No

Explanation:

No, TinyDB does not support indexing.

Discuss this Question


21. The search method in TinyDB ____.

  1. Returns single document
  2. Returns multiple documents
  3. None

Answer: B) Returns multiple documents

Explanation:

The search method in TinyDB, returns multiple documents.

Discuss this Question


22. The get method in TinyDB ____.

  1. Returns single document
  2. Returns multiple documents
  3. None

Answer: A) Returns single document

Explanation:

The get method in TinyDB, returns a single document.

Discuss this Question


23. Can TinyDB store multimedia content?

  1. Yes
  2. No

Answer: A) Yes

Explanation:

TinyDB can store multimedia content such as photographs and movies by converting them to binary format.

Discuss this Question


24. To erase data from a TinyDB database, use the ____ function.

  1. Erase()
  2. Delete()
  3. Remove()
  4. Del()

Answer: C) Remove()

Explanation:

To erase data from a TinyDB database, use the remove() function.

Discuss this Question


25. Using which of the following method the first document that matches a specific criterion is updated?

  1. Update_all()
  2. Update()

Answer: B) Update()

Explanation:

The first document that matches a specific criterion is updated using the update() method.

Discuss this Question


26. All documents that match a specific criterion are updated, using which of the following method?

  1. Update_all()
  2. Update()

Answer: A) Update_all()

Explanation:

All documents that match a specific criterion are updated, using the update_all() method.

Discuss this Question


27. Does TinyDB support join operations?

  1. Yes
  2. No

Answer: B) No

Explanation:

TinyDB does not support join operations.

Discuss this Question


28. Does TinyDB allows you to use logical operators?

  1. Yes
  2. No

Answer: A) Yes

Explanation:

Yes, TinyDB allows logical operator usage.

Discuss this Question


29. When you simply want to change one document, which of the following method is used?

  1. Change()
  2. Update_all
  3. Update_one()
  4. Update()

Answer: D) Update()

Explanation:

When you simply want to change one document, the update() method is used.

Discuss this Question


30. What will happen if you will Insert a Document with an already existing ID in TinyDB?

  1. It will insert the same record again
  2. It will show you the value error

Answer: B) It will show you the value error

Explanation:

Inserting a Document with an already existing ID will result in a ValueError.

Discuss this Question


31. To create a table which of the following method is used?

  1. Db.create()
  2. Db.table()
  3. Db.new_table()

Answer: B) Db.table()

Explanation:

To create a table, db.table() is used

Discuss this Question


32. When you wish to change numerous documents at the same time, which of the following function is used?

  1. Change()
  2. Update_all
  3. Update_one()
  4. Update()

Answer: B) Update_all

Explanation:

When you wish to change numerous documents at the same time, the update_all() function is used.

Discuss this Question


33. Which of the following method is used to remove a table from DB?

  1. Db.drop()
  2. Db.remove()
  3. Db.remove_table()
  4. Db.drop_table()

Answer: D) Db.drop_table()

Explanation:

Db.drop_table() is used to remove a table from DB.

Discuss this Question


34. TinyDB comes with how many storage types?

  1. 4
  2. 5
  3. 2
  4. 3

Answer: C) 2

Explanation:

TinyDB comes with two storage types: JSON and in-memory.

Discuss this Question


35. TinyDB saves its data as ____ by default?

  1. In memory
  2. JSON files

Answer: B) JSON files

Explanation:

TinyDB saves its data as JSON files by default.

Discuss this Question


36. The "____" operator combines two conditions and returns True if any of them is fulfilled.

  1. LOGICAL AND
  2. LOGICAL OR

Answer: B) LOGICAL OR

Explanation:

The "Logical OR" operator combines two conditions and returns True if any of them is fulfilled.

Discuss this Question


37. Which query enables us to enter and update data at the same time based on the criteria?

  1. Upsert()
  2. Insert_update()
  3. Enter_update()
  4. Indate()

Answer: A) Upsert()

Explanation:

upsert() query enables us to enter and update data at the same time based on the criteria.

Discuss this Question


38. The number of documents in a database can be obtained, using which of the following query?

  1. All()
  2. List()
  3. Len()
  4. Number()

Answer: C) Len()

Explanation:

The number of documents in a database can be obtained, using the len() query.

Discuss this Question


39. The ____ query determines whether or not the database contains a matching value.

  1. In
  2. Is
  3. Include
  4. contains

Answer: D) contains

Explanation:

The contains query determines whether or not the database contains a matching value.

Discuss this Question


40. The ____ query returns the number of matched documents in a database.

  1. Len
  2. Count
  3. total

Answer: B) Count

Explanation:

The count query returns the number of matched documents in a database.

Discuss this Question


41. Which of the following middleware, speeds up a database by decreasing disc I/O?

  1. Caching middleware
  2. Sharing middleware
  3. Application middleware

Answer: A) Caching middleware

Explanation:

Caching middleware, speeds up a database by decreasing disc I/O.

Discuss this Question


42. Removes all documents that meet a specific requirement?

  1. Purge()
  2. Remove()

Answer: A) Purge()

Explanation:

Purge() Removes all documents that meet a specific requirement.

Discuss this Question


43. which of the following operations returns documents matching both queries?

  1. (query1) & (query2)
  2. (query1) | (query2)
  3. ~(query1)

Answer: A) (query1) & (query2)

Explanation:

(query1) & (query2) operations, return documents matching both queries.

Discuss this Question


44. TinyDB internally attaches an ID with each document you input.

  1. True
  2. False

Answer: A) True

Explanation:

TinyDB internally attaches an ID with each document you input.

Discuss this Question


45. Is it possible to open the same table with different settings several times?

  1. Yes
  2. No

Answer: B) No

Explanation:

It is not possible to open the same table with different settings several times.

Discuss this Question




👇 More MCQs (Category-Wise) 👇

Web Technologies MCQs

Computer Science Subjects MCQs

Databases MCQs

Programming MCQs

Testing Software MCQs

Digital Marketing Subjects MCQs

Cloud Computing Softwares MCQs

AI/ML Subjects MCQs

Engineering Subjects MCQs

Office Related Programs MCQs

Commerce MCQs

Graphic Design Softwares MCQs

General Knowledge (GK) MCQs

Class-wise MCQs

Others

Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.