DB2 vs.IMS.

All sort of Mainframes Interview Questions.
Post Reply
Ancilin N
New Member
Posts: 3
Joined: Sun Jul 27, 2014 12:59 am

DB2 vs.IMS.

Post by Ancilin N »

Hi,

What are the differences between DB2 and IMS ? Which database do you choose if you are given a task to design a database schema and choose the database between IMS and DB2 to maintain some data which is not in the system till now?

Assume that you don't face any issues whether you choose IMS or DB2 for your new database.
User avatar
Anuj Dhawan
Founder
Posts: 2801
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: DB2 vs.IMS.

Post by Anuj Dhawan »

What are the differences between DB2 and IMS ?
Between IMS/DL1 and DB2 - One is a "RECORD oriented" DBMS while other is a "SET ORIENTED" . DB2 is a relational database where, from a user point of view, everything is perceived as if the data is arranged in 'tables' - in rows and columns -- however, as a programmer, you don't need to "know" how's the data is stored physically (and No, it's Not in tables) though you need to know what a given data stores. On the other hand, in IMS you need to know the "hierarchy" of the data and that's one of the reason why it is called hierarchical database.

Said that - now, hopefully, you understand that DB2 is relational database while IMS is hierarchical database.

For your second question - I'll reply a little later.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
User avatar
Anuj Dhawan
Founder
Posts: 2801
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: DB2 vs.IMS.

Post by Anuj Dhawan »

Ancilin N wrote:Which database do you choose if you are given a task to design a database schema and choose the database between IMS and DB2 to maintain some data which is not in the system till now?

Assume that you don't face any issues whether you choose IMS or DB2 for your new database.
IMS is more appropriate for applications where the functions you will perform on the data are well-understood and known to you before hand - as I said earlier, you know the ins-and-outs of the database structure; DB2 is better for applications where you know what output you look forward to -- IMS thus demands much more planning and understanding of the applications (and the business) for successful implementation.

As you know, IMS is a hierarchical which means that parent-child relationships are faster for sequential traversing. For example, if you need all children for parents whose ages are between 30 and 40. A relational database system cannot automatically satisfy such a request by the nature of the table structure. It must be done using program code of SQL joins and its siblings.

However, given the same scenario and if you wanted to find all children with age between 5 and 15, DB2 is much easier to use (and probably will be efficient enough too ) as it only needs to maintain position in the child table and does not have to traverse the tree back up to find the parent table (key). And so DB2 should be a choice.

Well, long story short - it all depends! :)
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Ancilin N
New Member
Posts: 3
Joined: Sun Jul 27, 2014 12:59 am

Re: DB2 vs.IMS.

Post by Ancilin N »

Thanks Anuj. We have parent and child tables in DB2 and have a similar wordings in IMS too, are they similar?
User avatar
Anuj Dhawan
Founder
Posts: 2801
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: DB2 vs.IMS.

Post by Anuj Dhawan »

No, they are not similar. Only the spelling is same!

Parent and child in the IMS describes the hierarchical orientation of the segments wile in DB2 it's about the relationship between the two tables like referential integrity etc.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “Interview Questions.”