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 […]
Author Archives: user
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 […]
TinyDB – Retrieving Data After creating a database, we need to frequently retrieve the data from that database. Following are the ways by which we can reterive the data from a database − The len() Query With the help of this query, we can get the number of documents in a database. Its syntax is […]