Showing posts with label asked. Show all posts
Showing posts with label asked. Show all posts

May 11, 2022

Top 20 Apache Pig Interview Questions and Answers

 

            Pig is an Apache open-source project that runs on Hadoop and provides a parallel data flow engine. It contains the pig Latin language, which is used to express data flow. It includes actions such as sorting, joining, filtering, and scripting UDF (User Defined Functions) for reading, writing, and processing. Pig stores and processes the entire task using Map Reduce and HDFS.


Apache Kafka Interview Questions and Answers


Ques. 1): What benefits does Pig have over MapReduce?

Answer:

The development cycle for MapReduce is extremely long. It takes a long time to write mappers and reducers, compile and package the code, submit tasks, and retrieve the results. Dataset joins are quite complex to perform. Low level and stiff, resulting in a large amount of specialised user code that is difficult to maintain and reuse is difficult.

Pig does not require the compilation or packaging of code. Pig operators will be turned into maps or jobs will be reduced internally. Pig Latin supports all common data-processing procedures, as well as high-level abstraction for processing big data sets.


Apache Struts 2 Interview Questions and Answers


Ques. 2): Is Piglatin a Typographically Strong Language? If so, how did you arrive at your conclusion?

Answer:

In a strongly typed language, the type of all variables must be declared up front. When you explain the schema of the data in Apache Pig, it expects the data to be in the same format.

When the schema is unknown, however, the script will adjust to the actual data types at runtime. PigLatin can thus be described as firmly typed in most circumstances but gently typed in others, i.e. it continues to work with data that does not meet its expectations.


Apache Spark Interview Questions and Answers


Ques. 3): What are Pig's disadvantages?

Answer:

Pig has a number of flaws, including:

Pig isn't the best choice for real-time applications.

When you need to get a single record from a large dataset, Pig isn't very useful.

It works in batches since it uses MapReduce.


Apache Hive Interview Questions and Answers


Ques. 4): What is Pig Storage, exactly?

Answer:

Pig comes with a default load function called Pig Storage. Additionally, we may use pig storage to import data from a file system into the pig.

While loading data into pig storage, we may also provide the data delimiter (how the fields in the record are separated). We can also provide the data's schema as well as the data's type.


Apache Tomcat Interview Questions and Answers


Ques. 5): Explain Grunt in Pig and its characteristics.

Answer:

The Grunt takes on the role of an Interactive Shell Pig. Grunt's main characteristics are:

To move the cursor to the end of a line, press the ctrl-e key combination.

As a Grunt retains command history, the lines in the history buffer can be recalled using the up and down cursor keys.

Grunt supports the auto-completion method by attempting to finish Pig Latin keywords and functions when the Tab key is hit.


Apache Drill Interview Questions and Answers


Ques. 6): What Does Pig Flatten Mean?

Answer:

When there is data in a tuple or a bag, we may use the Flatten modifier in Pig to remove the level of nesting from that data. Un-nests bags and tuples should be flattened. The Flatten operation for tuples will substitute the fields of a tuple for a tuple, however un-nesting bags is a little more complicated because it necessitates the creation of new tuples.


Apache Ambari interview Questions and Answers


Ques. 7): Can you distinguish between logical and physical plans?

Answer:

Pig goes through a few processes while converting a Pig Latin Script into MapReduce jobs. Pig generates a logical plan after performing basic parsing and semantic testing. Pig's logical plan, which is executed during execution, describes the logical operators. Pig then generates a physical plan. The physical plan specifies the physical operators required to execute the script.


Apache Tapestry Interview Questions and Answers


Ques. 8): In Pig, what does a co-group do?

Answer:

Co-group unites the data collection by grouping only one of the data sets. It then groups the elements by their common field and provides a set of records with two distinct bags. The records of the first data set with the common data set are in the first bag, and the records of the second data set with the same data set are in the second bag.


Apache Ant Interview Questions and Answers


Ques. 9): Explain the bag.

Answer:

Pig includes several data models, including a bag. The bag is an unorganised collection of tuples with possibly duplicates that is used to store collections while they are being grouped. The size of the bag is equal to the size of the local disc, implying that the bag's size is limited. When the bag is full, Pig will empty it onto the local disc and only maintain a portion of it in memory. It is not necessary for the entire bag to fit into memory. With ", we signify bags.


Apache Camel Interview Questions and Answers


Ques. 10): Can you describe the similarities and differences between Pig and Hive?

Answer:

Both Hive and Pig have similar characteristics.

Both internally transform the commands to MapReduce.

High-level abstractions are provided by both technologies.

Low-latency queries are not supported by either.

OLAP and OLTP are not supported by either.


Apache Cassandra Interview Questions and Answers


Ques. 11): How do Apache Pig and SQL compare?

Answer:

The use of Apache Pig for ETL, lazy evaluation, storing data at any stage in the pipeline, support for pipeline splits, and explicit specification of execution plans set it apart from SQL. SQL is built around queries that return only one result. SQL doesn't have a built-in mechanism for separating a data processing stream into sub-streams and applying various operators to each one.

User code can be added at any step in the pipeline with Apache Pig, whereas with SQL, data must first be put into the database before the cleaning and transformation process can begin.


Apache NiFi Interview Questions and Answers


Ques. 12): Can Apache Pig Scripts Join Multiple Fields?

Answer:

Yes, several fields can be joined in PIG scripts since join procedures take records from one input and combine them with records from another. This is accomplished by specifying the keys for each input and joining the two rows when the keys are equal.


Apache Storm Interview Questions and Answers


Ques. 13): What is the difference between the commands store and dumps?

Answer:

After running the dump command, the data appears on the console, but it is not saved. Whereas the output is executed in a folder and the store is stored in the local file system or HDFS. Most hadoop developers utilised the'store' command to store data in HDFS in a protected environment.


Apache Flume Interview Questions and Answers


Ques. 14):  Is 'FUNCTIONAL' a User Defined Function (UDF)?

Answer:

No, the keyword 'FUNCTIONAL' does not represent a User Defined Function (UDF). Some functions must be overridden while using UDF. You must certainly complete your tasks using only these functions. However, because the keyword 'FUNCTIONAL' is a built-in function (a pre-defined function), it cannot be used as a UDF.

 

Ques. 15): Which method must be overridden when writing evaluate UDF?

Answer:

When developing UDF in Pig, we must override the method exec(). While the base class may change, when developing filter UDF, we must extend FilterFunc, and when writing evaluate UDF, we must extend EvalFunc. EvaluFunc is parameterized, and the return type must be specified as well.

 

Ques. 16): What role does MapReduce play in Pig programming?

Answer:

Pig is a high-level framework that simplifies the execution of various Hadoop data analysis problems. A Pig Latin programme is similar to a SQL query that is executed using an execution engine. The Pig engine can convert programmes into MapReduce jobs, with MapReduce serving as the execution engine.

 

Ques. 17): What Debugging Tools Are Available For Apache Pig Scripts?

Answer:

The essential debugging utilities in Apache Pig are describe and explain.

When trying to troubleshoot or optimise PigLatin scripts, Hadoop developers will find the explain function useful. In the grunt interactive shell, explain can be applied to a specific alias in the script or to the entire script. The explain programme generates multiple text-based graphs that can be printed to a file.

When building Pig scripts, the describe debugging utility is useful since it displays the schema of a relation in the script. Beginners learning Apache Pig can use the describe utility to see how each operator alters data. A pig script can have multiple describes.

 

Ques. 18): What are the relation operations in Pig? Explain any two with examples.

Answer:

The relational operations in Pig:

foreach, order by, filters, group, distinct, join, limit.foreach: It takes a set of expressions and applies them to all records in the data pipeline to the next operator.A =LOAD ‘input’ as (emp_name :charrarray, emp_id : long, emp_add : chararray, phone : chararray, preferences : map [] );B = foreach A generate emp_name, emp_id;Filters: It contains a predicate and it allows us to select which records will be retained in our data pipeline.

Syntax: alias = FILTER alias BY expression;

Alias indicates the name of the relation, By indicates required keyword and the expression has Boolean.

Example: M = FILTER N BY F5 == 50;

 

Ques. 19): What are some Apache Pig use cases that come to mind?

Answer:

The Apache Pig large data tools are used for iterative processing, raw data exploration, and standard ETL data pipelines. Pig is commonly used by researchers who want to use the data before it is cleansed and placed into the data warehouse because it can operate in situations where the schema is unknown, inconsistent, or incomplete.

It can be used by a website to track the response of users to various sorts of adverts, photos, articles, and so on in order to construct behaviour prediction models.

 

Ques. 20): In Apache Pig, what is the purpose of illustrating?

Answer:

Illustrate is used to run Pig scripts on large datasets, which might take a long time. That is why developers run pig scripts on sample data, even though it is probable that the sample data selected will not execute the script correctly. If the script includes a join operator, for example, there must be a small number of records in the sample data with the same key, or the join operation will fail. Developers manage these issues by using the function illustrate, which takes data from the sample and ensures that some records pass through while others are restricted by modifying records in such a way that they follow the condition set whenever it encounters operators like the filter or join, which remove data. Illustrate displays each step's output but does not run MapReduce operations.

 

 

 

Top 20 C# Language Interview Questions and Answers

  

        Microsoft's C# is an object-oriented programming language. The.NET framework uses C# to create websites, applications, and games. C# is popular for a variety of reasons. C# is described as being easier to learn than other programming languages. You're more likely to construct online applications or gaming apps with C#. Automatic garbage collection, interfaces, and other features in C# enable developers create better apps.

Collaboration with Microsoft gives C# applications an advantage since they can reach a broader audience. Because C# is such a popular programming language, many large and small businesses utilise it to build their products. So, to ace the interviews, prepare yourself with basic and advanced level C# questions.


BlockChain interview Questions and Answers


Ques. 1): Is it possible to run several catch blocks?

Answer:

No, you cannot execute multiple catch blocks of the same type. Control is handed to the finally block after the correct catch code has been completed, and then the code that follows the finally block is executed.


C language Interview Questions and Answers


Ques. 2): What exactly are the distinctions between public, static, and void?

Answer:

Anywhere in the application, public stated variables or methods are accessible. Without generating an instance of the class, static declared variables or methods are globally available. The type of access modification used determines whether or not static members are globally available by default. The method's address is saved as the entry point, and the compiler utilises this information to start execution before any objects are generated. And Void is a type modifier that indicates that the method or variable returns nothing.


C++ language Interview Questions and Answers


Ques. 3): In C#, what is garbage collection?

Answer:

Garbage collection is the process of releasing memory held by undesirable things. When you create a class object, some heap memory space is automatically allocated to the object. After you've completed all of the activities on the item, the memory space it takes up becomes wasted. Memory must be made available. Garbage collection occurs in three situations:

  • If the occupied memory by the objects exceeds the pre-set threshold value.
  • If the garbage collection method is called
  • If your system has low physical memory


Machine Learning Interview Questions and Answers


Ques. 4): Define Constructors in  C#.

Answer:

A function Object() { [native code] } is a member function that has the same name as the class it belongs to. When an object class is created, the function Object() { [native code] } is called automatically. While initialising the class, it constructs the values of data members.


MySQL Interview Questions and Answers


Ques. 5): What exactly are Jagged Arrays?

Answer:

The array with array elements is known as a jagged array. The elements can be of various shapes and sizes. An Array of arrays is another name for jagged Array.


PHP Interview Questions and Answers


Ques. 6): What is the difference between Custom Control and User Control?

Answer:

Custom Controls are compiled code (Dll) controls that are easier to use and may be added to the toolbox. Developers can add controls to their web forms by dragging and dropping them. At design time, attributes can be used. Custom controls can be simply added to multiple applications (If Shared Dlls). If they are private, we can copy the dll to the web application's bin directory, add a reference, and use them.

User Controls are comparable to ASP include files in that they are simple to construct. It is not possible to drag and drop user controls into the toolbox. They have their own code and design. Ascx is the file extension for user controls.


PowerShell Interview Questions and Answers


Ques. 7): What’s the difference between the Array.CopyTo() and Array.Clone()?

Answer:

The Clone() method copies an array shallowly. A shallow copy of an Array duplicates only the elements of the Array, regardless of whether they are reference or value types, but not the objects to which the references link. The references in the new Array point to the same objects as the previous Array's references.

The Array class's CopyTo() static function copies a piece of one array to another array. The CopyTo method transfers all of an array's items to a new one-dimensional array. Listing 9 shows how to copy the contents of an integer array to an array of object types.


Python Interview Questions and Answers


Ques. 8): In C#, what are the different types  of classes?

Answer:

A class is a logical unit that contains all of the properties of its objects and instances. There are four sorts of such classes in C#:

Static type: The keyword'static' defines a class that does not allow inheritance. As a result, you won't be able to construct an object for a static class.

static class classname 

{ 

  //static data members 

  //static methods 

}

Partial class: Partially divided or shared source (.cs) files are possible with the partial class, which is defined by the term 'partial.'

Abstract class: Abstract classes are classes that cannot be instantiated and cannot be used to construct objects. Abstract classes are based on the OOPS abstraction idea. Abstraction aids in separating important details from those that aren't.

Sealed class: A sealed class is one that can't be inherited. To prevent users from inheriting that class, use the keyword sealed.


Python Pandas Interview Questions and Answers


Ques. 9): What is IEnumerable<> in C#?

Answer:

 IEnumerable is the parent interface for all non-generic collections in System.Collections namespace like ArrayList, HastTable etc. that can be enumerated. For the generic version of this interface as IEnumerable<T> which a parent interface of all generic collections class in System.Collections.Generic namespace like List<> and more.

 In System.Collections.Generic.IEnumerable<T> have only a single method which is GetEnumerator() that returns an IEnumerator. IEnumerator provides the power to iterate through the collection by exposing a Current property and Move Next and Reset methods if we don’t have this interface as a parent so we can’t use iteration by foreach loop or can’t use that class object in our LINQ query.


SQL Server Interview Questions and Answers


Ques. 10): In C#, what are extension methods? How may extension techniques be used?

Answer:

Extension methods allow you to add methods to existing types without having to create a new derived type, recompile it, or modify it in any way.

An extension method is a form of static method that is referred to as if it were an instance method on the extended type.

A static method of a static class with the "this" modifier appended to the first parameter is called an extension method. The extended type will be the type of the first parameter.

Extension methods are only in scope if you use a using directive to explicitly import the namespace into your source code.


Unix interview Questions and Answers


Ques. 11): What makes the System.String and System.Text.StringBuilder classes different?

Answer:

System.Strings are unchangeable. When we change the value of a string variable, the existing memory allocation is released and fresh memory is allocated to the new value. System. StringBuilder was created with the idea of a mutable string that can be used for a number of operations without requiring a separate memory address for the updated string.


Ques. 12): What are Generics in C#?

Answer:

In C# collections, defining any kind of object is termed okay which compromises C#’s basic rule of type-safety. Therefore, generics were included to type-safe the code by allowing re-use of the data processing algorithms. Generics in C# mean not linked to any specific data type. Generics reduce the load of using boxing, unboxing, and typecasting objects. Generics are always defined inside angular brackets <>. To create a generic class, this syntax is used:

GenericList<float> list1 = new GenericList<float>();

GenericList<Features> list2 = new GenericList<Features>();

GenericList<Struct> list3 = new GenericList<Struct>();

Here, GenericList<float> is a generic class. In each of these instances of GenericList<T>, every occurrence of T in the class is substituted at run time with the type argument. By substituting the T, we have created three different type-safe using the same class.

 

Ques. 13): In C#, how do you tell the difference between boxing and unboxing?

Answer:

Both boxing and unboxing are used to convert types, however they have some differences:

Boxing: Boxing is the conversion of a value type data type to an object or any interface data type that this value type implements. When the CLR converts a value type to an Object Type, it wraps the value in a System.Object and stores it in the application domain's heap region.

 

Unboxing: Unboxing is a technique for determining the value type of an object or any implemented interface type. Unboxing, on the other hand, must be done explicitly via code.

 The concept of boxing and unboxing underlies the C# unified view of the type system in which a value of any type can be treated as an object.

 

Ques. 14): What is the difference between a struct and a class in C#?

Answer:

Class and struct are both user-defined data types, but have some major differences:

Struct

  • The struct is a value type in C# and it inherits from System.Value Type.
  • Struct is usually used for smaller amounts of data.
  • Struct can’t be inherited from other types.
  • A structure can't be abstract.
  • No need to create an object with a new keyword.
  • Do not have permission to create any default constructor.

Class

  • The class is a reference type in C# and it inherits from the System.Object Type.
  • Classes are usually used for large amounts of data.
  • Classes can be inherited from other classes.
  • A class can be an abstract type.
  • We can create a default constructor.

 

Ques. 15): What is the difference between the dispose and finalize methods in C#?

Answer:

Both finalise and dispose are strategies for releasing unmanaged resources.

 Finalize: 

  • Finalize is used to liberate unmanaged resources in the application domain that are no longer in use, such as files and database connections.
  • These are the resources that an object has before it is destroyed. Garbage Collector calls it in the internal process, and no user code or service can call it manual.
  • Finalize belongs to System.Object class.
  • When your code contains unmanaged resources, use it to ensure that these resources are removed when garbage collection occurs.

Dispose: 

  • Dispose can also be used to liberate unmanaged resources in the Application domain, such as files and database connections, at any time.
  • Manual user code directly calls dispose.
  • We must implement the disposal method via the IDisposable interface if we want to use it.
  • It's a part of the IDisposable interface.
  • When building a custom class that will be used by other users, remember to include this.

 

Ques. 16): In C#, what is the difference between late and early binding?

Answer:

One of the key concepts of OOPS is polymorphism, which includes late binding and early binding.

For example, one function calculateBill() will calculate premium, basic, and semi-premium clients' bills differently depending on their plans. The calculations for all of the customer objects are done differently using the same polymorphism function.

The.NET framework conducts the binding when an object is allocated to an object variable in C#.

Early binding occurs when the binding function is performed at build time. It investigates and tests the static objects' methods and properties. The amount of run-time mistakes is significantly reduced with early binding, and it executes swiftly.

Late binding, on the other hand, occurs when the binding occurs at runtime. Late binding occurs when run-time objects are dynamic (determined by the data they contain). It's slower because it's looking through during the process.

 

Ques. 17): Is it possible to utilise "this" inside a static method?

Answer:

Because the keyword 'this' returns a reference to the current instance of the class containing it, we can't use it in a static method. Static methods (or any other static element) are not associated with a specific instance. We can't use this keyword in the body of static Methods since they exist without creating an instance of the class and are called with the name of the class, not by instance. In the case of Extension Methods, however, we can use the function's parameters.

Let's take a look at the keyword "this."

The "this" keyword in C# is a particular form of reference variable that is implicitly defined as the first parameter of the type class in which it is specified within each function Object() { [native code] } and non-static function.

 

Ques. 18): What are delegates in C# and how do you utilise them?

Answer:

A Delegate is an abstraction of one or more function pointers (as in C++; a detailed explanation is beyond the scope of this article). The concept of function pointers has been implemented in the form of delegates in.NET. You can use delegates to treat a function like data. Functions can be supplied as parameters, returned as a value, and saved in an array using delegates. The following are qualities of delegates:

  • Delegates are derived from the System.MulticastDelegate class.
  • They have a signature and a return type. A function that is added to delegates must be compatible with this signature.
  • Delegates can point to either static or instance methods.
  • Once a delegate object has been created, it may dynamically invoke the methods it points to at runtime.
  • Delegates can call methods synchronously and asynchronously.

There are a few useful fields in the delegate. The first has an object reference, whereas the second contains a method pointer. The instance method on the contained reference is called when you call the delegate. If the object reference is nil, however, the runtime interprets this to suggest that the method is static. Furthermore, calling a delegate is syntactically identical to calling a regular function. Delegates are thus ideal for implementing callbacks.

 

Ques. 19): In C#, describe accessibility modifiers. Why should you use access modifiers?

Answer:

Access modifiers are keywords that specify a member's or type's declared accessibility.

Access modifiers are keywords that describe the accessibility of a type member or the type itself. A public class, for example, is open to the entire world, whereas an internal class is only open to the assembly.

Object-oriented programming relies heavily on access modifiers. To implement OOP encapsulation, access modifiers are utilised. You can use access modifiers to control who has and doesn't have access to particular functionalities.

In C# there are 6 different types of Access Modifiers:

public:    There are no restrictions on accessing public members.

Private:    Access is limited to within the class definition. This is the default access modifier type if none is formally specified

protected:    Access is limited to within the class definition and any class that inherits from the class

internal:    Access is limited exclusively to classes defined within the current project assembly

protected internal:    Access is limited to the current assembly and types derived from the containing class. All members in the current project and all members in derived class can access the variables.

private protected:    Access is limited to the containing class or types derived from the containing class within the current assembly.

 

Ques. 20): In C#, how do you use the using statement?

Answer:

The using keyword in C# can be used in two ways. One is in the form of a mandate, while the other is in the form of a statement. Let me clarify!

using Directive:

In code-behind and class files, we usually utilise the using keyword to add namespaces. Then it makes all the classes, interfaces, and abstract classes on the current page, as well as their methods and properties, available.

Using Statement :

Another approach to utilise the using keyword in C# is as follows. It is critical to enhance garbage collection performance.



May 08, 2022

Top 20 Oracle 10g Interview Questions and Answers

 

             The Oracle Database 10g Standard Edition is designed for medium-sized businesses. Oracle's Real Application Cluster features are included to protect against hardware failures. It's simple to set up and configure, and it includes its own clustering software, storage management, and other self-managing features. Oracle Database 10g Standard Edition maintains all of your data and lets all of your business applications to benefit from Oracle Database's renowned performance, security, and reliability. It also has full upward compatibility with Oracle Database 10g Enterprise Edition, ensuring that your investment is protected as your needs change.


Oracle Fusion Applications interview Questions and Answers


Ques. 1): What are the components of an Oracle database's logical database structure?

Answer:

The following are the components of Oracle's logical database structure:

Tablespaces: Tablespaces are the logical storage units that make up a database. This tablespace is a collection of logical structures that are linked together. To be more specific, tablespace groupings are linked to logical structures.

Database Schema Objects: A schema is a set of database objects that belong to a single user. Tables, indexes, views, stored procedures, and other objects are among the objects. The user is the account in Oracle, and the schema is the object. It is also possible to have a schema without specifying a user in database platforms.


Oracle Accounts Payables Interview Questions and Answers


Ques. 2): What is the connection between the database, tablespace, and data file?

Answer:

An Oracle database has one or more tablespaces, which are logical storage units. Each tablespace in an Oracle database is made up of one or more datafiles. The complete data of databases is stored in these tablespaces. When we talk about datafiles, we're talking about the physical structure that tells the operating system which Oracle software is running.


Oracle ADF Interview Questions and Answers


Ques. 3): What is the difference between DB file sequential read and DB File Scattered Read ?

Answer:

DB File Scattered Read is related to index read, whereas DB File Sequential Read is related to whole table scan. DB File sequential read reads blocks into contiguous memory, whereas DB File dispersed read reads multiple blocks into buffer cache.


Oracle Access Manager Interview Questions and Answers


Ques. 4): Which variables should be addressed when establishing a table index? How do I choose a column for indexing?

Answer:

The size of the database and the amount of data determine how an index is created. If the table is vast and only a few data points are required for selection or reporting, an index must be created. Cardinality and frequent usage in the where condition of a select query are two primary reasons for selecting columns for indexing. Because configuring main key or unique key immediately creates unique index, the business rule also forces the creation of indexes like primary keys.

It is important to note that creation of so many indexes would affect the performance of DML on table because in single transaction should need to perform on various index segments and table simultaneously.


Oracle Fusion HCM Interview Questions and Answers


Ques. 5): What does Oracle's ANALYZE command do?

Answer:

This command "Analyze" is used to conduct different operations on an index, table, or cluster. The following is a list of Oracle commands that use the ANALYZE command:

The Analyze command is used to find migrated and chained table or cluster rows.

It is used to verify an object's structure.

This assists in gathering statistics about the object that the user is using, which are subsequently put in the data dictionary.

It also aids in the deletion of statistics from the data dictionary that are used by an object.


Oracle SCM Interview Questions and Answers


Ques. 6): What is the DUAL table's data type?

Answer:

The Dual table is a single-column table in the Oracle database. Dummy is a single Varchar2(1) column in this table with the value 'X'.


Oracle Financials Interview questions and Answers


Ques. 7): Is it possible to create an index online?

Answer:

YES. Indexes can be created and rebuilt online. This allows you to change basic tables while also building or rebuilding indexes on those tables. DML actions are permitted while the index is being built, but DDL operations are not permitted.

When constructing or rebuilding an index online, parallel execution is not supported.

CREATE INDEX emp_name ON emp (mgr, emp1, emp2, emp3) ONLINE;


Oracle Cloud Interview Questions and Answers


Ques. 8): When the R/3 system is active, why is a small dump written during an offline backup?

Answer:

BRBACKUP terminates the database during an offline backup, however the present R/3 system is unaware of this. As a result, the first work process that loses its database connection creates a small dump. Until the database is available again, all work processes move into reconnect mode. As a result, because the database cannot be accessed, one (or more) brief dumps are usually produced during an offline backup.


Oracle PL/SQL Interview Questions and Answers


Ques. 9): How can you track a user's password change in Oracle?

Answer:

Oracle only keeps track of the password's expiration date based on when it was last modified. You may discover when a password was last changed by listing the view DBA USERS.EXPIRY DATE and subtracting PASSWORD LIFE TIME. The PTIME column in the USER$ database (on which the DBA USERS view is based) can also be used to check the last password change time. However, if PASSWORD REUSE TIME and/or PASSWORD REUSE MAX are configured in a profile given to a user account, you can look up the password change date in the dictionary table USER HISTORY$.

SELECT user$.NAME, user$.PASSWORD, user$.ptime, user_history$.password_date

FROM SYS.user_history$, SYS.user$

WHERE user_history$.user# = user$.user#;


Oracle SQL Interview Questions and Answers


Ques. 10): What is Secure External password Store (SEPS) ?

Answer:

You can store password credentials for connecting to databases using SEPS by utilising a client-side Oracle wallet, which also stores signing credentials. This capability has been available since Oracle 10g. Thus, embedded username and passwords were no longer required in application code, scheduled jobs, or scripts. This decreases risk because passwords are no longer accessible, and password management policies can be implemented more quickly without having to alter application code whenever the login and password change.


Oracle RDMS Interview Questions and Answers


Ques. 11): Why do we require the CASCADE option when using the DROP USER command to drop a user, and why do "DROP USER" instructions fail when we don't use it?

Answer:

If a user has an object, you will not be able to delete that user without using the CASCADE option. The DROP USER command with the CASCADE option deletes the user and all associated items. Because this is a DDL command, rollback is not possible after it has been executed.


BI Publisher Interview Questions and Answers


Ques. 12): What is the difference between Redo, Undo, and Rollback?

Answer:

When it comes to Redo, Rollback, and Undo, I always get a little confused. They all sound pretty much the same, or at least very similar.

Every Oracle database has a collection of redo log files (two or more). The redo log keeps track of all data changes, including both uncommitted and committed ones. Oracle saves archive redo logs in addition to online redo logs. In recovery scenarios, all redo logs are used. Rollback: More specifically, section rollback. The data in rollback segments is saved as it was before any modifications were made. The redo log, on the other hand, is a record of the inserts, updates, and deletions.

Undo: Rollback segments. They both are really one in the same. Undo data is stored in the undo tablespace. Undo is helpful in building a read consistent view of data.

 

Ques. 13): Do you have more than three Linux instances running? How do you figure out which shared memory and semaphores belong to which instance?

Answer:

Oracle provides an undocumented utility called Oradebug. The oradebug help command displays a list of oracle commands.

SQL>oradebug setmypid

SQL>oradebug ipc

SQL>oradebug tracfile_name

 

Ques. 14): Why aren't all Oracle faults recorded in the Alert Log?

Answer:

In the Alert Log, Oracle only logs critical problems. The majority of Oracle error codes are not recorded (unfortunately this may also include error codes that are genuinely critical). As a result, it's common to discover faults in the Oracle application that aren't visible in the Alert Log.

 

Ques. 15): There is no room available to add datafiles to enhance temp tablespace because it is completely full. What can you do to free up TEMP tablespace in that case?

Answer:

Closing some of the database's idle sessions will help you free up some TEMP space. You can also make use of:

Alter Tablespace PCTINCREASE 1' ;

'Alter Tablespace PCTINCREASE 0;

 

Ques. 16): What is the difference between row chaning and row migration?

Answer:

Row Migration:  When an update to a row causes it to no longer fit on the block, it migrates (with all of the other data that exists there currently). A migration means that the entire row will be moved, with only the «forwarding address» remaining. As a result, the original block only has the new block's rowid and the entire row is transferred.

Row Chaining: A single database block cannot hold more than one row. For example, if your database uses a 4KB blocksize and you need to insert an 8KB row, Oracle will use three blocks and save the information in pieces. Row chaining can occur under the following circumstances: Tables with a rowsize greater than the blocksize. Chained rows are common in tables containing LONG and LONG RAW columns. Oracle breaks broad tables split into sections, therefore tables with more than 255 columns will have chained rows. Rather of having a forwarding address on one block and data on another, we now have data on two or more blocks.

 

Ques. 17): How can I erase a data file that I accidentally created?

Answer:

In most circumstances, you can use RESIZE or RENAME to fix a data file that was generated with the improper size or in the wrong location. You have the following alternatives if you want to drop the data file again:

A produced data file can only be erased during a tablespace reorganization up to and including Oracle 9i. There are no other viable alternatives.

As of Oracle 10g, an empty data file can also be dropped with the following command:

ALTER TABLESPACE DROP DATAFILE ' ';

If there are still extents in the data file, this command fails with ORA-03262. In this case, the affected segments must first be relocated so that the extents are released.

 

Ques. 18): What is the ideal file size for data files?

Answer:

It is impossible to provide a straightforward solution to this topic. In most cases, the size of the data files has no bearing on database activity. However, keep the following considerations in mind:

Make sure the Oracle parameter DB FILES is set high enough. Otherwise, once this limit is reached, new data files cannot be produced.

The fewer the datafiles, the faster they can be restored individually during a backup.

BEGIN BACKUP processes in online backups are likely to take longer the smaller the data files are, and hence the more data files there are.

Data files that are too large aggravate performance problems that are caused by inode locking, since parallel processes may become serialized on the data file inode.

On occasion, size restrictions may prevent the system from using data files that exceed a certain size (often 2GB).

 

Ques. 19): Why does the order of the online redo logs occasionally change?

Answer:

This redo log becomes the next redo log if the next online redo log is still archived and another redo log is available for overwriting. The order of the online redo logs is now altered. Because the alternative would be an archiver stuck, at least briefly, this behaviour is preferable.

Only if many archive processes run in parallel and do not run again when the redo logs are archived may this situation arise. To avoid this issue, see if the archiver's performance (I/O tuning) can be improved. You must also avoid getting an archiver stuck due to a fully operational archive file system.

This problem cannot occur if the number of archiver processes is limited to one by LOG_ARCHIVE_MAX_PROCESSES

 

 

Ques. 20): On my system, why do Oracle processes run as the sid>adm user?

Answer:

By default, the UNIX PS command displays the true user, not the actual user. As a result, having adm as the displayed user for Oracle processes is not a problem. The only thing that matters is that the Oracle executable has the appropriate permissions.  

 

 

December 27, 2019

Top 20 SQL Server Interview Questions and Answers



Ques: 1. What is SQL server agent?

Ans: 

The SQL Server agent plays a vital role in day to day tasks of SQL server administrator (DBA). Server agent's purpose is to implement the tasks easily with the scheduler engine which allows our jobs to run at scheduled date and time.


Oracle Fusion Applications interview Questions and Answers


Ques: 2. What is a Trigger?

Ans: 

Triggers are used to execute a batch of SQL code when insert or update or delete commands are executed against a table. Triggers are automatically triggered or executed when the data is modified. It can be executed automatically on insert, delete and update operations.


Oracle Accounts Payables Interview Questions and Answers

 

Ques: 3. What is the use of SET NOCOUNT ON/OFF statement?

Ans: 

By default, NOCOUNT is set to OFF and it returns number of records got affected whenever the command is getting executed. If the user doesn't want to display the number of records affected, it can be explicitly set to ON- (SET NOCOUNT ON).


Oracle ADF Interview Questions and Answers

 

Ques: 4. What is SQL injection?

Ans: 

SQL injection is an attack by malicious users in which malicious code can be inserted into strings that can be passed to an instance of SQL server for parsing and execution. All statements have to checked for vulnerabilities as it executes all syntactically valid queries that it receives.


Oracle Access Manager Interview Questions and Answers

 

Ques: 5. What will be the maximum number of index per table?

Ans: For SQL Server 2008 100 Index can be used as maximum number per table. 1 Clustered Index and 999 Non-clustered indexes per table can be used in SQL Server.

1000 Index can be used as maximum number per table. 

1 Clustered Index and 999 Non-clustered indexes per table can be used in SQL Server.


Oracle Fusion HCM Interview Questions and Answers


Ques: 6. What is Filtered Index?

Ans: 

Filtered Index is used to filter some portion of rows in a table to improve query performance, index maintenance and reduces index storage costs. When the index is created with WHERE clause, then it is called Filtered Index

 

Oracle SCM Interview Questions and Answers


Ques: 7. List the different index configurations possible for a table?

Ans: 

A table can have one of the following index configurations:

  • No indexes 
  • A clustered index 
  • A clustered index and many non-clustered indexes 
  • A non-clustered index 
  • Many non-clustered indexes


Oracle Financials Interview questions and Answers


Ques: 8. What is sub query and its properties?

Ans: 

A sub-query is a query which can be nested inside a main query like Select, Update, Insert or Delete statements. This can be used when expression is allowed. Properties of sub query can be defined as

  • A sub query should not have order by clause.
  • A sub query should be placed in the right hand side of the comparison operator of the main query. 
  • A sub query should be enclosed in parenthesis because it needs to be executed first before the main query. 
  • More than one sub query can be included.


Oracle Cloud Interview Questions and Answers


Ques: 9. What is Mirroring?

Ans: 

Mirroring is a high availability solution. It is designed to maintain a hot standby server which is consistent with the primary server in terms of a transaction. Transaction Log records are sent directly from the principal server to a secondary server which keeps a secondary server up to date with the principal server.

 

Oracle PL/SQL Interview Questions and Answers


Ques: 10. What is an execution plan?

Ans: 

An execution plan is a graphical or textual way of showing how the SQL server breaks down a query to get the required result. It helps a user to determine why queries are taking more time to execute and based on the investigation user can update their queries for the maximum result.

In Query Analyzer is an option called “Show Execution Plan” (located on the Query drop-down menu). If this option is turned on it will display a query execution plan in a separate window when a query is run again.

 

Oracle SQL Interview Questions and Answers


Ques: 11. What is a performance monitor?

Ans: 

Windows performance monitor is a tool to capture metrics for the entire server. We can use this tool for capturing events of the SQL server also.

Some useful counters are – Disks, Memory, Processors, Network, etc.

 

Oracle RDMS Interview Questions and Answers


Ques: 12. What is the difference between a Local and a Global temporary table?

Ans: 

If defined inside a compound statement a local temporary table exists only for the duration of that statement but a global temporary table exists permanently in the database but its rows disappear when the connection is closed.

 

BI Publisher Interview Questions and Answers


Ques: 13. What is the SQL Profiler?

Ans: 

SQL Profiler provides a graphical representation of events in an instance of SQL Server for monitoring and investment purpose. We can capture and save the data for further analysis. We can put filters as well to captures the specific data we want.

 

Oracle 10g Interview Questions and Answers


Ques: 14. What are the properties of the Relational tables?

Ans: 

Relational tables have six properties:

  1. Values are atomic. 
  2. Column values are of the same kind. 
  3. Each row is unique. 
  4. The sequence of columns is insignificant. 
  5. The sequence of rows is insignificant. 
  6. Each column must have a unique name.


BlockChain interview Questions and Answers


Ques: 15. What is View?

Ans: 

A view is a virtual table that contains data from one or more tables. Views restrict data access of the table by selecting only required values and make complex queries easy.

Rows updated or deleted in the view are updated or deleted in the table the view was created with. It should also be noted that as data in the original table changes, so does data in the view, as views are the way to look at part of the original table. The results of using a view are not permanently stored in the database

 

MySQL Interview Questions and Answers


Ques: 16. Why is replication required on the SQL Server?

Ans: 

Replication is the mechanism that is used to synchronize the data among the multiple servers with the help of a replica set.

This is mainly used to increase the capacity of the reading and to provide an option to its users to select among various servers to perform the read/write operations.

 

Azure Interview Questions and Answers


Ques: 17. What part does database design have to play in the performance of a SQL Server-based application?

Ans. 

It plays a very major part. When building a new system, or adding to an existing system, it is crucial that the design is correct. Ensuring that the correct data is captured and is placed in the appropriate tables, that the right relationships exist between the tables and that data redundancy is eliminated is an ultimate goal when considering performance. Planning a design should be an iterative process, and constantly reviewed as an application is developed. It is rare, although it should be the point that everyone tries to achieve, when the initial design and system goals are not altered, no matter how slightly. Therefore, a designer has to be on top of this and ensure that the design of the database remains efficient.

 

Ques: 18. What command is used to create a database in the SQL Server and how?

Ans: 

CREATEDATABASE Command is used to create any database in the SQL Server. Following is the way to use this command:

CREATEDATABASE Name of the Database

Example: If the name of a database is “employee” then create command to create this database that can be written as CREATEDATABASE employee.

 

Ques: 19. What is an extended stored procedure? Can you instantiate a COM object 

by using T-SQL?

Ans: 

An extended stored procedure is a function within a DLL (written in a programming language like C, C++ using Open Data Services (ODS) API) that can be called from T-SQL, just the way we call normal stored procedures using the EXEC statement.

Yes, you can instantiate a COM (written in languages like VB, VC++) object from T-SQL by using sp_OACreate stored procedure. 

 

Ques: 20. When should SQL Server-based cursors be used, and not be used?

Ans: 

SQL Server cursors are perfect when you want to work one record at a time, rather than taking all the data from a table as a single bulk. However, they should be used with care as they can affect performance, especially when the volume of data increases. 

From a beginner’s viewpoint, I really do feel that cursors should be avoided every time because if they are badly written, or deal with too much data, they really will impact a system’s performance. There will be times when it is not possible to avoid cursors, and I doubt if many systems exist without them. If you do find you need to use them, try to reduce the number of records to process by using a temporary table first, and then building the cursor from this. The lower the number of records to process, the faster the cursor will finish. Always try to think “out of the envelope”.

 


More Interview Questions and Answers:

 

C language Interview Questions and Answers

 

C++ language Interview Questions and Answers

 

Machine Learning Interview Questions and Answers

  

PowerShell Interview Questions and Answers

 

Python Interview Questions and Answers

 

Python Pandas Interview Questions and Answers

 

SQL Server Interview Questions and Answers

 

Unix interview Questions and Answers

 

C# Language Interview Questions and Answers

 

CSS (Cascading Style Sheets ) Interview Questions and Answers

 

Robotic Process Automation(RPA) Interview Questions and Answers

 

UX Design Interview Questions and Answers

 

Docker Interview Questions and Answers

 

Google Cloud Computing Interview Questions and Answers

 

Linux Interview Questions and Answers

 

Data Science Interview Questions and Answers

 

Edge Computing Interview Questions and Answers

 

Hadoop Technical Interview Questions and Answers

 

Hyperion Technical Interview Questions and Answers

 

Internet of Things (IOT) Interview Questions and Answers

 

C# Language Interview Questions and Answers