That is a pretty vague question. You'd need to know what database and you may have to reverse engineer the protocol to communicate with the database.

Cost... time?