Topic: Another question about databases

Hi everyone, I've been in hibernation from this forum for a long time, due to some personal things happening in my life and I had to be away from my Ruby training. But now I'm back, learning Ruby again, and I have another question about databases - which I suppose can be considered a follow up from my previous question from a while back on the same subject - and yes, it is a very beginner question (just a heads up).

Let me explain a hypothetical project I have in mind.

Let's say I'm building a social networking site like Facebook, and I'm getting the same amount of traffic as Facebook, in what ways, do databases come in handy for such a website, aside from just data storage? Is it used for extracting user data and studying them as well? If so, how are they extracted? And also, where is the database installed? On the server the website is hosted on or elsewhere? And if it IS installed in the server the website is hosted in, does the site admin have complete access to all of the data about every user? And in the end is the database pretty much used to ban users and such?

Again, I realize these are some noob questions, and I appreciate you being patient with me. It helps me learn, and allows me to eventually train myself into becoming a future rails community contributer smile