What is the default sorting order in SQL if ORDER BY is used without specifying ASC or DESC?
Anonymous Quiz
19%
DESC (Descending)
62%
ASC (Ascending)
9%
Depends on the database
9%
No default order
What is the difference between LEFT JOIN and INNER JOIN? #sql
Anonymous Quiz
16%
LEFT JOIN returns only matching rows, while INNER JOIN returns all rows
4%
LEFT JOIN returns only unmatched rows, while INNER JOIN returns all rows
77%
LEFT JOIN returns all rows from the left table, even if there's no match in the right table
3%
There is no difference
What is the main advantage of the CQRS (Command Query Responsibility Segregation) pattern in SQL databases?
Anonymous Quiz
4%
Reduces database size
73%
Separates read and write operations for better scalability
10%
Prevents deadlocks
12%
Ensures strict ACID compliance
Which pattern is used to wrap an object and add new behaviors dynamically at runtime?
Anonymous Quiz
12%
Adapter
10%
Proxy
72%
Decorator
5%
Bridge
Which pattern is used to allow incompatible interfaces to work together?
Anonymous Quiz
78%
Adapter
8%
Strategy
8%
Observer
7%
Factory
Which pattern allows an object to change its behavior dynamically depending on its state?
Anonymous Quiz
24%
Strategy
41%
State
27%
Observer
8%
Factory Method
Which component in MVC is responsible for updating the user interface?
Anonymous Quiz
10%
Model
16%
Controller
1%
Router
73%
View
Which HTTP method is typically used to create a new resource?
Anonymous Quiz
6%
GET
88%
POST
6%
PUT
0%
DELETE
What is the recommended format for resource names in RESTful APIs?
Anonymous Quiz
8%
PascalCase (e.g., /UserAccounts)
11%
camelCase (e.g., /userAccounts)
64%
snake_case (e.g., /user_accounts)
17%
kebab-case and plural (e.g., /user-accounts)
Which of the following URLs is the most RESTful for fetching a specific order with ID 42?
Anonymous Quiz
3%
/getOrder?id=42
67%
/orders/42
5%
/order?id=42
26%
/api/v1/orders?id=42
What is a common use of the HTTP PATCH method in REST APIs?
Anonymous Quiz
10%
Completely replace a resource
0%
Delete a resource
88%
Partially update a resource
2%
Create a new resource
What does require 'json' do?
Anonymous Quiz
4%
Loads a JSON file
86%
Includes the library for working with JSON
4%
Creates a JSON object
5%
Parses a JSON string
👍2
Which of the following is the correct syntax for a ternary operator in Ruby?
Anonymous Quiz
97%
condition ? value1 : value2
3%
if condition then value1 else value2
0%
if condition { value1 else value2 }
0%
condition ? value1 : value2 else value3
Forwarded from Ruby Interview | Ruby on Rails
Which of the following code snippets correctly checks if a number is even in Ruby?
Anonymous Quiz
27%
if number % 2 == 0
2%
if number == even?
70%
if number.even?
1%
if number.even
👍5
Forwarded from Ruby Interview | Ruby on Rails
Which values are considered falsy in Ruby?
Anonymous Quiz
7%
0
3%
" (empty string)
3%
[] (empty array)
88%
nil and false