Full-Stack Development Technology & Digital Applications 3 — Questions and Answers
Question 1: What is the difference between SQL and NoSQL databases in terms of schema?
- SQL is schemaless; NoSQL requires a fixed schema
- SQL enforces a fixed schema; NoSQL typically allows flexible or schemaless storage (Correct answer)
- Both require predefined schemas enforced at the application layer
- NoSQL enforces stricter schemas than SQL
Correct answer: SQL enforces a fixed schema; NoSQL typically allows flexible or schemaless storage
Relational SQL databases require a predefined schema with typed columns, while most NoSQL databases allow documents or records to have varying fields.
Question 2: Which authentication mechanism uses a signed, self-contained token to transmit user claims between client and server without server-side session storage?
- OAuth 2.0 authorization code flow
- Session cookies with server-side store
- JSON Web Token (JWT) (Correct answer)
- SAML assertions
Correct answer: JSON Web Token (JWT)
JWTs are digitally signed tokens encoding claims that the server can verify without a database lookup, enabling stateless authentication.
Question 3: In CI/CD pipelines, what distinguishes continuous delivery from continuous deployment?
- Continuous delivery automates testing only; continuous deployment also automates the build
- Continuous delivery requires manual approval before production release; continuous deployment releases automatically (Correct answer)
- They are identical terms used interchangeably
- Continuous deployment skips automated tests to release faster
Correct answer: Continuous delivery requires manual approval before production release; continuous deployment releases automatically
Continuous delivery ensures code is always release-ready but requires a human gate; continuous deployment pushes every passing build to production automatically.
Question 4: What is the primary advantage of using GraphQL over a traditional REST API?
- GraphQL is always faster because it uses binary encoding
- Clients can request exactly the fields they need, avoiding over-fetching or under-fetching (Correct answer)
- GraphQL eliminates the need for a backend server
- GraphQL automatically generates database schemas
Correct answer: Clients can request exactly the fields they need, avoiding over-fetching or under-fetching
GraphQL lets clients specify precisely which fields to return in a single query, reducing unnecessary data transfer compared to fixed REST endpoints.
Question 5: Which browser storage mechanism is best suited for storing large amounts of structured data client-side with querying capabilities?
- localStorage
- sessionStorage
- Cookies
- IndexedDB (Correct answer)
Correct answer: IndexedDB
IndexedDB is a low-level browser API providing a transactional database for large amounts of structured data, including files and blobs.
Question 6: In microservices architecture, what pattern is used to maintain data consistency across services without distributed transactions?
- Two-phase commit (2PC)
- Saga pattern (Correct answer)
- ACID transactions
- Monolithic coupling
Correct answer: Saga pattern
The Saga pattern breaks a transaction into a sequence of local transactions, each publishing events that trigger the next step or a compensating rollback.
Question 7: What is tree-shaking in the context of modern JavaScript bundlers?
- Recursively traversing the DOM to remove unused elements
- Eliminating dead code (unused exports) from the final bundle at build time (Correct answer)
- Shaking out race conditions in asynchronous code
- Restructuring the component tree for better rendering performance
Correct answer: Eliminating dead code (unused exports) from the final bundle at build time
Tree-shaking statically analyzes ES module imports and removes any exported code that is never imported, reducing bundle size.
What is the difference between SQL and NoSQL databases in terms of schema?