AI-Mock-Interviewer/PDF_Extracted_Data huggingface dataset:
Question: what is a transaction?
Question: what are the differences between oltp and olap?
Answer: OLTP stands fo r Online Transactional Processing OLAP stands for Online Analytical Processing OLTP: Normalization Level: highly normalized Data Usage : Current Data (Database) Processing : fast for delta operations (DML) Operation : Delta operation (update, insert, de lete) aka DML Terms Used : table, columns and relationships OLAP: Normalization Level: highly denormalized Data Usage : historical Data (Data warehouse) Processing : fast for read operations Operation : read operation (select) Terms Used : dimension ta ble, fact table
Question: how do you copy just the structure of a table?
Question: what are the different types of joins?
Question: what are the different types of restricted joins?
Question: what is a subquery?
Question: what are the set operators?
Question: what is a derived table?
Question: what is a view?
Question: follow me https www you tubecomcsauravagarwal18 what are the types of views?
Question: what is an indexed view?
Question: what does with check do?
Question: what is a ranking function and what are the four ranking functions?
Question: what is partition by?
Question: what is temporary table and what are the two types of it they are tables just like
Question: explain variables?
Answer:  Variable is a memory space (place holder) that contains a scalar value EXCEPT table variables, which is 2D data.  Variable in SQL Server are created using DECLARE Statement.  Variables are BATCH -BOUND.  Variables that start with @ are user -defined va riables.
Question: explain dynamics qld sql?
Question: what is sql injection attack?
Question: what is self join?
Question: what is correlated subquery?
Question: what is the difference between regular subquery and correlated subquery?
Answer:  Based on the above explanation, an inner subquery is independent from its outer subquery in Regular Subquery. On the other hand, an inner subqu ery depends on its outer subquery in Correlated Subquery.
Question: what are the differences between delete and truncate?
Answer: Delete: Follow  Me : https://www.yo utube.com/c/SauravAgarwa l DML statement that deletes rows from a table and can also specify rows using a WHERE clause. Logs every row deleted in the log fi le. Slower since DELETE records every row that is deleted. DELETE continues using the earlier max value of the identity column. Can have triggers on DELETE. Truncate: DDL statement that wipes out the entire table and you cannot delete specific rows. Does m inimal logging, minimal as not logging everything. TRUNCATE will remove the pointers that point to their pages, which are deallocated. Faster since TRUNCATE does not record into the log file. TRUNCATE resets the identity column. Cannot have triggers on TRU NCATE.
Question: what are the three different types of control flow statements?
Question: what is table variable explain its advantages and disadvantages?
Question: follow me https www you tubecomcsauravagarwal33 what are the differences between temporary table and table variable?
Question: what is stored procedures ?
Question: what are the four types of sp?
Answer: System Stored Procedures (SP_****): built -in stored procedures that were created by Microsoft. User Defined Stored Procedures: stored procedures that are created by users. Common naming convention (usp_****) CLR (Common Language Runtime): stored procedures that are impl emented as public static methods on a class in a Microsoft .NET Framework assembly. Extended Stored Procedures (XP_****): stored procedures that can be used in other platforms such as Java or C++.
Question: explain the types of sp. 
Answer:  SP with a single input parameter:  SP with multiple parameters:  SP with output parameters: Extracting data from a stored procedure based on an input parameter and outputting them using output variables.  SP with RETURN statement (the return value is always single and integer value)
Question: what are the characteristics of sp?
Question: what are the advantages of sp?
Answer:  Precompiled code hence faster.  They allow modular programming, which means it allows you to break down a big chunk of code into smaller pieces of codes. This way the code will be more readable and more easier to manage.  Reusability.  Can enhance security of your application. Users can be granted permission to execute SP without having to have direct permissions on the objects referenced in the procedure.  Can reduce network traffic. An operation of hundreds of lines of code can be performed through single statement that executes the code in procedure rather than by sending hundreds of lines of code over the network.  SPs are pre -compiled, which means it has to have an Execution Plan so every time it gets executed after creating a new Execution Plan, it will save up to 70% of execution time. Without it, the SPs are just like any regular TSQL statements.
Question: what is user defined functions udf?
Question: what is the difference between stored procedure and udf?
Question: what are the types of udf?
Question: what is the difference between a nested udf and recursive udf?
Answer:  Nested UDF: calling an UDF within an UDF  Recursive UDF: calling an UDF within itself
Question: what is a trigger?
Question: what are the types of triggers?
Question: what are inserted and deleted tables aka magic tables?
Question: what are some string functions to remember len string returns the length of string
Question: what are the three different types of error handling?
Question: explain about cursors?
Answer:  Cursors are a temporary database o bject which are used to loop through a table on row -by-row basis. There are five types of cursors:  1. Static: shows a static view of the data with only the changes done by session which opened the cursor.  2. Dynamic: shows data in its current state as the cursor moves from record -to-record.  3. Forward Only: move only record -by-record  4. Scrolling: moves anywhere.  5. Read Only: prevents data manipulation to cursor data set.
Question: what is the difference between tables can and seek?
Answer:  Scan: going through from the first page to the last page of an offset by offset or row by row.  Seek: going to the specific node and fetching the information needed.  Seek is the fastest way to  find and fetch the data. So if you see your Execution Plan and if all of them is a seek, that means its optimized.
Question: why are the dml operations are slower on indexes?
Question: what is a heap table on a heap?
Question: what is the architecture in terms of a hard disk extents and pages?
Answer:  A hard disk is divided into Extents.  Every extent has eight pages.  Every page is 8KBs ( 8060 bytes).
Question: what are the nine different types of indexes?
Question: what is a clustering key?
Question: explain about a clustered index?
Question: what happens when clustered index is created?
Question: what are the four different types of searching information in a table?
Question: what is fragmentation?
Question: what are the two types of fragmentation?
Question: what are statistics?
Answer:  Statistics allow the Query Optimizer to choose the optimal path in getting the data from the underlying table.  Statistics are histograms of max 200 sampled values from col umns separated by intervals.  Every statistic holds the following info:  1. The number of rows and pages occupied by a tables data  2. The time that statistics was last updated  3. The average length of keys in a column  4. Histogram showing the dis tribution of data in column
Question: what are some optimization techniques in sql?
Question: how do you present the following tree in a form of a table?
Question: how do you reverse a string without using reverse string?
Question: what is deadlock?
Answer:  Deadlock is a situation where, say there are two transactions, the two transactions are waiting for each other to releas e their locks.  The SQL automatically picks which transaction should be killed, which becomes a deadlock victim, and roll back the change for it and throws an error message for it.
Question: what is a fact table?
Answer: The primary table in a dimensional model where the numerical performance measurements (or facts) of the business are stored so they can be summarized to provide information about the history of the operation of an organization. We use the term fact to r epresent a business measure. The level of granularity defines the grain of the fact table.
Question: what is a dimension table?
Answer: Dimension tables are highly denormalized tables that contain the textual descriptions of the business and facts in their fact table. Since it is not uncommon for a dimension table to have 50 to 100 attributes and dimension tables tend to be relatively shallow in terms of the number of rows, they are also called a wide table. A dimension table has to have a surrogate key as its primary k ey and has to have a business/alternate key to link between the OLTP and OLAP.
Question: what are the types of measures?
Answer:  Additive: measures that can be added across all dimensions (cost, sales).  Semi -Additive: measures that can be added across few dimensions  and not with others.  Non -Additive: measures that cannot be added across all dimensions (stock rates).
Question: what is a star schema?
Question: what is a snowflake schema?
Question: what is granularity?
Answer:  The lowest level of information that is stored in the fact table.  Usually determined by the time dimension table.  The best granularity level would be per transaction but it would require a lot of memory.
Question: what are some advantages of using the surrogate key in a data warehouse?
Question: what is the data type difference between a fact and dimension tables?
Answer:  1. Fact Tables They hold numeric data. They contain measures. They are deep.  2. Dimensional Tables They hold textual data. They contain attributes of their fact tables. They a re wide.
Question: what are the types of dimension tables?
Question: what is your strategy for the incremental load?
Question: what is cdc?
Question: what is the difference between a connection and session?
Question: what are all different types of collation sensitivity?
Answer: Following are different types of collation sensitivity - Case Sensitivity - A and a and B and b. Accent Sensitivity. Kana Sensitivity - Japanese Kana characters. Width Sensitivity - Single byte character and double byte character.
Question: what is clause?
Question: what is union minus and interact commands?
Question: how to fetch common records from two tables?
Question: how to fetch alternate records from a table?
Question: how to select unique records from a table?
Question: how to remove duplicate rows from table?
Question: what is rowid and rownum in sql?
Question: how to find count of duplicate rows?
Answer: Select rollno, count (rollno) from Student Group by rollno Having count (rollno)>1 Order by count (rollno) desc;
Question: how to find third highest salary in employee table using self join?
Answer: Select * from Employee a Where 3 = (Select Count (distinct Salary) from Employee where a.salary<=b.salary;
Question: how to display following using query?
Question: how to display date in dd mon yyyy table?
Question: the count of that comma separated values?
Answer: Student Name Marks Dinesh 30,130,20,4 Kumar 100,20,30 Follow  Me : https://www.yo utube.com/c/SauravAgarwa l Sonali 140,10 Select Student_na me, regexp_count (marks,,) + As Marks Count from Student;
Question: what is query to fetch last day of previous month in oracle?
Answer: Select LAST_DAY (ADD_MONTHS (SYSDATE, -1)) from dual;
Question: how to display the string vertically in oracle?
Question: how to display department wise and month wise maximum salary?
Answer: Select Department_no, TO_CHAR (Hire_date,Mon) as Month from Employee group by Department_no, TO_CHAR (Hire_date,mon);
Question: how to calculate number of rows in table without using count function?
Question: explain execution plan?
Question: what is scala?
Answer: Scala is a general -purpose programming language providing support for both functional and Object - Oriented programming.
Question: what is tail recursion in scala?
Answer: There are several situations where programmers have to write functions that are recursive in nature. The main problem with recursive functions is that, it may eat up all the allocated stack space. To overcome this situation, Scala compiler provides a mecha nism tail recursion to optimize these Follow  Me : https://www.yo utube.com/c/SauravAgarwa l recursive functions so that it does not create new stack space, instead uses the current function stack space. To qualify for this, annotation @annotation.tailrec has to be used before defining the function and rec ursive call has to be the last statement, then only the function will compile otherwise, it will give an error.
Question: what are traits in scala?
Answer: Traits are used to define object types specified by the signature of the supported methods.  Scala allows to b e partially implemented but traits may not have constructor parameters.  A trait consists of method and field definition, by mixing them into classes it can be reused.
Question: who is the father of scala programming language?
Answer: Martin Oderskey, a German computer scientist, is the father of Scala programming language.
Question: what are case classes in scala?
Answer: Case classes are standard classes declared with a special modifier case. Case classes export their constructor parameters and provide a recursive decomposition  mec hanism  through  pattern matching.  The constructor parameters of case classes are treated as public values and can be accessed directly. For a case class, companion objects and its associated method also get generated automatically. All the methods in t he class, as well, methods in the companion objects are generated based on the parameter list. The only advantage of Case class is that it automatically generates the methods from the parameter list.
Question: what is the superclass of all classes in scala?
Question: what is a scala set what are methods through which operation sets are expressed?
Answer: Scala set is a collection of pairwise elements of the same type.  Scala set does not contain any duplicate elements.  There are two kinds of sets, mutable and immutable.
Question: follow me https www you tubecomcsauravagarwal8 what is a scala map?
Answer: Scala Map is a collection of key value pairs wherein the value in a map can be retrieved using the key. Values in a Scala Map are not unique, but the keys are unique. Scala supports two kinds of maps - mutable and immutable. By default, Scala suppo rts immutable map and to make use of the mutable map,  programmers  must  import  the  scala.collection.mutable.Map  class explicitly. When programmers want to use mutable and immutable map together in the same program then the mutable map can be accessed as mutable.map and the immutable map can just be accessed with the name of the map. 9. Name two significant differences between a trait and an abstract class. Abstract classes have constructors with zero or more parameters while traits do not; a class can extend any number of traits but only one abstract class.
Question: what is the use of tuples in scala?
Answer: Scala tuples combine a fixed number of items together so that they can be passed around as whole. A tuple is immutable and can hold objects with dif ferent types, unlike an array or list.
Question: what do you understand by a closure in scala?
Answer: A closure is also known as an anonymous function whose return value depends upon the value of the variables declared outside the function.
Question: what do you understand by implicit parameter?
Answer: Wherever, we require that function could be invoked without passing all the parameters, we use implicit parameter. We provide the default values for all the parameters or parameters which we want to be used as implicit. When the fun ction is invoked without passing the implicit parameters, local value of that parameter is used. We need to use implicit keyword to make a value, function parameter or variable as implicit.
Question: what is the companion object in scala?
Question: what are the advantages of scala language?
Question: what are the major drawbacks of scala language?
Answer: Drawbacks of Scala Language: - Follow  Me : https://www.yo utube.com/c/SauravAgarwa l -        Less Readable Code -        Bit tou gh to Understand the Code for beginners -        Complex Syntax to learn -        Less Backward Compatibility
Question: what is akka play and sleek in scala?
Question: what is unit and in scala?
Answer: The 'Unit' is a type like void in Java. You can say it is a Scala equivalent of the void in Java, while still providing the language with an abstraction over the Java platform. The empty tuple '()' is a term representing a Unit value in Scala.
Question: what is the difference between a normal class and a case class in scala?
Answer: Following are some key differences between a case class and a normal class in Scala: - case class allows pattern matching on it. - you can create instances of case class without using the new keyword - equals(), hashcode() and toString() method are automatically generated for case classes in Scala -  Scala  automatically  generate  accessor  methods  for  all  constructor argument
Question: what are high order functions in scala?
Answer: Follow  Me : https://www.yo utube.com/c/SauravAgarwa l High  order  functions  are  functions  that  can  receive  or  return  othe r functions. Common examples in Scala are the filter, map,  and flatMap functions, which receive other functions as arguments.
Question: which scala library is used for functional programming?
Question: what is the best scala style checker tool available for play and scala based applications?
Question: what is the difference between concurrency and parallelism?
Answer: When several computations execute sequentially during overlapping time periods  it  is  referred  to as  concurrency  whereas  when  processes  are executed simultaneously it is known as parallelism. Parallel collection, Futures and A sync library are examples of achieving parallelism in Scala.
Question: what is the difference between a java method and a scala function?
Question: what is the difference between function and method in scala?
Question: what is extractor in scala?
Question: is scala a pure oop language?
Answer: Yes, Scala is a Pure Object -Oriented Programming Language because in Scala, everything is an Object, and everything is a value. Functions are values and values are Objects. Scala does not have primitive data types and does not have static members.
Question: is java a pure oop language?
Answer: Java is not a Pure Object -Oriented Programming (OOP) Language because it supports the following two Non -OOP concepts:  Java supports primitive data types. They are not objects.Java supports Static members. They are not related to objects.
Question: does scala support operator overloading scala supports operator overloading
Question: does java support operator overloading?
Answer: Java does not support Operator Overloading.
Question: follow me https www you tubecomcsauravagarwal30 what are the default imports in scala language?
Question: what is an expression?
Question: what is a statement difference between expression and statement?
Question: what is the difference between java s ifelse and scal as if else?
Question: how to compile and run a scala program?
Answer: You can  use Scala compiler scalac to compile Scala program (like javac) and scala command to run them (like scala)
Question: how to tell scala to look into a class file for some java class?
Answer: We can use -classpath argument to include a JAR in Scala's classpath, as shown b elow $ scala -classpath jar Alternatively, you can also use CLASSPATH environment variable.
Question: what is the difference between a call by value and call by name parameter?
Answer: The main difference between a call -by-value and a call -by-name parameter is that the former is computed before calling the function, and the latter is evaluated when accessed.
Question: what exactly is wrong with a recursive function that is not tail recursive?
Answer: Follow  Me : https://www.yo utube.com/c/SauravAgarwa l Answer: You run the risk of running out of stack space and thus throwing an exce ption.
Question: what is the difference between var and value?
Question: what is scala anonymous function?
Question: what is function currying in scala?
Question: what do you understand by unit and in scala?
Answer: Unit is a subtype of scala.anyval and is nothing but Scala equivalent of Java void that provides the Scala with an abstraction of the java platform. Empty tuple i.e. () in Scala is a term that repres ents unit value.
Question: whats the difference nil null none and nothing in scala?
Question: what is lazy evaluation?
Answer: Lazy Evaluation means evaluating program at run -time on -demand that means when clients access the program then only its evaluated. The difference between val and lazy val is that val is used to define variables which are evaluated eagerly and lazy val i s also used to define variables but they are evaluated lazily.
Question: what is call by name?
Question: does scala and java support call by name?
Answer: Scala supports both call -by-value and call -by-name function parameters. However, Java supports only call-by-value, but not call -by-name.
Question: what is the difference between call by value and call by name function parameters?
Question: what do you understand by apply and un apply methods in scala?
Question: what is an anonymous function in scala?
Question: what are the advantages of anonymous function function literal in scala?
Answer: The advantages of Anonymous Functio n/Function Literal in Scala: We can assign a Function Literal to variable We can pass a Function Literal to another function/method We can return a Function Literal as another function/method result/return value.
Question: follow me https www you tubecomcsauravagarwal50 what is the difference between un apply and apply when would you use them?
Question: what is the difference between a trait and an abstract class in scala?
Question: scala?
Answer: According to the private access specifier, private members can be accessed only within that class, but Scalas companion object and class provide special access to private members. A companion object can access all the private members of a companion class. Similarly, a companion class can access all the private members of companion objects.
Question: what are scala variables?
Question: mention the difference between an object and a class?
Question: what is the difference between val and var in scala?
Question: what is the difference between array and list in scala?
Question: what is type inference in scala?
Question: what is eager evaluation?
Answer: Follow  Me : https://www.yo utube.com/c/SauravAgarwa l Eager Evaluation means evaluating program at compile -time or program deployment -time irrespective of clients are using that program or not.
Question: what is guard in scal as for comprehension construct?
Question: why scala prefers immutability scala prefers immutability in design and in many cases uses it as