Feeds:
Posts
Comments

On 29th Feb Our hon’ble Finance minister P. Chidambram Presented Union Budget 2008-09, as 5 states are going for election this year and this is likely to be the last budget of the UPA government. This Budget looks more of a election budget which is crafted to woo voters.

What is your take on it?

Please fill the following Budget Feedback form:

<iframe height=”608px” width=”100%” name=”zohoform4″  frameborder=”0″ scrolling=”no” src=”http://creator.zoho.com/showForm.do?formLinkId=4&link=true&sharedBy=amitkumar&privatelink=Ww8uHd79Uw66GYf92RgxrGqrpV1rn24EvGnG1HwWR9GVSsj6deVqtOhhkeU4jOKkMjnRaWsE5uA2nVCaqGNqjbTKGHUQOggZaPMa”></iframe>

<iframe height=”608px” width=”100%” name=”zohoform4″ frameborder=”0″ scrolling=”yes” src=”http://creator.zoho.com/showForm.do?formLinkId=4&link=true&sharedBy=amitkumar”></iframe>

Thank you for giving your precious time.

Compiler: Childhood

Compiler

A compiler is a specialized computer program that converts source code written in one programming language into another language, usually machine language, so that it can be understood by processors.

Source code is the version of software (usually an application program or an operating system) as it is originally written by a human in plain text.

The first Compiler 

The first compiler was developed in 1952 by Grace Hopper, a pioneering computer scientist. She said that she invented it because she was lazy and wished that “the programmer may return to being a mathematician.” This compiler is for the A-O programming language.

How First Compiler Worked

Admiral Hopper and her team extended the improvement on binary code with the development of her first compiler, the A-O. The A-O series of compilers translated symbolic mathematical code into machine code, and allowed the specification of call numbers assigned to the collected programming routines stored on magnetic tape. One could then simply specify the call numbers of the desired routines and the computer would “find them on the tape, bring them over and do the additions. This was the first compiler,”  

Later Improvements

Admiral hopper moved forward with the development for Univac of the B-O compiler, later known as FLOW-MATIC. It was designed to translate a language that could be used for typical business tasks like automatic billing and payroll calculation. Using FLOW-MATIC, Admiral Hopper and her staff were able to make the UNIVAC I and II “understand” twenty statements in English.

The FORTRAN team led by John Backus at IBM is generally credited as having introduced the first complete compiler, in 1957. COBOL was an early language to be compiled on multiple architectures, in 1960.

Compiler Structure and Operation

Compiling has several phases. They include extracting words from the source code, analyzing the sequence of such words and checking whether they match the syntax of the programming language for which the compiler is intended. While doing this, a compiler must adhere strictly to the meaning of the program being compiled.

At the same time, it must also be able to achieve the following goals, which are to some extent mutually exclusive, according to priorities set by the programmer: (1) maximize the speed of the compiled code, (2) minimize the size of the compiled code, (3) maximize the speed of the compilation process (i.e., compile-time efficiency), (4) maximize the debugging ability of the compiler (because most programs do not run optimally the first time they are compiled) and (5) maximize the useful feedback (i.e., reporting errors back to the programmer).

One key to simplifying the compiler development process has been the adoption of a three stage design. The first stage, called the front end, translates the source code into an intermediate representation. The second stage, referred to as the optimizer, optimizes the code according to the various switches on the compiler set by the programmer. The third stage, the back end, produces code in the output language. This structure allows either the front end to retarget the compiler’s source code language or the back end to retarget the output language, thereby making compilers more portable (e.g., for multiple dialects of a programming language).

After compilation, the object code must be linked with any required libraries of supporting routines by the linker before it is capable of being executed. The compiler usually invokes the linker automatically.

Any Query

Create a Database using ZOHO platform. It can be done by pasting spreadsheet data into the table. Our database table would look like

Employee Table

Department Table

After creating a database we can update, delete and request information from databases. And to do this we have to run a query using SQL.

There are some standard SQL commands such as “Select”, “Insert”, “Update”, “Delete”, “Create”, and “Drop” which can be used to accomplish almost everything that one needs to do with a database. Writing command in this language is generally simple as it is basically English like language. We just need to stick to some conventions of the language.

So let’s start with simple command which can show us first name, last name , Salary and designation of the employee.

Select “LastName”,”FirstName”,”Salary”,”Designation” from “Employee”;

Let’s Make it little Complicated by including condition to show data of only those employees whose designation is either ‘Manager’ or ‘secretary’; to do this our command would be

Select “LastName”,”FirstName”,”Salary”,”Designation” from “Employee” where “Designation”=’manager’ or “Designation”=’secretary’;

And it output will be

Designation

 

There is one important command in SQL which can join data from two tables. If we want to join the information from Employee table to Department table then this command is very useful. As if we want to see, employee ID, last name, first name from the employee and department name and location in which he/she works we use this command to join the data from these two tables. The command is as simple as English language.

Let’s see how it works

SELECT “Emp_ID”, “LastName”, “FirstName”,”Dept_Name”,”Location” FROM “Employee”,”Department” where “Employee”.”Dept”=”Dept_ID”;

This command will throw a table like this

Join

The best thing of this kind of data model we can use multiple conditions of SQL language to get more refined and more specific result. Let’s take an example that you want the employee ID’s , first name, last names and designations of employees whose designation is manager or his/her salary is more than 15000 or his name is Rahul. This task looks difficult in general but writing a SQL command for this task is as simple as it is writing it in English language with some use of logical statements. Have a look at this also

SELECT “Emp_ID”, “LastName”, “FirstName”,”Designation” FROM “Employee” where “Salary” >15000 or “FirstName”=’Rahul’ or “Designation”=’Manager’;

It’s output is

Multiple_Cond.

I think that’s all for the time being.

Database design is important in business software development since virtually every business application uses a database management system. Databases have to be normalized to the third normal form (3NF) when relational database management systems are used. Databases not normalized to 3NF will stumble upon insertion, deletion, and updating anomalies.

Here I am presenting a 3rd Normal form of Library Information system.

Attributes:  Roll No., Name, e-mail Address, Phone No., Late  fine outstanding, Book title, Book Author, Book ISBN, Book Price, Library catalogue No., Quality of copy, Date Issued, Date of Return.

Entities:  Account, Member, Book, Title, Issue

Account   
Library ID  PK
Roll No. FK
Late Fine Outstanding  
   
Member  
Roll No.  PK
Name  
E-mail Address  
Phone No.  
   
Book  
Catalogue No.  PK
Library ID FK
Book ISBN FK
Quality of Copy  
Issue ID FK
   
Issue  
Issue ID PK
Date Of Issue  
Date of Return  
   
Title  
Book ISBN PK
Book Title  
Book Author   
Book Price  

MY Off day

One Day when I am enjoying my off day at home, my cousin Ankit who was studying in school came to me. And he asked some interesting questions about system architecture.

Ankit: These days we are studying about system architecture but I am not getting what it is?

I: System architecture is the design or set of relations between the parts of a system; it is about designing a system according to the needs of the user. It is about fitting data and applications in a logical way according to the need of the user.

Ankit: This is what I am reading all these days but I am not been able to understand it, can’t you describe it in any other way?

I: Let’s take it in a simple way. Let us take an example of building a home, we would first lay out the floor plans, grouping each room by function and placing structural items within each room according to their best utility. What it is? It is architecture. Similarly, moving from home design to IT system design does not change the process. Grouping data and processes into information systems creates the rooms of the system architecture. Arranging the data and applications for the best utility is the result of deploying architecture.

Ankit: Now I am getting a little bit of it. Are there any rules of building it?

I: Yes. The basic principle is that, data must be logically distinct from applications i.e. data must not be embedded within the application.

Ankit: How we distinguish between different types of system architectures?

I: They are differentiated on the basis of arrangement of data and applications within the system.

Ankit: Can you tell me about different types of architecture.

I: ok, basically we divide architecture system into single tier, two tier, three tier and multi tier. In single tier data and applications are physically on the same device but they are logically separated. In two tire architecture data and applications become physically distinct i.e. data stored on server and applications are stored on individual machines. In three tier system, we even separated business centric applications from general application. The main business application is stored on one central system and user interface on individual machines. The main benefit of doing this is that it reduces data transfer over the network. We can even upgrade this system to multi tier architecture by connecting it to internet.

Ankit: I think that’s more than enough for me. Otherwise I will go crazy.

I: I also feel the same way. Do you want to join me for a cup of tea?

Ankit: of course.