Which type of relationship is represented by a foreign key in a database?
- Many-to-Many
- Many-to-One
- One-to-Many
- One-to-One
A foreign key in a database represents a One-to-Many relationship. It signifies that the values in one column (or set of columns) correspond to values in another table's primary key column.
Authorization mechanisms often rely on defining access _______ for different user roles.
- Keys
- Permissions
- Secrets
- Tokens
Authorization mechanisms often rely on defining access permissions for different user roles. Permissions determine what actions or resources a user with a specific role can access.
What does SQL injection refer to in the context of security vulnerabilities?
- Exploiting vulnerabilities in the SQL server
- Forcing a user to reveal their SQL credentials
- Injecting malicious code into a website's frontend
- Manipulating a database using Structured Query Language
SQL injection refers to manipulating a database using Structured Query Language. It is a security vulnerability where an attacker inserts malicious SQL statements into input fields, potentially gaining unauthorized access to the database or causing data manipulation.
A code review checklist often includes items related to _______ , ensuring consistency and adherence to best practices.
- Coding standards
- Feature requirements
- Project deadlines
- Team meetings
A code review checklist often includes items related to coding standards, ensuring consistency and adherence to best practices across the codebase. By following established coding standards, developers can write maintainable, readable, and efficient code, which ultimately benefits the project's quality and scalability.
When resolving a merge conflict in Git, it's essential to communicate and collaborate with _______ to ensure the changes are correctly integrated.
- All contributors
- Code reviewer
- Project manager
- Team members
When resolving a merge conflict in Git, it's essential to communicate and collaborate with team members to ensure the changes are correctly integrated. Collaboration is crucial to understanding conflicting changes and finding the best resolution.
How does MongoDB handle relationships between data?
- Embedding and Referencing
- Indexing
- Joins
- Sharding
MongoDB handles relationships between data through embedding and referencing. Embedding involves storing related data within the same document, while referencing involves using references to link documents.
You're designing an application that requires finding the shortest path between two nodes in a graph. Which algorithm would you choose and why?
- A* Algorithm
- Breadth-First Search (BFS)
- Depth-First Search (DFS)
- Dijkstra's Algorithm
Dijkstra's Algorithm is the preferred choice for finding the shortest path in a graph. It guarantees the shortest path in weighted graphs, making it suitable for scenarios where accurate distance calculations are crucial, such as network routing.
How does CDN (Content Delivery Network) utilize caching for performance optimization?
- Caches content on multiple servers globally
- Disables caching for faster content retrieval
- Relies solely on client-side caching
- Utilizes a single server for caching
CDNs cache content on multiple servers globally, reducing latency by serving content from the nearest server to the user. This optimizes performance by minimizing the distance data travels.
In error handling, _______ refers to the process of preserving data or program state when an error occurs.
- Checkpointing
- Compensation
- Recovery
- Rollback
In error handling, checkpointing refers to the process of preserving data or program state when an error occurs. This helps in restarting from a known point after the occurrence of an error.
Which tool in Browser Developer Tools is used to analyze the performance of a web page?
- Application
- Console
- Elements
- Performance
The "Performance" tool in Browser Developer Tools is used to analyze the performance of a web page. It provides a timeline of events, helping developers identify bottlenecks and optimize page speed.