Want Some Hints on C3M2 Assignment: Social Network Database Fix

Maybe this whole assignment is about reverse engineering. To use the results of the unit tests to deduce the content of the Person table:

Chain of reasoning:

  1. The result from “unittests.test_load_dataset(load_dataset)” indicate that there should only be 10 persons in the Person table.

  2. The results from “unittests.test_get_club_members(load_dataset, get_club_members)” showed in all the clubs, there are no members with the same names.

  3. The results from “unittests.test_get_friends_of_person(load_dataset, get_friends_of_person)” showed that no person is a friend of another person of the same name.

  4. So this imply that there is some kind of constraint to be applied on Person table. However, implementing a constraint via the database schema will result in errors when calling “load_dataset()”.

  5. So it seems the constraint has to be “built into” the data loading process.

  6. Looking at the “sample data” of names provided, this array of names seems appropriate to be used to populate the two database tables Person and Club that would satisfy (1) - (3).

  7. So now it’s about the ordering of the names such that it would produce the same random choices generated by “np.random.seed(42)” used to populate the “Friendships” and “Club Members” tables.

Fortunately the initial order of names worked, otherwise we would need to search through a permutation of the order of the names. Of course we could use the LLM to produce a search program but then this becomes a totally different exercise from the intent of this assignment.

Now I wonder how it could be possible for the LLM to produce the chain of reasoning as shown above :grin: