WorksheetsTest13Apr24
Total questions: 60
Worksheet time: 3600secs
What does the term "bounded context" mean in relation to microservices?
How a microservice uses memory
The logical domain represented by the data consumed and emitted by a microservice according to the data's purpose, structure and meaning
The cloud provider's region where the microservice operates
The common characteristics within a collection of entities in one or many business domains
How is distributed tracing used in microservices?
As a mechanism to ensure that failed microservices are resurrected properly
As a mechanism to transfer log management between a given host on demand
As a mechanism to observe the behavior of distinct system calls between and within microservices
As a mechanism to change the behavior of a microservice at runtime
When you have ample time and budget, which will be your choice of architecture
for application development?
Microservices
Monolith
Either of these two
None of the above
How does a backing service apply to microservices?
It prevents a microservice from failing
It acts as a dedicated service that provides essential functionality required by a microservice
It shuts down a microservice when it can no longer handle the computing load
It coordinates network activity between microservices
Q4 What's the difference between a microservices-oriented architecture (MOA) and a service-oriented architecture (SOA)?
An SOA uses intermediation technology to facilitate communication between services
An MOA shares as little data as possible while an SOA shares as much data as possible
A developer can run a monolithic application with SOA principles
All the above
Which Architecure allows use of mutiple programming lanuages in development process.
Microservices
Both actually
None
Anyone can have
Which among the choices are NOT included in definition of the good software development practice.
Health checks and Metrics
Metrics and Tracing
Tracing and logs
All of the above
Which of the following query is correct to get Current Date from Query?
A. SELECT DATE ( NOW() ) as today;
B. SELECT DATE_FORMAT( NOW( ) , '%Y-%m-%d' ) as today;
A. SELECT DATE ( NOW() ) as today;
B. SELECT DATE_FORMAT( NOW( ) , '%Y-%m-%d' ) as today;
Both A and B
None
Write a query to display first_name and last_name of all employees who have their first_name starting with 'A'.
Select first_name from employess where first_name LIKE '%A';
Select first_name from employess where first_name LIKE "'A'%";
Select first_name from employess where first_name LIKE 'A%';
Select first_name from employess where first_name LIKE '%A%';
A relational database can have how many types of keys in a table ?
Candidate key
Primary key
Foreign key
All of these
Total number of rows/records/horizontal arrangement in a table is called:
Degree
Records
Integer
Cardinality
Which is the correct query to delete the rows of employees whose exp is less than 10.
DELETE * FROM EMP WHERE EXP<10;
DELETE FROM EMP;
DELETE FROM EMP WHERE EXP<10;
DELETE FROM EMP WHERE EXP>10;
Difference between ALTER Table command and UPDATE command :
ALTER is DDL command and is used for modifying the schema of table
UPDATE is DML command and is
used for modifying the existing data of table
Using Alter command any value inside the table can be modified.
Using Update command columns of a table can be renamed.
You are required to update the phone number for only the DesignerID "SMI01" in the "Designer" table. Which of these would successfully do that?
UPDATE Designer SET PhoneNo = '01224123456'
UPDATE Designer (PhoneNo) VALUES ('01224123456')
UPDATE Designer SET PhoneNo = '01224123456' WHERE DesignerID = 'SMI01'
UPDATE PhoneNo = '01224123456' FROM Designer WHERE DesignerID = 'SMI01'
What is MongoDB and how is it different from traditional SQL databases?
MongoDB is a traditional SQL database with a fixed schema and limited scalability
MongoDB is a programming language used for web development and is not related to databases at all
MongoDB is a NoSQL database that stores data in a flexible, JSON-like format. It is different from traditional SQL databases in that it does not use a fixed schema and is designed for horizontal scalability.
MongoDB is a type of data storage that only works with structured data and does not support JSON format
Explain the purpose of MongoDB Compass.
To provide a platform for creating and managing SQL databases
To offer a command-line interface for MongoDB
To generate reports and analytics for NoSQL databases
To provide a graphical user interface for MongoDB, allowing users to explore and manipulate data.
What are CRUD operations in MongoDB and how are they performed?
Create, Read, Update, and Delete operations are performed using specific methods and commands provided by MongoDB.
Create, Retrieve, Update, Destroy operations are performed using SQL commands
Add, Search, Modify, Erase operations are performed using Firebase commands
Copy, Remove, Update, Drop operations are performed using NoSQL methods
What are the advantages of using NoSQL databases over traditional SQL databases?
NoSQL databases have no advantages over traditional SQL databases.
NoSQL databases offer advantages such as scalability, flexibility, and better performance for certain types of applications.
NoSQL databases are not suitable for any type of application.
NoSQL databases offer disadvantages such as limited scalability, inflexibility, and worse performance for certain types of applications.
Wich method is for writing data into mongoDB?
insertOne()
setDoc()
addDoc()
postOne()
Wich method is for getting all data from mongoDB?
getDoc()
findOne()
find()
findDoc()
What will be the output of the following Python code?
>>>str1="helloworld"
>>>str1[::-1]
a) dlrowolleh
b) hello
c) world
d) helloworld
If a=(1,2,3,4), a[1:-1] is _________
a) Error, tuple slicing doesn’t exist
b) [2,3]
c) (2,3,4)
d) (2,3)
What will be the output of the following Python code?
a={1:"A",2:"B",3:"C"}
b={4:"D",5:"E"}
a.update(b)
print(a)
a) {1: ‘A’, 2: ‘B’, 3: ‘C’}
b) Method update() doesn’t exist for dictionaries
c) {1: ‘A’, 2: ‘B’, 3: ‘C’, 4: ‘D’, 5: ‘E’}
d) {4: ‘D’, 5: ‘E’}
times is ________________ type of argument.
default arguments
keyword arguments
positional arguments
arbitrary positional arguments
arbitrary keyword arguments
What is an instance in python?
A special kind of function that is defined in a class definition.
The creation of an instance of a class.
An individual object of a certain class. An object obj that belongs to a class Circle, for example, is an instance of the class Circle.
A moment in time
What will be the output of the following Python code?
>>> lamb = lambda x: x ** 3
>>> print(lamb(5))
15
555
125
Error
What is the output of the expression :
print(3*1**3)
27
9
3
1
Which of the following classes extends HashMap and maintains the insertion order of the elements?
TreeMap
LinkedHashMap
SortedMap
None of the above
Which interface provides the capability to store
objects using a key-value pair?
List
Set
Map
SortedSet
Which of these statements are true?
Statement A : Collection is a Interface
Statement B : Collections is a class
Statement A is true
Statement B is true
Both Statements are true
Both Statements are false
Which of the following code is used to get a HttpSession object in Servlet?
request.getSession()
response.getSession()
request.session()
response.session()
1. Which of the following is not a core interface of Hibernate?
a) Configuration
b) Criteria
c) SessionManagement
d) Session
2. Which of the following methods hits database always?
a) load()
b) loadDatabase()
c) getDatabase()
d) get()
Hibernate is an?
Open Source
Lightweight
ORM
All mentioned above
Which of the following object is used to create SessionFactory object in hibernate?
SessionFactory
Transaction
Configuration
Session
Which of the following is true about hibernate annotations?
All the metadata is clubbed into the POJO java file along with the code this helps the user to understand the table structure and POJO simultaneously during the development
Hibernate Annotations is the powerful way to provide the metadata for the Object and Relational Table mapping
Both of the above
None of the above
In the elements of Hibernate architecture is a factory of session and client of ConnectionProvider, It holds the second level cache (optional) of data is ?
Session
Transaction
SessionFactory
ConnectionProvider
It is an open source Java-based framework used to create stand-alone, production-grade Spring based Applications that you can "just run"
Spring Data
Spring JPA
Spring Boot
Spring MVC
it contains information of configuration for the maven to build the project such as dependencies, build directory, source directory, test source directory, plugin etc.
maven wrapper configuration
application.properties
pom.xml file
application.xml
What is the Annotation used for Rest controller
@Restcontroller
@Controller
@RestController
@SpringBootApplication
What is default HTML template engine in spring boot
JSP
Thymeleaf
HTML
@Autowired can be used for
Include a Repository in a Controller
Include a Service in a Controller
Include a Component in a Controller
All the Above
Which of the Following are true?
Methods annotated with @RestController return a String or JSON object
Methods annotated with @Controller returns HTML filename
Methods annotated with @RestController automatically converts Outputs with HTML
All the Above
JavaScript Code can be called by using _________.
RMI
Function / Method
Triggering Event
Preprocessor
What is the output of the following script?
function display() { document.writeln(10+20+"30"); } display();
60
30"30"
3030
102030
Choose the correct JavaScript syntax to change the content of the following HTML code.
<p id="geek">GeeksforGeeks</p>
document.getElement(“geek”).innerHTML=”I am a Geek”;
document.getElementById(“geek”).innerHTML=”I am a Geek”;
document.getId(“geek”)=”I am a Geek”;
document.getElementById(“geek”).innerHTML=I am a Geek;
<script type="text/javascript" language="javascript">
var x=5;
var y=6;
var res=eval("x*y");
document.write(res);
</script>
“30”
30
5*6
“5*6”
What is the role of services in AngularJS and name any services made available by default?
AngularJS Services are objects that provide separation of concerns to an AngularJS app.
These can be created using a factory method or a service method.
Services are singleton components and all components of the application (into which the service is injected) will work with single instance of the service
all of the above
Which of the following is true about ng-include directive?
Embed HTML pages within a HTML page using ng-include directive
Embed JS files within a HTML page using ng-include directive
Both of the above.
None of the above.
Which of the following query is correct to get Current Date from Query?
A. SELECT DATE ( NOW() ) as today;
B. SELECT DATE_FORMAT( NOW( ) , '%Y-%m-%d' ) as today;
A. SELECT DATE ( NOW() ) as today;
B. SELECT DATE_FORMAT( NOW( ) , '%Y-%m-%d' ) as today;
Both A and B
None
Identify the incorrect difference between HTML and DHTML?
HTML is a mark-up language, while DHTML is a collection of technology
HTML sites will be fast upon client-side technologies, while DHTML sites will be slow enough upon client-side technologies.
DHTML creates dynamic web pages, whereas HTML creates static web pages.
HTML cannot have any server side code but DHTML may contain server side code.
DHML is basically using JavaScript and style sheets in an HTML page.
What is the purpose of a bundler in web development?
To generate JSX
To convert JSX and other resources into JavaScript
To bootstrap an application
If you need space above the div tag, what was the property to increase the margin-top? (Choose the correct syntax).
margin-top: 20;
marginTop: 20px;
margin-top: 20px;
Margin-Top: 20;
