Q31. How do you model a one-to-many relationship in MongoDB?
The answer depends on the size of the "many" side and the access pattern. One-to-few: embed an array of subdocuments. A user with a handful of addresses embeds them, so o...
Technical Question Bank · Peer-Reviewed
Search and filter frequently asked interview questions across technical, programming, and behavioral domains. Tailor your interview preparation by difficulty for freshers or experienced developers (142 available).
The answer depends on the size of the "many" side and the access pattern. One-to-few: embed an array of subdocuments. A user with a handful of addresses embeds them, so o...
Perfect consistency is not achievable without giving up caching; aim for bounded staleness and correct behavior. Practical rules: - On write, commit to the database first...
`SELECT`, `FROM`, `WHERE`, `GROUP BY`, `HAVING`, `ORDER BY`, `JOIN`, `INSERT`, `UPDATE`, `DELETE`, `CREATE`, `ALTER`, `DROP`, `INDEX`, `UNION`, `LIMIT`, `DISTINCT`, `AS`,...
Dimensions change over time: a customer moves city, a product changes category. A slowly changing dimension strategy decides how history is preserved. - Type 1: overwrite...
SQL supports both single-line and multi-line commenting syntax across relational database engines: ### 1. Single-Line Standard Comment (`--`): The official ANSI SQL stand...
The medallion architecture organizes a lakehouse into three refinement layers. - Bronze (raw): data landed as-is from sources, append-only, with ingestion metadata. It is...
`SELECT`. Optional clauses: `WHERE`, `GROUP BY`, `HAVING`, `ORDER BY`, `LIMIT`, `JOIN`. ```sql SELECT name AS full_name, salary * 12 AS annual_salary FROM employees WHERE...
CDC captures row-level changes from a source database and streams them downstream with low latency. A typical design: - Capture: read the database transaction log with a ...
```sql SELECT * FROM products; ``` ⚠️ *Interview tip*: Always follow up with "But in production, I list explicit columns to reduce network overhead and prevent breaking i...
Yes, using `AS` (alias): ```sql SELECT first_name AS fname, last_name AS lname FROM customers; -- AS is optional but recommended for readability: SELECT first_name fname ...
HireXTech uses essential storage to remember your study preferences and third-party advertising cookies via Google AdSense in compliance with GDPR. You can choose to enable essential cookies only or accept all cookies. Read our Privacy Policy.