This is an architectural question on MVVM architecture working with SQL databases, specifically SQLite. Articles I have read on MVVM present the model as a class with a set of properties. That closely identifies with a table row definition in an SQL table.
- SQL database calls often operate on multiple rows. In that case is the model a single row or multiple rows in a list?
- In SQL databases the tables may be explicitly linked with foreign keys. That information would seem pertinent to a model. Do models in MVVM somehow capture or represent such links. That information is particularly needed when hooking databases together.
Young programmers are often all over the map on how they address these issues. How do you think these should be addressed?