Whenever you are communicating over the network, you need following three basic things
- Protocol
- Host
- Resource
Typical example would be
Where http - protocol
docs.oracle.com - host
index.html the resource
Similarly other example would be
So in general, a resource can be represented over the network as follows
[PROTOCOL]:[HOST][RESOURCES]
Extending the same to the JDBC URL you have mentioned
jdbc:oracle:thin:@localhost:1521:XE
jdbc:oracle:thin - specifies protocol which in turn indicate which driver is to be used. So every driver has its own protocol to communicate with database server.
localhost:1521 - is Host
XE- is the resource which is to be accessed.