TinyDB – Caching Query Catching query is an advanced feature of TinyDB with the help of which it caches the query result for performance optimization. In this way, when we run the same query again, TinyDB doesn”t need to read the data from the storage. We can pass the cache_size to the table function to […]
TinyDB – Tables In TinyDB, we can work with multiple tables. These tables have the same properties as the TinyDB class. Let”s see how we can create tables in TinyDB and apply various operations on them − Creating Tables It’s very easy to create a table in TinyDB. Here”s its syntax − table_object = db.table(”table […]
TinyDB – Storage Types TinyDB has two types of storage: JSON and in-memory. TinyDB, by default, stores the data in JSON files. While creating a database, you need to specify the path where to store the JSON file on your computer. Storing Data in a JSON File First, let”s see how we can use a […]