mysql - Relationship between REST API & Database -


i've been studying databases , rest apis lately , have question relationship between two.

imagine have database 3 tables, students, enrolled, , classes.

students , classes denote entities students , classes, whereas enrolled table denotes relationship.

if map dataset in rest api, have 3 different crud routes 3 tables, eg ('/students', '/classes', '/enrolled')?

and question goes rest apis in general -- when write/make rest api, constructing 1:1 mapping of database?

thanks in advance-- trying nail down conceptual understanding of relationship between two.

cheers!

http verbs used crud operations while writing/ making rest api not constructing 1:1 mapping of database.

rest can have hypermedia controls. if wants to doctors appointment first needs available appointment slot , using appointment slot can make request make appointment. while delivering available appointment slot can send url booking slot.

read - http://martinfowler.com/articles/richardsonmaturitymodel.html


Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -