Though the data in Db2 is stored as Vsam datasets data retrivel could be done with relational SQL statements which is very powerfull and conveneinet in retrieveing from and puttitng data in to Db2 tables;the one which lacks in case with stand alone VSAM datasets(KSDS,ESDS,RRDS etc)..
Also complex relation operations of joining sorting grouping etc can be done using the SQL which is not possible thru ordinary VSAM files .Also you could think of a code fragment which is required to retrieve data from a VSAM file and from Table.The latter looks requires less coding and is more readable and flexible.
VSAM is not a database but DB2 is a database management system . More specifically RDBMS.
The major advantage of using DB2 over VSAM is "Physical data Independence". i.e. when you use DB2 , you don't need to write relatively lower level of code involving physical charastericstics of file, read, write.... operations. This can be done via higher level language called SQL when you use DB2.
Also, data sharing and higher level of concurancy, integrity and transaction control can be achived if you use DB2.
The advantages of using DB2 over using VSAM is a huge list. Please google for the more advantages..