What is TNS?
TNS is part of Oracle NET, a tool dedicated to managing and configuring Oracle Database and client connections, and in most cases the client and database must be configured for TNS, but in rare cases, you can connect to an Oracle database without having to configure TNS. For example, through JDBC. If you connect to Oracle through TNS, the client must install the Oracle clients program.
When to use TNS
As mentioned above, the non-JDBC and other ways to connect to Oracle need to use TNS, in addition to the local database client connection data when the host string is the local specified service name, not the database SID, this needs to be noted. Client software that needs to specify TNS has PL/SQL, sql*plus
Above said in the non-JDBC and other connection mode with TNS, so in other words, JDBC and other ways to directly connect data without the configuration of TNS, such client tools such as SQL Developer. These clients are using some development voice such as Java and other JDBC way to connect the database, so do not configure TNS to operate.