Compare DB2 - IMS/DB



IBM's hierarchical database management system with a Database Manager (IMS DB) and a Transaction Manager(IMS DC)

Compare DB2 - IMS/DB

Postby ranga_subham » Wed Oct 19, 2011 3:54 pm

Hi,

Can we make comparisons between DB2 and IMS/DB? Is each table in DB2 called segment in IMS/DB?

Please explain.

Thanks.
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Compare DB2 - IMS/DB

Postby dick scherrer » Wed Oct 19, 2011 10:57 pm

Hello,

No, not directly.

You could extract the data into sequential files of the same layout and compare these.

DB2 is relational - IMS is not. Suggest you not try to equate one to the other.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Compare DB2 - IMS/DB

Postby Ed Goodman » Thu Oct 20, 2011 9:23 pm

Hmmm.. tough question!

Imagine a very simple data situation: departments with people.
Each department has unique attributes, like address and budget
Each person has unique attributes, like name and hire date

In a relational database, you might break this up to have:
-a Department table, with one row per department, each row having address and budget fields
-a People table, with one row per person, each row having name and hire date
-an Xref table with each row department and person combination

In IMS, you might break this up to have:
-a Department database, with one root segment per department, each segment having address and budget fields
-a People database, with one root segment per person, each segment having name and hire date fields

Here's where the differences start to show:
In IMS, you can show the relationships between the two tables a few different ways
-add child segments under the Department roots, each segment POINTING to a Person root
-add child segments under the Person roots, each segment POINTING to a Department root

- OR -
-create an XREF table with Department/Person combinations

Now, the real difference is how you go about gathering information.
In the relational model, you join your tables and run your reports and queries from the result tables.
In IMS you start reading the one table, then go out and get the information from the other tables as needed.

The real power of IMS comes to light in more complex systems, where you can hang all of the related information about a department directly under that department's root in the database. It's kind of like you've "pre-joined" that relationship, kind of. You can find almost everything you need about that department in one place, without having to join it all together every time.

For example, in our system, we have personal assets stored under the person. We also have employment history stored under that person...and insurance coverage...etc. So all I have to do is jump to that person's root segment, then read through their information. It's already "joined" to them.

Now...this implies that when that information was added, we knew how it was going to be retrieved most of the time. If we knew were were going to have "show me all the insurance coverage in the system" type requests, we would have made that a separate table with pointers into the People table.
Ed Goodman
 
Posts: 341
Joined: Thu Feb 24, 2011 12:05 am
Has thanked: 3 times
Been thanked: 17 times

Re: Compare DB2 - IMS/DB

Postby Anuj Dhawan » Wed Nov 23, 2011 2:39 pm

I've worked with both. My experiences says, IMS is faster than DB2 and data recovery is basically automatic. Before the invention of IMS, a lot of shops used VSAM which behaves almost like a sequential file - only with keys. This created a lot of data redundacy. IMS was developed for the first moon project. It was not originally an IBM project. To cover it in short, IBM got into the picture and millions of started using it, people came online.

So if you think of it this way, IMS is the child of VSAM - DB2 is a close relative.

Just my .02$...
Anuj
Anuj Dhawan
 
Posts: 273
Joined: Mon Feb 25, 2008 3:53 am
Location: Mumbai, India
Has thanked: 6 times
Been thanked: 4 times

Re: Compare DB2 - IMS/DB

Postby Akatsukami » Wed Nov 23, 2011 4:29 pm

IIRC, IMS antedates VSAM by several years.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Compare DB2 - IMS/DB

Postby dick scherrer » Thu Nov 24, 2011 1:22 am

Hello,

IMS is over 40 now.

I remember when we "upgraded" from ISAM to VSAM in the mid-70's.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to IMS DB/DC