G2 Technology Solutions
OneCert Asia Agri Certification Interview Questions and Answers
Q1. Associations/relations in rails
Associations/relations in Rails refer to the way different models are connected to each other.
Rails associations are used to define relationships between different models in a Rails application.
There are different types of associations in Rails such as belongs_to, has_one, has_many, and has_and_belongs_to_many.
Associations are defined using ActiveRecord macros in the model files.
For example, a User model may have many posts, so the User model would have a has_many :posts asso...read more
Q2. System Design for the Scenario
Design a system for handling user authentication and authorization in a web application.
Use OAuth for authentication to allow users to log in using their existing accounts from providers like Google, Facebook, etc.
Implement role-based access control (RBAC) for authorization to define different levels of access for different users.
Store user credentials securely using hashing algorithms like bcrypt.
Use JSON Web Tokens (JWT) for session management to securely transmit informati...read more
Q3. List down ES6 features
ES6 features include arrow functions, classes, template literals, destructuring, and more.
Arrow functions provide a more concise syntax for writing functions.
Classes allow for easier creation of object-oriented code.
Template literals enable easier string interpolation and multiline strings.
Destructuring simplifies extracting values from arrays and objects.
Let and const provide block-scoped variables.
Q4. Unit testing using jest
Jest is a popular JavaScript testing framework for unit testing
Jest is commonly used for testing JavaScript code, including React applications
It provides a simple and easy-to-use API for writing tests
Jest can be used to test functions, components, and modules
It includes features like mocking, snapshot testing, and code coverage reports
Q5. What is deadlocking in SQL
Deadlocking in SQL occurs when two or more transactions are waiting for each other to release locks, causing them to be stuck indefinitely.
Deadlocking happens when two transactions each have a lock on a resource that the other transaction needs.
It can lead to a situation where neither transaction can proceed, causing a deadlock.
Deadlocks can be resolved by setting appropriate isolation levels, using timeouts, or redesigning the application logic.
Q6. What is fact and dimension
Facts are measurable data points while dimensions provide context to the facts in a data model.
Facts are quantitative data that can be measured or counted.
Dimensions provide context to the facts and are descriptive attributes that help categorize or filter the data.
For example, in a sales data model, the fact could be total revenue while dimensions could include product category, region, and time period.
Interview Process at OneCert Asia Agri Certification
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month