Sobes.tech
Junior

What is your experience with SQL and NoSQL databases?

sobes.tech AI

Answer from AI

My experience includes working with relational databases such as PostgreSQL and MySQL, primarily for managing application configurations and storing structured data. In the context of CI/CD, I automated deployment of schemas and migrations using tools like Liquibase and Alembic.

With NoSQL databases such as MongoDB and Redis, I have worked for caching, storing unstructured data, and managing the state of distributed systems. I used them to optimize application performance and scalability.

Key tasks included:

  • Deploying and configuring database instances.
  • Monitoring performance and health.
  • Writing and optimizing queries.
  • Backing up and restoring data.
  • Implementing automation for database management.

Example script for creating a user in PostgreSQL using psql:

-- Creating a new user
CREATE USER new_user WITH PASSWORD 'secure_password';

-- Granting privileges on the database
GRANT ALL PRIVILEGES ON DATABASE my_database TO new_user;

Example command for inserting a document into MongoDB:

// Using mongosh
db.myCollection.insertOne( { name: "Test Document", value: 123 } );