Page 1 of 1

DB2 vs.IMS.

Posted: Mon Oct 06, 2014 12:36 pm
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.

Re: DB2 vs.IMS.

Posted: Wed Oct 08, 2014 9:32 am
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.

Re: DB2 vs.IMS.

Posted: Wed Oct 08, 2014 10:43 pm
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! :)

Re: DB2 vs.IMS.

Posted: Mon Jul 13, 2015 2:14 pm
by Ancilin N
Thanks Anuj. We have parent and child tables in DB2 and have a similar wordings in IMS too, are they similar?

Re: DB2 vs.IMS.

Posted: Tue Jul 14, 2015 5:41 pm
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.