3 ms·
I think the idea is that the stored procedures ARE an Application Programming Interface, as an alternative to a REST API. (I agree with you that for some use c
by degamad 15d ago
I think the idea is that the stored procedures ARE an Application Programming Interface, as an alternative to a REST API.
(I agree with you that for some use cases, an API consisting of a set of stored procedures is just as good as an API layered on top of the database in another language.)
- bunderbunder 15d agoThey are, but a REST API likely isn’t a good alternative because few RDBMSes speak REST. More likely they meant creating a database interface library in whatever programming language the application uses. And then have it talk to the DB through that library instead of scattering a fine mist of ad-hoc querying (or, shudder, active records) throughout your application.
- jeremyjh 15d agoThe client of the REST API is not an RDBMS. The REST API serves application clients - may be browsers, may be other services. The REST API alone talks to the database. An API that serves only backend applications could be implemented in stored procedures instead of REST or GRPC. It could also be implemented in SOAP, CORBA, DCOM and other fossils, but no one is doing that for new applications.