To give a simplified but more constructive answer, you'd have some server side code that reads from the database and outputs JSON:
[ {x: 123456, y:123456, attribute1: "blah"}, ... ]
Then load it like this:
var params = {param1: "foo"};//params needed by the serverside file
$.get('load-data.php', params, function(data) {
var graphic;
$.each(data, function(key, val) {
graphic = new esri.Graphic(new esri.geometry.Point(val.x, val.y, map.extent.spatialReference), yourSymbol, {"attribute1": val.attribute1}, yourInfoTemplate);
map.graphics.add(graphic);
}
});
Not tested, HTH.