Add methods to read graphs from database.