DSA & Databases homework