What is the difference between vsam & data base tables?what is flat file ? difference between flat files,vsam,ps files?what is the difference between esds,ksds?what is rrds in vasm ? difference between rrds & ksds?application areas of rrds files in mainframe area?

Showing Answers 1 - 12 of 12 Answers

Difference between VSAM and Database Tables

There is a simple difference in these two is that on VSAM file we can not run the SQL queries and in VSAM files there are not any kind of relation. And we can not define VIEWS and SYNONYMS on VSAM files.

But in case of Table we can rum SQL queries, we can fetch data efficiently then VSAM files. Also the relational data bsae concept is applicable in DB2 databsae not in VSAM files. We can define ALIAS, VIEWS on these table to share customise data.

What is flat file?
Physical Sequential, GDG  files are called flat files. We can not read data from these files dynemicaly from these files. Only we can fatch data in sequentialy from these files.

Difference between Flat files, VSAM, PS files?
Flat file and PS files are same, In case of KSDS /RRDS/ESDS files we can read data randomly or dynamicaly usin KEY/ RRN/RBA.
 
What is the difference between ESDS, KSDS?
ESDS: entry sequential data set ->  we can not physicaly delete the record from the middle from the dataset only we can deactivate the record,in esds we can use RBA for fetching the data randomly

KSDS: key sequential data set -> we can define key field in these data set/ we can define freespace/ we can define alternative index in KSDS.

Ans1) DB tables are preferred when we want to maintain relationship amoung data. If no relationship is required then we can choose any. Remeber DB2 tables are always stored in VSAM files.

Ans2)Flat file is a sequential file stored in Tapes.

Ans3)*In ESDS delete is not possible but records can be rewritten.
         *Write appends the data after the last record.
         *Only sequential read is possible.
         *Access based on Relative Byte Addrress.
         *Has not Index component.

Ans4)*Not AIX is possible in RRDS
         *Access is based on Relative Record Number ie. Displacement of the record    
           based on the 1st record in the file.
         *RRDS consists of fixed length slots for records, so CI split is not possible.
         *Has no index component.
         *Best suited for random access as opposed to KSDS which is best suited 
           for skip-sequential.
         *After deleting a record, the freespace is not regained.
         *Even with reorganization of RRDS file with IDCAMS Util, freespace is not gained
           because slots are of fixed length.

  Was this answer useful?  Yes

Rishu

  • Aug 1st, 2014
 

VSAM is a Non-Relational database system while DB2 is a relational Database System(RDBS).

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions