An online database is needed when a user needs to retrieve any data they have submitted to a web site. An online database is also the best way to display the same data set different ways on demand on the client---without regard for the client's capabilities apart from HTML display. Finally, an online database seems to be the best option when its file-based equivalent gets too "big": One massive database "file" (drive partition) is easier to deal with than thousands of small static text files.
These are the only cases that I can think of where an online database is absolutely necessary. Any other use seems to be a matter of cultural or historical influences on the designers.