In a Web application in order to fetch the data we could request the user to be authenticated first. Authentication is also done on the web server side.
What about local network application, where there is no service involved, and the application connects to database directly (database in located on a server PC). How would I do things like: this table can only be read by authenticated user, this table can only be read by all users, etc..?
You can’t connect to a database(mySQl, Oracle, SQLServer) without authentication.
Usually you would store the connection informations in a config file, but you can also not do so and ask your users to provide their own credential.
Most SGBD will let you configure read/write rights per user.