Accenture Interview Questions | What is parser?
Question
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
It will take less than 1 minute to register for lifetime. Bonus Tip - We don't send OTP to your email id Make Sure to use your own email id for free books and giveaways
Answers ( 2 )
A sql query is comprised of many tables, expressions, different types of joins etc.
So, there are numerous ways in which a sql query can be executed and determining the
optimal way to perform the above task is the job of the parser.
The parsing of a query is performed within the database using the Optimizer component.
The Optimizer evaluates many different attributes of the given query i.e. number of tables involved,
whether we have indexes available or not, what kind of expressions are involved, etc.
Taking all of these inputs into consideration, the Optimizer decides the best possible way to execute the query.
For more details about parsing, read this article
https://www.red-gate.com/simple-talk/sql/oracle/understanding-sql-query-parsing-part-1/
A parser is a software component that takes input data (frequently text) and builds a data structure – often some kind of parse tree, abstract syntax tree or other hierarchical structure, giving a structural representation of the input while checking for correct syntax.