Wednesday, 8 February 2017

Big Data


What is Big Data?
                               Big data means really a big data itself,it is big collection of data that cannot be processed using normal techniques or say computing techniques.It has several tools or frameworks with it to handle the data.

 
Big data include big amount of data, it may be :

> Structured (Relational data set)
>Semi-Structured (XML data)
>UN-Structured (doc,text,PDF etc)


Tools or Frameworks used :

Hadoop :It is the Apache open source framework that will provide a option to process the data and also store the data from the clusters of computer using some programming constructs (Java).
Hadoop Map Reduce is the software that allows to write the application which processes huge amount of data in parallel.

The two key components of Hadoop :

>Hive and
>Pig.

Pig and Hive are the two tools that made ease the complexity of writing the programming using the java language.Pig allows to use query for operation on the data such as filter join etc.Hive is also similar to  query language but have some restrictions called hive query language (HQL) commands understood by itself.
   

This is just a brief of what is big-data and what it does use and how it is used to manipulate the data with various tools. One can learn big-data and use tools from different sites available .


Tuesday, 31 January 2017

Internet Of Things(IoT)

 

The Internet Of Things is the inter-working of physical devices.they are mainly used in the physical devices,moving vehicles and others devices,which are embedded with some sensors or software etc that will enable the communication between the devices or say exchange of data between the devices.The IoT devices are integrated with the smart city development.These are capable of solving the Real world problems.

For Ex: Family members moving out of the house and the lighting inside should get shutdown automatically or person entering the house should be recognized(Owner or family member) and the door should open automatically etc is possible from IoT.

The IoT is nothing but all about the sensors.There are many sensors available in the present era.lets go through them one by one:

Temperature sensors: These are used to sense the temperature from machine to down to earth. If we consider the machines which needs to kept cool,here the sensors will report to the user if it is overheated.Even for water heaters can be used to know weather the water is heated up to the level.

Pressures sensors: These sensors are used for water flow or water leakages etc.For ex: the Domestic purpose make use of water in frequent time intervals.If there is leakage of water per house then around 20-30% of water is wasted,which is the major disadvantage.In such situation the sensor immediately inform the user about the leakage etc and user take appropriate action.

Chemical/Gas Sensors: These are used to control the quality of air in the city.It warns if more amount of CO2 is increased which effect the health etc.

 Level Sensors:These are used to sense the level of area.i.e. the level of water filled in the tanks,the level of waste within the dustbins etc.

There are many others sensors,the above mentioned are the most useful and are also used for the applications of day to day life.These senors can be made use for the projects.

The others thing we focus on is how to compute the data and process it and send it to the user?

Yes ,to read the data we need some technologies and hardware components.There are two boards available for these.Raspberry Pi and Aurdino.   

   

 

Tuesday, 19 January 2016

SQL

Introduction


What is SQL?

  • SQL stands for Structured Query Language
      you can access and manipulate(build) the database.


What Can SQL do?

SQL can execute queries against a database
SQL can retrieve data from a database
SQL can insert records in a database
SQL can update records in a database
SQL can delete records from a database
SQL can create new databases
SQL can create new tables in a database
SQL can create stored procedures in a database
SQL can create views in a database
SQL can set permissions on tables, procedures, and views




Database Tables

A database most often contains one or more tables. Each table is identified by a name (e.g. "Student" or "Employee"). Tables contain records (rows) with data.

>rows are also know as tuples.


 Student ID     Student name     contact     age
1                       Ash                    890          21
2                      Anny                  789           22
3                      Stain                   465           20
4                      Harry                  769            25
5                       Dev                    899            23


Some of The Most Important SQL Commands

SELECT - extracts data from a database
UPDATE - updates data in a database
DELETE - deletes data from a database
INSERT INTO - inserts new data into a database
CREATE DATABASE - creates a new database
ALTER DATABASE - modifies a database
CREATE TABLE - creates a new table
ALTER TABLE - modifies a table
DROP TABLE - deletes a table
CREATE INDEX - creates an index
DROP INDEX - deletes an index





 

The SQL SELECT Statement :

The SELECT statement is used to select data from a database.

SQL SELECT Syntax
 
SELECT column_name,column_name
FROM table_name;

and
 
SELECT * FROM table_name;
 
Example:
 
 SELECT * FROM Student;
 

The SQL SELECT DISTINCT Statement

In a table, a column may contain many duplicate values; and sometimes you only want to list the different (distinct) values.
 
 SELECT DISTINCT column_name,column_name
FROM table_name;
 
 
Example:
select distinct Student name from Student ;


The SQL WHERE Clause 

The WHERE clause is used to extract only those records that specifies the needs .

SQL WHERE Syntax

SELECT column_name,column_name
FROM table_name
WHERE column_name operator value;
 
Example 
 
SELECT * FROM Student
WHERE name='Ash';
 

Operators in The WHERE Clause

The following operators can be used in the WHERE clause:
Operator   Description
=         Equal
<>         Not equal. 
>         Greater than
<         Less than
>=         Greater than or equal
<=         Less than or equal
BETWEEN         Between an inclusive range
LIKE         Search for a pattern
IN       To specify multiple possible values for a column
 
 
 
 

Monday, 11 January 2016

Java script 7

Function Declarations

 function functionName(parameters)

 {
  code to be executed
} 

Example

function myFunction(a, b)
 {
    return a + b;
}

Function Expressions

A function expression can be stored in a variable:

Example

var x = function (a, b) {return a + b}; 
 
 

Functions Can Be Used as Values

 

Example

function myFunction(a, b)
 {
    return a + b;
}

var x = myFunction(4, 3);
 

Function Parameters and Arguments

  

functionName(parameter1, parameter2, parameter3)

 {
    code to be executed
}  

Java script 6

JavaScript Form Validation

 

If the form submitted is Empty,the function should return alert message and prevent from submitting the form.

JavaScript Example

function validateForm()
 {
    var x = document.forms["myForm"]["fname"].value;
    if (x == null || x == " ")
 {
        alert("Name must be filled out");
        return false;
    }
}

 After filling out the fname the form will be submitted. 

 

Typical validation tasks are:
  • has the user filled in all required fields?
  • has the user entered a valid date?
  • has the user entered text in a numeric field?

End of the basic Java script.

Friday, 8 January 2016

Java script 5

JavaScript Loops

 

  •  for

  • while

  •  do while 

    The for loop has the following syntax:

     
          for (statement 1; statement 2; statement 3)
          {
               code block to be executed
          }

 Example

for (i = 0; i < 5; i++) 
{
    text += "The number is " + i + "<br>";
}

The While Loop Syntax

while (condition) 
{
    code block to be executed
}

Example

In the following example, the code in the loop will run, over and over again, as long as a variable (i) is less than 5:

Example

while (i < 5) 
{
    text += "The number is " + i;
    i++;
}

The Do/While Loop Syntax

The do/while loop is a variant of the while loop.

do {
    code block to be executed
}
while (condition);

Example

The example below uses a do/while loop. The loop will always be executed at least once, even if the condition is false, because the code block is executed before the condition is tested:

Example

do {
    text += "The number is " + i;
    i++;
}
while (i < 10);


 

 

Java script 4

Conditional Statements 

JavaScript we have the following conditional statements:

  • if

  • else

  • else if 

  • switch 

     

    The if Statement

    Syntax

    if (condition) 
    {
        block of code to be executed if the condition is true
    } 
     
     Example : 
     <hmtl>
    <script>
    var age=20;
    if(age>18)
    {
    document.write("Qualifies for driving");
    }
    </scritp>
    </html>

    The else Statement

    if (condition)
     {
        block of code to be executed if the condition is true
    } 
    else
     {
        block of code to be executed if the condition is false
    }
     
    Example : 
     <hmtl>
    <script>
    var age=20;
    if(age>18)
    {
    document.write("Qualifies for driving");
    } 
    else
    {
    document.write("doesnt qulify for driving");
    }
    </scritp>
    </html>

    The else if Statement

    Use the else if statement to specify a new condition if the first condition is false.

    Syntax

    if (condition1) 
    {
        block of code to be executed if condition1 is true
    }
     else if (condition2) 
    {
        block of code to be executed if the condition1 is false and condition2 is true
    }
     else
     {
        block of code to be executed if the condition1 is false and condition2 is false
    }
     
     
    Example:Simillar to if else.

    The JavaScript Switch Statement

     
    Syntax 
     
     switch(expression)
     {
        case n:
            code block
            break;
        case n:
            code block
            break;
        default:
            default code block
    }