From the course: Data Ingestion with Python

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Working with key or value databases

Working with key or value databases - Python Tutorial

From the course: Data Ingestion with Python

Start my 1-month free trial

Working with key or value databases

- [Instructor] Key-value databases maps keys to values. The keys are usually strings or bytes, and the value types vary depending on the database. They can be strings, bytes, number, lists, and other. If you'd like to have more complex types, you'll probably have to serialize and de-serialize them using encodings such as JSON. A lot of time, key-value databases, are used as a caching layer, meaning we get faster access to data than hitting another database. Caching means the key don't have to persist in the database. Visual look up is we first to look in the cache and if you find it, we use the data, otherwise if it's not find, we look in the main database. If it's found, we update the cache and use the data, and if it's not found in the main database, it's an error. One of the most common key-value databases is Redis. You're going to use Docker to run a local Redis database. Use the run Redis script to start a Redis database and populate it with data. So, python run_redis. And now…

Contents