Junior — Middle
Can you list the databases you are familiar with?
sobes.tech AI
Answer from AI
I am familiar with several types of databases:
- Relational databases (SQL): PostgreSQL, MySQL, SQLite. Used for storing structured data with tables and support SQL query language.
- Document-oriented databases (NoSQL): MongoDB. Store data in document format (e.g., JSON), which is convenient for flexible schemas.
- Key-value: Redis. Used for fast data access by key, often in caching and sessions.
Example of connecting to SQLite in Python:
import sqlite3
conn = sqlite3.connect('example.db')
cursor = conn.cursor()
cursor.execute('CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY, name TEXT)')
conn.commit()
conn.close()