Pinterest clone for database class