Saturday, April 30, 2011

Bussiness Intelligence definition

Business Intellignece:

Its nothing but building an "Information Delivery system for the customer to provide him right information at right time".

Here customers are any business bodies who want to know and mine the knowledge about their own business and go deep into the business.






Business Intelligence

"Business Intelligence is a set of methodologies, processes, architectures, and technologies that transform raw data into meaningful and useful information used to enable more effective strategic, tactical, and operational insights and decision-making."

Business intelligence (BI) refers to computer-based techniques used in identifying, extracting and analyzing business data, such as sales revenue by products and/or departments, or by associated costs and incomes.

BI technologies provide historical, current and predictive views of business operations. Common functions of business intelligence technologies are reporting, online analytical processing, analytics, data mining, business performance management, benchmarking, text mining and predictive analytics.

Business intelligence aims to support better business decision-making. Thus a BI system can be called a decision support system (DSS).

Though the term business intelligence is sometimes used as a synonym for competitive intelligence, because they both support decision making, BI uses technologies, processes, and applications to analyze mostly internal, structured data and business processes while competitive intelligence gathers, analyzes and disseminates information with a topical focus on company competitors. Business intelligence understood broadly can include the subset of competitive intelligence.

BI applications use data gathered from a data warehouse or a data mart. However, not all data warehouses are used for business intelligence, nor do all business intelligence applications require a data warehouse.

Business intelligence also includes technologies such as data integration, data quality, data warehousing, master data management, text and content analytics, and many others that the market sometimes lumps into the Information Management segment.

Business Intelligence can be applied to the following business purposes (MARCKM), in order to drive business value:

  1. Measurement – program that creates a hierarchy of Performance Metrics and Benchmarking that informs business leaders about progress towards business goals.
  2. Analytics – program that builds quantitative processes for a business to arrive at optimal decisions and to perform Business Knowledge Discovery. Frequently involves: data mining, Statistical Analysis, Predictive Analytics, Predictive Modeling, Business Process Modeling
  3. Reporting/Enterprise Reporting – program that builds infrastructure for Strategic Reporting to serve the Strategic management of a business, NOT Operational Reporting. Frequently involves: Data visualization, Executive information system, OLAP
  4. Collaboration/Collaboration platform – program that gets different areas (both inside and outside the business) to work together through Data sharing and Electronic Data interchange.
  5. Knowledge Management – program to make the company data driven through strategies and practices to identify, create, represent, distribute, and enable adoption of insights and experiences that are true business knowledge. Knowledge Management leads to Learning Management and Regulatory Compliance/Compliance.
In the next tutorial, we will go through the architecture....

Friday, April 29, 2011

A View On C++

C++ is the first OOPs(Object Oriented Programming Language) which was introduced in the Programming world to make the Programming system more easy and understandable.

Object Oriented Programming is an approach to program organization and development that attempts to eliminate some of the pitfalls of conventional programming(C language).

Anyways lets go with some of the concepts of OOPs.
1) Class.
2)Object.
3)Data Abstraction and Encapsulation.
4)Inheritance.
5)Polymorphism
6)Dynamic Binding
7)Message Passing

All the concepts defined above contribute a lot to the object oriented paradigm.
Now lets explain each of the concept in detail..

1.)Class: Class is a reference type or a user defined datatype which refers to a memory location and consists of functions(C++)/methods(JAVA) and data members which are packed inside like a tiffin box :) ...A real time example of a class is just a class in your college where madam/sir are methods and students are data members who act accordingly to the method calls.

2.)Object:Object is an instance of a class(standard definition in any text book :) )...But many of us are confused with this definition...As said earlier Classes contain data members and methods...and we have said that classes are just reference types..Then you may get a doubt that how is memory allocated to this class and how are these data members are manipulated?
Instance is nothing but Space (or) memory.So object can now be defined as "memory allocated for a class" is an object..With the help of this object we are going to manipulate the data members present inside the class.

3.)DataAbstraction and Data Encapsulation: Abstraction refers to the act of representing essential features without including the background details or explanation..In many programs we can see that business logics contain many variables and values assigned to those variables.So after the end of the program a user can only view the UserInterface runnig in different Stages..
But user doest know how that process is implemented..A desktop application is implemented in c++ then when we run that software it only shows the output how we have implemented.But not the code that is written in the back-end.

Data encapsulation works through access specifiers like
Private
Public
Protected
Lets go with these access specifiers in the next tutorial...

SEE YA :)

Thursday, April 21, 2011

Presentations and Information

Presentation and Information On

Stegonography Click Here
 
How Google Works Click Here

Conceptual Database Design Click Here

Apriori Algorithm and its Improvement Click Here

Disaster Management Click Here

Learn "Index" with Example

Index in 7 points :
  1. Index is used for faster retrieval of rows from a table. 
  2. An index can be created explicitly by using the CREATE INDEX statement or implicitly by Oracle.
    The oracle server uses the index to search for a row rather than scanning through the entire table. 
  3. Indexing reduces search time and disk input/output.
  4. Creating and removing an index does not affect the table at all.
  5. When a table is dropped,all indexes based on that table are also removed.
  6. Implicit indexes are created when the primary key or unique constraint is defined. Such indexes get the name of the constraint .
  7. User can create explicit indexes based on non-primary key or non unique columns or on any combination of columns for faster table access.
The general syntax is : 
CREATE INDEX indexname ON tablename(columnname1,columnname1);

By using the above syntax the columns can hold duplicate values. To create unique index,the keyword UNIQUE should be included : 

CREATE UNIQUE INDEX indexname ON tablename(columnname1,columnname1);

EXAMPLE :

CREATE INDEX stu_idx ON student(last,first);
Now suppose we want to see the index for table student :
SELECT index_name, table_name, FROM user_indexes WHERE table_name =
'student';
Exercise :
Create an index to search students faster based on their ID.

CREATE INDEX index02 ON employee24(fname,lname);


Learn "Joins" with Examples(Answers)

create table contact_details02(code_no varchar(30) references emp_master02(emp_no),phone_no number(10),address varchar(30))

emp_master02

branch_master02


1)List the employee details along with branch names to which they belong..

   select * from emp_master02 e inner join branch_master02 b on e.branchno=b.branchno

2)List the employee details of only those employees who belong to the Administration department along with branch names to which they belong.

  select * from emp_master02 e inner join branch_master02 b on e.branchno=b.branchno where e.dept='software'

3)List the employee details along with the contact details using Right outer join.

  select * from contact_details02 c right outer join emp_master02 e on e.emp_no= c.code_no

4)List the employee details along with the contact details using Left outer join.

  select * from contact_details02 c left outer join emp_master02 e on e.emp_no= c.code_no

Learn "JOINS" with Examples(Questions)

EMP_MASTER :

EMP_NO FNAME MNAME LNAME DEPT DESIG BRANCH_NO
BRANCH_MASTER :
NAME BRANCH_NO
CONTACT_DETAIL:
CODE_NO PHONE_NUMBER ADDRESS
  1. List the employee details along with branch names to which they belong..
  2. List the employee details of only those employees who belong to the Administration department along with branch names to which they belong. 
  3. List the employee details along with the contact details using Right outer join. 
  4. List the employee details along with the contact details using Left outer join.

Monday, April 18, 2011

Compilation and Linking

Compilation refers to the processing of source code files (.c, .cc, or .cpp) and the creation of an 'object' file. 
This step doesn't create anything the user can actually run. Instead, the compiler merely produces the machine language instructions that correspond to the source code file that was compiled. 
For instance, if you compile (but don't link) three separate files, you will have three object files created as output, each with the name .o or .obj (the extension will depend on your compiler). 
Each of these files contains a translation of your source code file into a machine language file -- but you can't run them yet! You need to turn them into executables your operating system can use. That's where the linker comes in.
Linking refers to the creation of a single executable file from multiple object files. 
In this step, it is common that the linker will complain about undefined functions (commonly, main itself). 
During compilation, if the compiler could not find the definition for a particular function, it would just assume that the function was defined in another file.
If this isn't the case, there's no way the compiler would know -- it doesn't look at the contents of more than one file at a time. 
The linker, on the other hand, may look at multiple files and try to find references for the functions that weren't mentioned.

Why they are seperated?

First, it's probably easier to implement things that way. The compiler does its thing, and the linker does its thing -- by keeping the functions separate, the complexity of the program is reduced. 
Another (more obvious) advantage is that this allows the creation of large programs without having to redo the compilation step every time a file is changed. Instead, using so called "conditional compilation", it is necessary to compile only those source files that have changed; for the rest, the object files are sufficient input for the linker. 
Finally, this makes it simple to implement libraries of pre-compiled code: just create object files and link them just like any other object file. (The fact that each file is compiled separately from information contained in other files, incidentally, is called the "separate compilation model".)
Knowing the difference between the compilation phase and the link phase can make it easier to hunt for bugs. Compiler errors are usually syntactic in nature -- a missing semicolon, an extra parenthesis. Linking errors usually have to do with missing or multiple definitions. If you get an error that a function or variable is defined multiple times from the linker, that's a good indication that the error is that two of your source code files have the same function or variable.




Tuesday, April 12, 2011

Practice -3 (continued)

Simple Example Program on PL/SQL

5) Using Loop

  set serveroutput on
  DECLARE
  v_count number(2);
  v_sum number(2) :=0;
  v_avg number(3,1);
  BEGIN
  v_count := 1;
  loop
  v_sum :=v_sum+v_count;
  v_count :=v_count+1;
  dbms_output.put_line('v_count is'||v_count);
  exit when v_count>10;
  end loop;
  v_avg :=v_sum/10;
  dbms_output.put_line('average is'||v_avg);
  end;

  Output:

   v_count is2
   v_count is3
   v_count is4
   v_count is5
   v_count is6
   v_count is7
   v_count is8
   v_count is9
   v_count is10
   v_count is11
   average is5.5
   PL/SQL procedure successfully completed



6) Cursor
  set serveroutput on
  DECLARE
  v_first employee.fname%type;
  v_lname employee.lname%type;
  v_role employee.role%type;
  cursor employee_cur is
  select fname,lname,role from employee where employee_id='ADM001';
  BEGIN
  if not employee_cur%isopen then
  open employee_cur;
  end if;
  loop
  fetch employee_cur into v_first,v_lname,v_role;
  exit when not employee_cur%found;
  dbms_output.put_line('firstname' || v_first || 'lastname' ||v_lname || 'role' || v_role);
  end loop;
  end;

  Output:

Here we use the same table we have created earlier (employee24)

   fnameAdam lnameEve roleClient
   PL/SQL procedure successfully completed

 
7) Creating a procedure
  create procedure sw_emp9(emp_id in employee.employee_id%type,o_first out employee.fname %type,o_last out employee.lname%type)
  is
  begin
  select fname,lname into o_first,o_last from employee where employee_id=emp_id;
  end;

  Output:

8) Calling a procedure
  declare
  v_fname employee.fname%type;
  v_lname employee.lname%type;
  v_id employee.employee_id%type := '&emp_id';
  begin
  search_emp(v_id,v_fname,v_lname);
  dbms_output.put_line('firstname' || v_fname || 'lastname' ||v_lname);
  end;

  Output:


  old 4: v_id employee24.emp_id%type := '&employee_id';
  new 4: v_id employee24.emp_id%type := 'ADM001';
 

9) Creating a trigger
  create trigger employee_insert_before
  before insert on employee
  for each row
  begin
  dbms_output.put_line('before insert of ');
  end;

  Output:  Trigger created

Practice - 3

Simple Example Program on PL/SQL

1) Simple program

   set serveroutput on
   DECLARE
   num1 number;
   num2 number;
   BEGIN
   num1 := 5;
   num2 :=num1*2;
   dbms_output.put_line('double of num1 is'||num2);
   end;

  Output:  double of num1 is10

2) Calculating the area
   set serveroutput on
  DECLARE
  area number;
  radius number;
  pi constant number := 3.14;
  BEGIN
  radius := 5;
  area := pi*radius*radius;
  dbms_output.put_line('area is'||area);
  end;

  Output:  area is  78.5
 
3) Using IF
  set serveroutput on
  DECLARE
  v_day varchar2(10) :='&day';
  BEGIN
  if(v_day='sunday') then
  dbms_output.put_line('sunday is a holiday');
  else
  dbms_output.put_line('another day');
  end if;
  end;

  Output:
  
old 2: v_day varchar2(10) :='&day'; 
  new 2: v_day varchar2(10) :='mon'; 
  another day 
  PL/SQL procedure successfully completed.

4) Using SELECT
  set serveroutput on
  DECLARE
  v_first employee.fname%type;
  v_lname employee.lname%type;
  v_role employee.role%type;
  BEGIN
  select fname,lname,role into v_first,v_lname,v_role from employee where
  employee_id='ADM001';
 dbms_output.put_line('firstname'||v_first||'lastname'||v_lname||'role'||v_role);
  end;

  Output:
 
To get the output we now first create and insert data into table.
Here we are creating employee24

create table employee24
(
emp_id varchar(20),
fname char(20),
lname char(20),
role char(20)
);

insert into employee24
values
(
'&emp_id',
'&fname',
'&lname',
'&role'
);

select * from employee24

Final Output:

firstnameAdam lastnameEve roleClient
PL/SQL procedure successfully completed.


Practice - 2

1) Create a Pl/SQL block to declare a cursor to select last name,first name,salary and hire date from the Employee table. Retrieve each row from the cursor and print the employee's information if the employee's salary is greater than $50,000 and the hire date is before 31-DEC-1997.
 

Declare
  Cursor cur1 Is
Select lastname,firstname,salary,hiredate;
From emp_tbl02;
Begin
If emp.sal>50000 and hire date<31-dec-1997;
emp_rec  emp_cur1%rowtype;
begin
open emp_cur1;
loop
fetch emp_cur1 into emp_rec;
exit when emp_cur1%notfound;
dbms_output.put_line(emp_rec.firstname||' '||emp_rec.lastname||' '||emp_rec.salary||' '||emp_rec.hiredate);
end loop;
end;

End;


2) Create a cursor named as emp_cur that contains employee's last name,first name,salary and commission. Use the while loop to work with one row at a time. Within the while loop,employee's salary and commission are added together to find the total income. Print the total company wages (the total of all employee salaries and commissions).

declare
cursor emp_cur is
select f_name,l_name,emp_sal,commision from emp_tabl;
emp_rec emp_cur%rowtype;
emp_income number(20);
v_counter number := 1;
cmp_wages number(20) := 0;
begin
open emp_cur;
while(v_counter <= 3) loop
fetch emp_cur into emp_rec;
emp_income := emp_rec.emp_sal + emp_rec.commision;
cmp_wages := cmp_wages + emp_income;
v_counter := v_counter + 1;
end loop;
dbms_output.put_line('cmpny wages are '||cmp_wages);
end;