Showing posts with label IT Officers Exam. Show all posts
Showing posts with label IT Officers Exam. Show all posts

Wednesday, March 7, 2012

Normalization and Normal Forms - IBPS IT Officers Preparation Materials - DBMS

The Process of making a table (or often we call it as Record) NORMAL is called Normalization :P Ok in other words, we can say that the Normalization is the process of simplifying the Table :)

Good definitions... Aren't they ??? ;) But you will get Size Zero marks if you write the above definitions in exams. Lets be lil TECHNICAL.

The design method which helps us to MINIMIZE the redundancies of data (repetitions) and reduces the errors / mistakes in the table is called Normalization. 
Read More -->

Sunday, February 26, 2012

The Phases of Compiler

Read the Basics HERE


There are several Phases in compilers are there. Those are

  1. Lexical Analyser : Performs Lexical Analysis 
  2. Syntax Analyser : Performs Syntax Analysis
  3. Semantic Analyser : Performs Semantic Analysis
  4. Intermediate Code Generator : Performs Intermediate Code Generation
  5. Code Optimizer : Performs Code Optimization
  6. Code Generator : Generates Target Code 



The Symbol Table is a Data Structure which is useful to store the identifiers in the program. 

The Error Handler is useful in Detecting and Reporting the errors. 

These two are useful from the starting to the ending of the conversion. ( I mean from the starting phase to the ending phase).  

NOTE : We can group these phases into two parts.. 
  • Analysis : In which the compiler ANALYZES the given program. For this, the compiler SCANS and DIVIDES the program into parts. The first THREE phases comes under this category (shortcut : Check the names, if you can find the terms Analysis or Analiser, then that phase comes under the ANALYSIS category
  • Synthesis : In which the compiler JOINS the parts of the divided program and makes the target program. (The last two phases comes under this category)


Now lets have a look at the functionalities of all these phases. 

Lexical Analysis : It is nothing but analyzing the LEXEMs (tokens), in this phase, the compiler scans the entire program and pics the tokens and groups them.

Syntax Analysis : Syntax is nothing but the structure. It is nothing but to Analyze the structure of the program (whether it is correct or not)

Semantic Analysis : In this the compiler checks the MEANING of the program.

(Note : The above two process will execute simultaniously, so in some books they combine these two names and call the process as Syntax and Semantic Analysis)

Intermediate Code Generation : After scanning the program, the compiler generates an intermediate code (which is neither High level code nor Low level code, which looks like the Microprocessor Code)

Note : Most of the compilers generates the TAC (Three Address Code) as the Intermediate Code. It contains, maximum 3 variable, so we call it as the Three Address Code. (note : we can convert any problem into this TAC form).

it just look like, Temp1 = Temp2 + Temp3  (temporary  variables) 
       or Temp2 = Id + Temp4     etc,

Code Optimization : It helps to improve the Intermediate Code. It make assure that the target code will run EFFICIENTLY in LESS TIME ( i mean, it should give the desired output in less amount of time)

Code Generation : It is the final phase. It generates the relocatable machine code or assembly code. It takes care about the target machine and where to store the variables in the target machine. Yea ofcourse, it takes care about the ORDER of the instruction execution too.


Thats all for now Friends.. Happy Reading.. 


                                                                                                              

Compilers Basics for IBPS IT Officers Exam


Assume that you visited china to meet China's Prime minister. The meeting was arranged in a big auditorium. But now the problem is, you don't know Chinese and he too don't know your Language (say Hindi). Then what  to Do? Now you have 3 solutions.

  1. To learn Chinese
  2. To make him learn your Language
  3. Or you both should learn some other language (Like English) so that you can communicate in that language...
Now what if HE is not ready to learn your language or English??? and what if you too are Lazy enough to learn Chinese or English??? Isn't there any other solution for this problem???

There is......  If you have enough money, You can hire a person who knows your language as well as Chinese and he will work as a MEDIATOR for both of you people.. :)

Now come to our Subjects...... As we know, computer cant understand our Hais and hellos....
And we too cant understand Computer's 0's and 1's...  So how to talk to the computer and make it works according to your orders?

Can you teach English to computer? Its impossible, because its a machine. It cant understand anything except LOW VOLTAGE (0) and HIGH VOLTAGE (1)... On and Off in simple words...

We too are TALLENTED enough to use CTRL+C and CTRL+V so we are not ready to write big codes which looks like 00011 01001 110100 1001001 01001 11001 11111 0111010 101010 10101011 01111 1101010 11101 1010101  01010 n bla bla........

So what can we do now? we write a Software Code which acts as a TRANSLATOR and converts your instructions into 0's and 1's and gives them to computer and vice versa..  We call this SOFTWARE CODE as COMPILER.. Thats it :)

What exactly is the Compiler? is it a for Translating or for Debugging?
Lets go back to our Chinese Man, assume that you are communicating with him with the help of a Translator. And you have some problem with your TONGUE...  (assume)..... So, what will happn if you use  some adjectives like "Poker face and ######## (censored :P) " .
Now say, what if the Mediator translates that POKER FACE stuff as it is in Chinese???
Your relationship with the Chinese man, will collapsed and you will get some injuries if he is expert in those Chinese martial arts...

So, before going to translate your words in Chinese, your mediator (or Translator) warns you about the outcomes of your words (may be you will get kicked or killed, depends upon the intensity of your words :P) and confirms whether to translate them as they are or not...

Heare also same... Some programmer (like me) writes a program with so many errors. If the compiler translates as it is, the computer may collapse (as it cant hit you for your errors)... So the compiler warns you about your errors so that you can correct them and resubmit your program. So, the main task of the compiler is to TRANSLATE, in-order to translate an Error free program, it warns you about your errors :) 

The Technical Definition : So, technically you can say that "The compiler is a software program which converts the program written in High level language / Programming Language / User Language into the Machine Language / Binary Language to make an Executable Program. 
                                                                                                                           

Saturday, February 25, 2012

The OSI Model - Study Materials for IBPS IT Officers Exam 2013

Once there was an Organization called International Standards Organization (ISO in short). It standardized the functions of the Communications System with abstraction layer and developed a Model. They named it as Open Systems Interconnection (OSI). ISO - OSI sounds funny, isn't it???
In this model, similar types of communication functions are grouped into Layers. There are 7 layers in this Model. Those are,
  1. Physical Layer
  2. Data link Layer
  3. Network Layer
  4. Transport Layer
  5. Session Layer
  6. Presentation Layer
  7. Application Layer 
Each layer helps it's above layer to establish an error free communication, in other words, each layer depends on its below layer to establish an error free communication. 


How to remember these names????
Here the order is very important. If anybody asks you about these layers, you should start with Physical and end with Application Layer. You should not jumble these names according to your convenience. So you should remember these names with an order. Well, there are several techniques are there to remember these type of names. One of those technique is, making a funny name or sentence with the STARTING letters. Just, write the starting letters of these layers.

                                         P D N T S P A


Now make a funny sentence, here are some examples


  • Please Do Not Touch Steve's Pet Alligator  

                       Or





  • Please Do Not Throw Sausage Pizza Away 








Now I bet you never going to forget these names and order again :)

Ok, now lets have a look at the Functionalities of these Layers...


  • Physical Layer : This is the First or Lowest layer of the OSI model. It takes care about the Physical Connections.
  • Data Link Layer : This layer Encodes the data packets and provides error free node to node transmission. It is divided into two sub layers. Those are
      • Media Access Control Layer (MAC Sublayer in short)
        • It helps the computer to get the access of data transmission 
      • Logical Link Control Layer (LLC Sublayer in short)
        • It controls the order, flow and errors of the frames (Frame synchronization)
  • Network Layer : This layer helps in Switching and Routing (connecting and transmitting), and also creates virtual circuits ( Imaginary paths for transmission)
  • Transport Layer : This layer helps in providing Transparent data transmission. Its also checks whether the data completely transmitted or not.
  • Session Layer : This layer is responsible for the Transmission Sessions. I mean Starting, Maintaining and Terminating the Communication. 
  • Presentation Layer : This layer provides the data Independence ( simply you can remember that this layer is responsible for the data Presentation :) I mean, how you are presenting data (without any leakage)
  • Application Layer : This is the topmost layer, this layer directly interacts with the end user. This layer is responsible for checking whether the claimed user is genuine or not. 
          Still having problems with these functions??? Have a look at the following diagram. It will be easier for you to understand :)




Very good. Now you know about the OSI model and It's Layers :) You know that it was developed by ISO.

Hey, you know one secret? ISO dint invent any new model. It just COPIED some old model and modified it.. Thats all.

Once there was a model called TCP/IP model (Transport Control Protocol / Internet Protocol) with this name itself, you can define its functionality :) It has lil complicated structure with only  4 Layers. Those are

        1. Network Interface Layer
        2. Internet Layer
        3. Transport Layer
        4. Application Layer
ISO Just elaborated this model and divided some of these layers into EXTRA LAYERS and developed OSI model. have a look at the following Diagram, so that you can understand the difference :)




Thats all for now friends. Happy reading...



IBPS bank it officer study material pdf download 2013

Friday, February 24, 2012

DBMS Study Material for IBPS IT Officers - Data Models


Data Model means, to give a SHAPE to the data. A Data Model Makes it easier to understand the Data. We can define the data model as "The Collection of High-Level data description that hide many low level storage details". 
The Data Models are divided into THREE different groups. They are,

  1. Object - Based Logical Models
  2. Record - Based Logical Models
  3. Physical Data Models

1. Object Based Logical Models :  These are used in describing data at Logical Level and View Level. ( Logical level describes what data are stored in the database and what relationships exists among those Data. This logical level is used by the DBA (Data Base Administrator). He must decide what information is to be kept in the Data Base. The View level describes Only part of the entire database to be viewed by the user of the database hiding the details of the Information Stored. 


The Object based logical models are described in the different following models.


  • The E-R (Entity-Relationship ) Model
  • The Object-Based Logical Model
  • The Semantic Data Model
  • The Functional Data Model
E-R Model : The entity is a "Thing" or " Object" in the real world that is distinguishable from other objects. The E-R model is based on the collection of basic objects called Entities and the Relationship among them. Consider the following Diagram.



In the above diagram, RECTANGLES represents ENTITIES, DIAMONDS represents RELATIONSHIP among those ENTITIES. LINES represents links of Entities to Relationships. 

Object - Oriented Model : The Object Oriented model based on a collection of OBJECTS. An object contains values stored in Instance Variables and Bodies of Code that operates on the Object. (These bodies of Code is called Methods).
Objects that contain the same types of values and the same methods are grouped together into classes. (A class is the definition of the object). 

Semantic Data Model : A Semantic data model is a more high level data model that makes it easier for a user to give Starting Description of the data in an organization. (Semantic is nothing but the Meaning). These models contain a wide verity of relations that helps to describe a real application scenario. A DBMS cannot support all these relations directly. So it is build only with few relations known as relational model in DBMS. A widely used semantic data model is the Entity-Relationship (ER) data model which allows us to graphically denote entities and relationship between them.

Functional Data Model : The functional data model makes it easier to define functions and call them where ever necessary to process data. 

2. Record - Based Logical Models : 
In this type of models, the data is kept in the form of RECORDS (documents). Thse models describes data at Logical and View Levels. When compared with Object Based Data Models, the record based logical models specifies the overall logical structure of the database and provides higher-level implementation. 
These are of 3 types. Those are,
  • Relational Model
  • Network Model
  • Hierarchical Model
Relational Model : The relational model represents both Data (entities) and Relationships among that data in the form of Tables. Each table contains multiple columns and each column contains a unique name. Have a look at the following table. 


Network Model : Data in the network model are represented by collection of Records and Relationships among data are connected by LINKS. These links can be viewed as Pointers. Have a look at the following diagram.


Hierarchical Model : This is also same as Hierarchical model, the difference is the records in the database are represented in the form of TREES (in Hierarchical way)


3. Physical Data Models: Physical data models are used to describe data at the lowest level, which explains how the data is actually stored using complex low-level data structures. Actually, the physical data models are rarely used.

There are two types in Physical Data Models.

  • Unifying Model
  • Frame-Memory Model