Defined constants have global scope, and cannot be changed in the script. Therefore they ought to be data that meets those criteria: globally used values that will not need to change. For your example, I would say define is more appropriate (though I would use more specific naming, like "DB_USERNAME" - also the naming convention for constants is all caps).