All Questions
18 questions
3
votes
1
answer
140
views
Strategies for Adapting SQL-Based Data Retrieval to a Newly Introduced REST API in a Short Timeline
I'm in a pickle following a recent executive decision by our parent company. They have elected to abstract away our SQL data warehouse, transitioning to a REST API for data retrieval. The purported ...
2
votes
2
answers
214
views
Do RESTful endpoints elminate the need to SQL triggers?
Do RESTful endpoints eliminate the need to SQL triggers?
Triggers are supposed to execute after a certain event. Would moving to RESTful api endpoints conceptually eliminate the need for SQL triggers?
...
2
votes
0
answers
40
views
Populating form options in dynamic web form
I am looking for advice on database design for a web app I am building.
In the web app (Angular, REST API, Oracle SQL database), I am constructing a web form dynamically. I chose dynamic form ...
2
votes
2
answers
141
views
Displaying various subsets of content stored in a database
I am looking for advice on database design for a web app I am building.
Part of the website needs to display content from a SQL database dynamically depending on the component's context. To be more ...
1
vote
2
answers
519
views
How to manage primary keys in CQRS
I'm building a backend following the CQRS pattern and I don't know how to manage properly the primary keys (surrogate keys) between the command and query databases.
For example: I have a model with ...
2
votes
2
answers
235
views
Should POST and PUT handlers do pre flight check for 404?
When implementing GET on a resource is makes sense to respond with 404 if the resource cannot be found. For POST and PUT verbs it is a little more complicated.
To respond with 404 in that case I ...
-2
votes
1
answer
413
views
Generate HTTP RESTful server from database schema
Today the job of most Java-based servers is to translate HTTP requests into SQL commands/queries and send a JSON-ed response back to the client. That's a pretty generic (and honestly boring) job.
I ...
7
votes
4
answers
4k
views
Why can't clients query the DB directly using SQL?
Given that a lot of modern web applications just consume JSON data from the sever, what is the point in having a REST api at all instead of just using SQL's query language?
Nowadays people are ...
1
vote
1
answer
176
views
Developing SQL <-> REST Adapter
This is a very conceptual question and looking for advice or examples you may know about. I'm just getting back into development after a very long hiatus in a sales career, so please excuse me if my ...
3
votes
1
answer
291
views
Is it normal to have a SQL heavy backend for a web app's REST API?
I'm building my first PHP web app with AngularJS as the front end and utilizing Slim to create a REST-like API for the web app to interface with. I'm finding that the majority of my code I'm writing ...
2
votes
1
answer
893
views
REST API - Eager loading nested resources
I would like to know if I am correctly eager loading nested resources in my API.
In my app, companies can have many technologies, and tools. The relationship is stored in the join tables ...
3
votes
1
answer
1k
views
More scalable alternative to a transaction-per.request in a SQL+REST stack?
I'm new in web programming with SQL database. So please forgive my ignorance.
I'm using some modern framework to make a REST server with a SQL database. I'm using transaction only when I think I need ...
0
votes
1
answer
1k
views
Relationship between REST APIs and Databases [duplicate]
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 ...
50
votes
3
answers
45k
views
Why does convention say DB table names should be singular but RESTful resources plural?
It's a pretty established convention that database table names, in SQL at least, should be singular. SELECT * FROM user; See this question and discussion.
It's also a pretty established convention ...
33
votes
7
answers
137k
views
What is faster? Using REST API or querying a database directly?
What is faster performance wise? Creating a REST API and having your web app use the REST API to do all interactions with your database OR querying your database directly (i.e. using whatever typical ...
9
votes
1
answer
9k
views
How to translate SQL query into REST API requests?
Let's say I have a machine-readable description (such as in WADL, Swagger or RAML) of a REST API that provides interface to a database.
My users submit queries about underlying database in form of ...
0
votes
2
answers
269
views
Working with data and meta data that are separated on different servers
While developing a product, I've come across a situation where my group wants to store meta data for data entry forms (questions, layout, etc) in a different database then the database where the ...
1
vote
1
answer
1k
views
Database data structures for RESTful api
I am creating a RESTful API. I am struggling to decide on the best way to design my database tables around my resources.
Initially, I though a table per resource would be a good way to go, but I'm ...