Showing posts with label DBMS. Show all posts
Showing posts with label DBMS. 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 -->

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


Thursday, February 23, 2012

Data Base Users and Administrator - IBPS IT Officers Special

Read Basics HERE

Depeending on their degree of expertise or the mode of their interactions with the DBMS, The Data Base users (people who uses database) can be classified into several groups. 
They are,

  • Naive Users
  • Online Users
  • Application Users
  • Sophisticated Users
  • Specialized Users
Naive Users : Naive means Lacking Experience, these are the users who need not be aware of the presence of the Data Base System. Example of these type of users is The user of an ATM machine. Because these users only responds to the instructions displayed on the screen (enter your pin number, click here, enter the required money etc). Obviously operations performed by these users are very limited. 

Online Users : These are the users who may communicate with the Data Base directly via an online terminal or indirectly via a user interface and application program. These users are aware of the presence of the Data Base System and may have acquired a certain amount of expertise within the limited interaction they are permitted with a Data Base.

Application Programmers : Professional / Application programmers are those who are responsible for developing application programs or user interface. The application programs could be written in a general-purpose programming language or the commands available to manipulate a database. 

Sophisticated Users : Simply we can say that these are the EXPERIENCED users. These people interact with the system without writing programs. Instead they from their requests in a database query language. They submit each such query to a query processor, whose function is to break down DML (Data Manipulation Language, the language which is used to MAINTAIN the data. we shall discuss about this later) statements into instructions that the storage manager understands. Analysts who submit queries to explore data in the Data Base fall in this category. 

Specialized Users : These are the sophisticated users who write specialized database applications that do not fit into the traditional data-processing framework. Among these applications are computer - aided design systems, knowledge-based and expert systems, systems that store data with complex data types (Ex, Graphics Data and Audio Data) and environment-modeling systems.

DBA (Data Base Administrator) : The person who controls both Data and the Programs that access that data in the Data Base is called the Data Base Administrator (DBA).

Functions of the DBA are,
  • Defining Schemas (arrangement of Data)
  • Creating Storage Structure and Access Methods ( I mean how to store data and access that)
  • Modifying the storage Data
  • Granting Authorization Permissions
  • Specifying the CONDITIONS of the data storage
  • Periodically Updating the Data Base etc.,


Read complete study materials of IBPS IT Officers Here

Tuesday, February 21, 2012

The Transaction Management - IBPS Specialist Officers Study Materials



Asume that you want to transfer some money (Say Rs. 1500) to your friend's account....


You logged in into your bank's site and types your account number.

Later you typed your friend's name and his account number

Later types the amount and clicks on TRANSFER button.

Later???  Rs. 1500 /- TRANSFERS into your friend's account.

Now lets see this process in DBMS's point of view.

YOu entered some money (Rs 1500). The DBMS checks whether the mentioned money is available in your account or not.Assume that you have some 3000 in your account.

If available then it checks the reciepient's Account (Assume that he has Rs. 200 in his account)

Later the DBMS reduces your amount to Rs 1500 and Adds that 1500 to your friend's account.
And makes his account balance as Rs 1700 ( 200 + 1500).

Then shows you a message, something like "TRANSACTION COMPLETED"

yes, this is an example of Transaction.

A transaction is an execution of a user program and is seen by the DBMS as a series or list of actions. (or simply we can remember it as " A transaction is nothing but a List of Actions". These actions include the reading and writing of database.

ACID Properties (important) :
 These are the properties that a transaction should possess in order to avoid failures during concurrent access to a database. The ACID is an acronym which stands for Atomicity, Consistency, Isolation, Durability. Now lets have a look at these properties in detail. Ofcourse, for beginers these all may look same and confusing, read them two or three times. then you can get the exact meanings and differences among them...

  • Atomicity : It ensures that the transaction either is executed completely or not at all. Incomplete transaction consequences are not entertained, check an example
    • Assume that Shivani has Rs. 500/- in her account and Palvi has Rs. 200/- in her account. Now Shivani transfers an amount of Rs. 50/- to Palvi. A transaction debits the amount from shivani's account, but befrore it could be credited to palvi, if there is a failure, then transaction would stop. So finally Shivani loses Rs. 5o but palvi cant get the amount. This leaves the data in an inconsistent state. If there is a failure during transaction execution , then measures must be taken to get back the data in a form which was in, before transaction (I mean, the 50 shouldnt be deducted from Shivani's account in our case). This is taken care of by transaction management component.
  • Consistency : The data in the database must always be in a consistent state. A transaction occurred on a Consistent data should end with the data with another Consistent stage after completion of that transaction. Take the above case, the total of the amounts of Shivani and Palvi are (500+200) is Rs 700/- So, after the Transaction completed, the total amount should be same. i.e., (450+250 = 700). Ofcourse, in intermediate stage, where the amount is deducted from Shivani's account but not yet credited to Palvi, the total would not be same. It is the responsibility of DBMS.
  • Durability : Durability ensures that the data remains in a consistent state even after the FAILURE. (This is ensured by keeping copy of the old data in the Disk, till the transaction is COMPLETED). I mean, if shivani is transfering money to Palvi. The money is deducted frm Shivani's account and power gone (before adding the MONEY to palvi's account). Then our DBMS shouldn't save that transaction. This is called Durability.
  • Isolation :  All transaction must run in Isolation from one another. I mean, each and every transaction should be kept unaware of other transactions and execute independently. The intermediate results shouldnt be available to other transactions. 


Read Complete Set of Study Materials and Previous Papers of IBPS IT Officers Here

IBPS IT Officers Study Materials

Sunday, February 19, 2012

Data Base Management Systems (Introduction)

Friends, in this post we shall discuss the basics of DBMS (Data Base Management Systems) which will be helpful for you for IBPS Specialist Officers Exam (IT Officers). 

Before going into details, lets have a look at the basic terminology of DBMS.

Data :  Data is the raw material from which Useful Information is derived. The word data is the Plural form of Datum (but nowadays, people commonly using data for both singular and plural). 
               Simply we can say that, data is a collection of unorganized  facts, but can be made organized into useful information.
Read More -->