A commercial project is being developed using a relational database. Suppose a client-server application. The server interacts with the database.

Question: where to store, the sql instructions that the server uses to interact with the database are stored. Is this a separate file storing them and which is loaded after starting the server? If this is a file, what is the structure and format of it?

  • which server programming language? - Bohdan Korinnyi
  • @BogdanK, Java language - bsuart
  • You have quite a few questions in one. Ideally, you should read the documentation about the terminology, and if you ask here, it’s a separate question, maybe even about each term separately. - Nick Volynkin ♦
  • @NickVolynkin, here are 2 questions: 1- what to use when (And I would like to hear the answers - the opinions of developers with experience) 2 - how interaction with DB is organized in real commercial projects - bsuart
  • one
    (1) The purpose of each of the things you listed directly follows from the definition of each of them, it is unclear what explanations you need. (2) Anywhere. If only the server had the opportunity to send instructions to the database to execute the commands it needs. You can sew in server code, you can keep it in separate files, you can keep it in separate files and macros can be sewn into code when compiling. There are no special types of files for this. that which is capable of perceiving the technology on which the server is made is used. - D-side

1 answer 1

If we are talking about Java, the instructions are “stored” inside the server as java-code. There can be both SQL queries and code that the framework uses to work with the database. An example of such a framework is HibernateORM .