Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

8
  • 3
    Just realised you said MySQL not MS-SQL but most of this stands Commented Apr 17, 2020 at 14:27
  • 3
    It should be notes that an API can be provided by wrapping the actual tables in views and using update triggers and stored procedures for updates. That way if the underlying schema changes, the definitions can be updated so that old queries still work while new views are added that include the new functionality. Whether it's better than a separate service on top of the database depends on relative complexity of the queries and high-level operations. Commented Apr 18, 2020 at 20:47
  • 2
    @JanHudec but realistically, if you give users the ability to write their own queries, you have zero chance of making sure all "old queries" will work, because you have no idea what they are. People can do very stupid stuff. Commented Apr 19, 2020 at 5:26
  • 1
    @Nelson, if you only give the users access to views, then you can keep the schema they see the same by adjusting definition of the views to any changes in the underlying tables which the user does not see. It is also not true you have no idea what the queries are, because you see the slow ones in the slow query log and can enable the full query log if you need to check them. Commented Apr 19, 2020 at 11:17
  • 1
    @gerrit - I don't have any figures on this. Informally it's become less common. Partly because thick clients may use a web service back-end - Microsoft has been pushing that for 20 years now. But moreover, internal apps are now often web apps. Certainly you still get some direct database thick clients. I changed job a few years ago so haven't done any internal tests for 3 years now. Commented Apr 19, 2020 at 21:28