Open BasilBibi opened 5 years ago
I have a comment about this: if we change the PKs to auto-incrementing, while that is all well and good, won't we have to change the JSON as well?
That's a great observation Sufi and well done for pushing back on the issue to get more clarification. To be clear it is typically when we store things in a relational database that we declare primary and foreign keys in the table DDL. Json is really just a way of serialising data that it can be passed between systems. In reality we would not build json daos because we would take the json and either use it immediately (see your work on the OxfordOnlineDictionary) or we would use the json to populate a relational or columnar (more on that at some future stage) database. I wanted you to build json daos first because that are easy and because it would help cement (pun intended) the OO concepts you have learned about abstract and concrete classes, polymorphism, encapsulation and inheritance.You also got to see some of the weaknesses of OO - the json daos are forced to implement methods that are 'inappropriate' for them e.g. create_customer
This article should be a big help : Using PostgreSQL SERIAL To Create Auto-increment Column
Definition Of Done