Indeed, they can.
Databases run on [server] host machines.
Every host machine has a Name.
Every host machine has an I.P. Address.
These two are, largely, interchangeable.
Say you have a database server machine called "aardvark", with I.P. Address 12.23.34.45. You use this server for Development work.
Say you also have a Production database server called "P05M6345", with I.P. Address 23.34.45.56.
Neither of these are particularly meaningful to you when try to work out
which one to connect your Development software!
A DNS Alias allows you to give multiple "names" to the same I.P. Address.
So you could create two aliases:
myApp-Devt -> 12.23.34.45 (aardvark)
myApp-Prod -> 23.34.45.56 (P05M6345)
Now, you use these names in your application configuration.
Also note that when your current Production machine is replaced by a newer. shinier one (it happens!), you simply move the DNS Alias (myApp-Prod) to point to the new Server. Nothing else needs to change!
myApp-Devt -> 12.23.34.45 (aardvark)
myApp-Prod -> 34.45.56.78 (P05M10872)
Regards, Phill W.