Monday, 13 September 2021

Basic Linux commands

In Linux system all basic and advanced tasks could be done by using commands. Linux commands help you to interact with the system.  We have to run the commands on terminal, in Window OS it is called as command prompt. By using terminal, we can interact with the Linux system.

1.      ls – list

This command is used to display or used to list the contents of a directory.

2.      ls -ltr

       This command is used to list the files according to which time they were created.

       Here, l-long listing, t-time, r-reverse order.

3.      pwd – present working directory

It will show you the present working directory. 

4.      cd – change directory

It is used to change the directory.

Syntax:

cd <directory_name>     

e.g.,

               cd Desktop

5.      mkdir – make directory

By using this command, we can create a directory.

Syntax:

mkdir <directory_name>

e.g.,

               mkdir user

6.       rmdir – remove directory

This command is used to remove or delete empty directory. But if the directory we are going to delete contains files or subdirectories, such directory can’t be removed by this command.

Syntax:

rmdir <directory_name>              

e.g.,

               rmdir user

This will delete the directory ‘user’ if it is empty otherwise it will give an error.

7.      rm – remove

This command removes files, directories.

Syntax:

rm <directory_name>

e.g.,

removing one file –

               rm file1.txt

removing more than one files at a same time

               rm file1.txt file2.txt

8.      cp- copy

This command is used to copy one file into another file or copy a file to specified path

Syntax:

cp <source_file_name> <destination_file_name>

cp <file_name> <path, where you want to copy this file> 

        e.g., 

                  cp a.txt b.txt

                  cp a.txt /Desktop  

9. mv – move

This command is used to move directory or a file from one location to another.

Syntax:

mv <file_name> <directory_path>

e.g.,

               mv a.txt Directory

10.  tail –

This command is used to display the last 10 lines of a file.

Syntax:

tail <file_name>

11.  su – super user

      This command is used to provide the administrative access to the other user. When you enter this command, it will ask you for a password at that time you have to provide the password for that user.

Syntax:

su  <user_name> 

12.  sudo -super user do

this command especially used as a prefix with some other commands to run with some extra privileges. The working of this command is same as ‘Run as Administrator’ option in Windows.

Syntax:

sudo command

13.  clear-

This command clears the terminal screen.

Syntax:

Clear 

14.  exit –

This command is used to exit from the currently working shell.

Syntax:

exit

15.  wc – word count

This command is used to count the characters, words, lines in a specified file.

Syntax:

wc <file_name>

 

 

 

 


Sunday, 12 September 2021

What are the key Differences between Interface and Abstract class in Java?

 

What are the key differences between Interface and Abstract class?

If you are learning Java you might know about what are the key features of java, how can we make use of basic java concepts, mechanisms like interfaces, abstraction. So, if you are looking for the key differences between java Interfaces and abstraction then this is the right place. In this article we will see what are the different aspects on which we can differentiate java Interfaces and Abstract classes.

·       Interface

1.      When we should use –

You can use Interface if you only know the specification and don’t know how to develop it or you don’t know the implementation.

Syntax:

interface <interface_name> {

        // declare the fields that are constant

        // declare abstract methods

}

e.g.

interface Emp {

        public abstract getEmpInfo();

        public abstract getSalaryInfo();

}

2.      Multiple Inheritance

By using Interfaces, we can achieve Multiple inheritance. It means one class can implement one or more interfaces.

3.      Variables

While talking about interface variables, variables inside the interface are by default public static final.

4.      Variable initialization

You should initialize the variable, whenever you are writing it inside the interface.

e.g., public static final int i = 20;

5.      Constructor

We can’t create constructor for the interfaces.

As we know all the variables inside the interface are static, we need a constructor to initialize the variables (non-static variables). So, in interface we don’t have any non-static variables hence we don’t need to have constructor for that.

6.      Object

We can not create object of interface.


·       Abstract class –

1.      When we should use –

In the case where you know the partial implementation of class at that time you use the abstract class.

Syntax:

abstract class <class_name> {

        //abstract methods

        //non abstract methods

        //data members

}

e.g.,

abstract class A {

        getSalaryInfo(){

                       System.out.println("Employee Salary Info");

      }

      public abstract getEmpInfo();

}

2.      Multiple Inheritance

Abstract class can’t extend more than one class because java does not support Multiple Inheritance.

3.      Variables

There is no such restriction on how we can declare the variables. Abstract class variable can be anything, you can make it public, private etc.

4.      Variable initialization

You may or may not initialize the variables.

e.g.,

public int i = 1;

private int j;

5.      Constructor

We can initialize the non-static variables whenever we are creating the objects, so we can create the constructor for abstract class to initialize the variables.

6.      Object

Abstract class does not have any implementation, it is partially implemented, hence it doesn’t have complete implementation, since it has partial implementation, we can’t create object of abstract class.

Batch group and need of Batch Automation in Informatica MDM

Hello everyone!! If you want to know why we create batch group and why there is need of Batch job Automation then this is the right place to know about what does it mean and why we need it. In this article we are going to see what is Batch group and automation in Informatica MDM.

What is batch group?

- Batch groups are nothing but, the collection of all the batch jobs like Stage, Load, Match and Merge, Tokenization will be executed using single command.

- Each job in a batch group is get executed in parallel or sequentially with other jobs in batch group.

Need of batch groups-

-Whenever we create Base-Object table, corresponding stage tables, and Landing tables we also configure the mappings. Based on mappings stage jobs get created.

-Also based on internal mapping between Staging table and Base-Object table, Load job will be available to execute. So, there might be a question like, When all these jobs are available, how to execute those jobs?

- So here is the answer- Instead of executing each batch job we create batch group, so that all the jobs will get sequentially executed according to how we configured those jobs in batch group.

Need of Automation-

- Automation is used for the jobs that need to be executed on a regular basis without any manual intervention.

-In real time prod environment, we have to atomize the batch processing so that those batch can be called by some of the scheduler. E.g., Autosys is a scheduler which executes the job in batch.

-We have to configure the shell script in those tools so that this tool itself will take care the execution of the process, so no manual intervention is required.

 


What is Database?

Hello everyone, lets start with basic Database overview:

What is Database? Why use Database?

◈   Databases are systems that allow users to store and organize large amount of data.

◈   They are useful when dealing with large amounts of data.

Typical Users who use Database

Database have wide veriety of users!

◈   Analysts :

-     Marketing

-     Business

-     Sales

◈   Technical :

-     Data Scientist

-     Software Engineers

-     Web Developers

Basically anyone needing to deal with data has great use scale to use database!

From Spreadsheets to Databases

Most users have some familiarity with spreadsheet software (such as Excel). Let's discuss the use case for spreadsheets versus databases. We will have a look towards usecases of spreadsheets and usecases of Database, so that we can expand the knowledge of the same.

◈   Spreadsheets :

-     Spreadsheets are best to use when there is one-time analysis.

-     Also if there is quickly need to chart something out.

-     They work with reasonable data set size such as google sheet or excel sheet.

-     What really nice about spreadsheets is it allow the ability for untrained people to work with data.

◈   Databases :

-     Databases are best at Data Integrity (that means, it really dont allow anyone to click on the shell and change the data).

-     Databases can handle massive amount of data (in such amount where spreadsheet used to crash).

-     Databases can quickly combine different datasets.

-     Databases are also perfect for automating steps for re-use, with the help of SQL syntax, which we will learn later.

-     Databases can support data for websites and applications.

Database Platform Options

Database Platform Description  
PostgreSQL FREE (Open Source). Widely used on internet. Multi platform.
MySQL / MariaSQL FREE (Open Source). Widely used on internet. Multi platform.
MS SQL Server Express FREE, but with some limitations. Compatible with SQL Server. Windows Only.
Microsoft Access Cost. Not easy to use just SQL
SQLite FREE (Open Source). Mainly command line

We will be focusing on the PostgreSQL, because PostgreSQL is free, it is multi platform i.e it can be used on MacOS, Windows or linux.. And reason behind why it is widely used is, it is easy to install and hit the ground running.

SQL

◈   SQL (Structured Query Language) is the programming language used to communicate with the Database.

-    PostGreSQL is a great Database choice for learning how to use SQL. SQL is all the thing we are going to learn in this course, it is the way by which we can communicate with database to get data out of it or put data into it. And SQL can be used in variety of Database platforms and softwares that use SQL.

◈   SQL Example :

     We will learn how to write and use SQL. So the general syntax of SQL will look something like this, some column names from the table and then we have some functions and clauses, here I'm ordering by the first_name.

in above example,

application_id, first_name, last_name are the column names of the table. Here table name is subscribers and order by is a clause