🎬No video for this question yet. The written answer is below.
Did you work on (Database Basics)?- Medallion Architecture Explaination
- Explain Delta Lake Tables (ACID)
📝 Answer
Interviewer:
Have you worked on database basics? Can you explain your understanding in a real-time context?
Candidate:
So basically, yes, I have worked on database basics quite extensively, especially as part of my data engineering projects.
When I say basics, I don’t just mean simple queries… I mean understanding how data is structured, stored, and accessed efficiently.
First, I focused on table design. In my projects, I worked with both normalized and denormalized schemas depending on the use case.
For transactional systems, I preferred normalized design to avoid redundancy. But for analytics, I used denormalized structures like star schema for better performance.
Then comes indexing. I learned how indexes improve query performance. In one case, a query was taking a long time, and after adding an index on the join column, performance improved significantly.
I also worked with constraints like primary keys and foreign keys to maintain data integrity.
So basically, database basics helped me design efficient schemas and write optimized queries in real-time projects.
Interviewer:
Can you explain Medallion Architecture?
Candidate:
So basically, Medallion Architecture is something I’ve used in modern data lake projects.
Let me explain how I think about it.
It has three layers… Bronze, Silver, and Gold.
Bronze layer is raw data. Whatever data comes from source systems, we store it as-is. In my project, this was stored in S3.
Silver layer is cleaned and transformed data. Here we handle data quality issues, remove duplicates, and standardize formats.
Gold layer is business-level data. This is where data is aggregated and ready for reporting.
In one of my projects, I built a pipeline where data flows from S3 raw layer to processed layer using Glue, and finally to analytics layer for dashboards.
So basically, Medallion Architecture helps organize data in a structured way and improves data quality step by step.
Interviewer:
Can you explain Delta Lake tables and how they provide ACID properties?
Candidate:
So basically, Delta Lake is something I explored while working with modern data platforms.
Traditionally, data lakes don’t support ACID transactions, which leads to issues like data inconsistency.
Delta Lake solves this problem.
Let me explain how I understand it.
Delta Lake stores data in Parquet format, but it also maintains a transaction log.
This transaction log keeps track of all changes like inserts, updates, and deletes.
So when multiple operations happen, Delta ensures atomicity. Either the entire operation succeeds or fails.
It also ensures consistency and isolation by managing concurrent operations.
In one of my projects, I used Delta tables to handle incremental data loads. It allowed me to perform merge operations safely.
Let me show a simple example.
MERGE INTO delta_table t USING updates s ON t.id = s.id WHEN MATCHED THEN UPDATE SET t.value = s.value WHEN NOT MATCHED THEN INSERT (id, value) VALUES (s.id, s.value);
So basically, Delta Lake brings reliability to data lakes by adding ACID properties, schema enforcement, and versioning.
One thing I really liked is time travel. We can query previous versions of data, which is very useful for debugging.
Interviewer (Follow-up):
That’s great. Can you explain how Delta Lake handles concurrent writes internally?