QA Test
JSON
- Do JSON support all the platforms?
- Answer:JSON almost supports all the platforms and programming languages because of its text format and most of the technologies mainly work with data transmission between the systems that support JSON format. There are many languages like PHP, Java, javascript etc.
- How JSON has been built?
- Answer:This is the basic JSON Interview Questions asked in an interview. JSON is built on two structures that are the collection of name/value pairs and ordered list of values. These are the universal data structures like object, array, string, number, and value.
- What developers preferred to use JSON over XML?
- JSON is faster and lighter than XML.
- JSON has typed objects whereas in XML objects are typically less.
- In JSON, there are different object types like integer, string, array etc. whereas in XML there is only one object type that is String only.
- JSON data can be easily available or accessible as JSON object using in JavaScript but in XML data needs to be parsed and allocated to variables using APIs.
- In JSON, retrieving the values is as simple as reading it from the property of the object from the javascript code.
- What are the limitations and uses of JSON?
- Answer:It has its own limitations:It is not suitable for handling very large and complex data. When the data gets complex with several nested and hierarchical structures, it becomes complex for human readability. JSON does not support the comments. It does not support to handle the multimedia formats like image or rich text format.
- Explain Newtonsoft in JSON?
- Answer:Newtonsoft is referred to as the framework which is mainly used in the .net framework for performing the operations with JSON. It is also called as Json.net. There are a lot of features using Newtonsoft like it enables the user to parse, create, modify and query the JSON using its internal framework. It is simple and easy to use. It enables the user to serialize and de serialize any object with JSON serializer. It is faster than other serializers. It supports the conversion from XML to JSON and vice versa. Its syntax is simple and provides an easier way to query the JSON. It is a free and open source. To convert the data into JSON structure, a creation of an object is required to store data and once the object has been created then we can store the variables and keys in an object. After storing data in the object then we can serialize that data that is how serialization is done and de-serialization is reverse of it.
SQL
- What is SQL?
- SQL stands for Structured Query Language , and it is used to communicate with the Database. This is a standard language used to perform tasks such as retrieval, updation, insertion and deletion of data from a database.
- What is a primary key?
- A primary key is a combination of fields which uniquely specify a row. This is a special kind of unique key, and it has implicit NOT NULL constraint. It means, Primary key values cannot be NULL.
- What is a foreign key?
- A foreign key is one table which can be related to the primary key of another table. Relationship needs to be created between two tables by referencing foreign key with the primary key of another table.
- What is a join?
- This is a keyword used to query data from more tables based on the relationship between the fields of the tables. Keys play a major role when JOINs are used.
- Types of joins
- Inner Join.Inner join return rows when there is at least one match of rows between the tables.
- Right Join.Right join return rows which are common between the tables and all rows of Right hand side table. Simply, it returns all the rows from the right hand side table even though there are no matches in the left hand side table.
- Left Join.Left join return rows which are common between the tables and all rows of Left hand side table. Simply, it returns all the rows from Left hand side table even though there are no matches in the Right hand side table.
- Full Join.Full join return rows when there are matching rows in any one of the tables. This means, it returns all the rows from the left hand side table and all the rows from the right hand side table.
- What is a View?
- A view is a virtual table which consists of a subset of data contained in a table. Views are not virtually present, and it takes less space to store. View can have data of one or more tables combined, and it is depending on the relationship.
- What is an Index?
- An index is performance tuning method of allowing faster retrieval of records from the table. An index creates an entry for each value and it will be faster to retrieve data.
- select T.* from (select P.ID, P.HOST_ID from table1 Pgroup by P.HOST_ID order by ID) T
- The ORDER BY clause is invalid in views, inline functions, derived tables, sub-queries, and common table expressions, unless TOP or FOR XML is also specified.
GIT
- What is Git fork? What is difference between fork, branch and clone?
- A fork is a remote, server-side copy of a repository, distinct from the original. A fork isn't a Git concept really, it's more a political/social idea.
- A clone is not a fork; a clone is a local copy of some remote repository. When you clone, you are actually copying the entire source repository, including all the history and branches.
- A branch is a mechanism to handle the changes within a single repository in order to eventually merge them with the rest of code. A branch is something that is within a repository. Conceptually, it represents a thread of development.
- What's the difference between a "pull request" and a "branch"?
- A branch is just a separate version of the code.
- A pull request is when someone take the repository, makes their own branch, does some changes, then tries to merge that branch in (put their changes in the other person's code repository).
- What is the difference between "git pull" and "git fetch"?
- In the simplest terms, git pull does a git fetch followed by a git merge.
- When you use pull, Git tries to automatically do your work for you. It is context sensitive, so Git will merge any pulled commits into the branch you are currently working in. pull automatically merges the commits without letting you review them first. If you don’t closely manage your branches, you may run into frequent conflicts.
- When you fetch, Git gathers any commits from the target branch that do not exist in your current branch and stores them in your local repository. However, it does not merge them with your current branch. This is particularly useful if you need to keep your repository up to date, but are working on something that might break if you update your files. To integrate the commits into your master branch, you use merge.
- What is "git cherry-pick"?
- The command git cherry-pick is typically used to introduce particular commits from one branch within a repository onto a different branch. A common use is to forward- or back-port commits from a maintenance branch to a development branch.
- This is in contrast with other ways such as merge and rebase which normally apply many commits onto another branch.