Study of proton-proton and heavy-ion collisions at relativistic energies within a hydrodynamical framwork