I've been studying databases and rest APIs lately and I have a question about the relationship between the two.
Imagine I have a database with three tables, STUDENTS, ENROLLED, and CLASSES.
STUDENTS and CLASSES denote the entities students and classes, whereas the ENROLLED table denotes their relationship.
If I were to map this dataset in a rest api, would I just have 3 different CRUD routes with the three tables, eg ('/students', '/classes', '/enrolled')?
And that question goes for REST APIs in general -- when you write/make a REST API, are you just constructing a 1:1 mapping of your database?
Thanks so much in advance-- just trying to really nail down my conceptual understanding of the relationship between the two.