Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

General question about databases.

I don't clearly understand how database works, Where is those data stored, is it on a server where for example you host your site or it's an alternative server or what ? I'm not sure if I correctly asked this question, hopefully someone can explain.

2 Answers

It can be stored on either. Usually, it's a different server, but not always. A database is really just another server, with specific software installed, and lots of physical storage hardware attached to it.

On smaller, shared hosting plans, its hard to say where the database actually is. Since your host is responsible to for setting up and maintaining the database, you don't really get to see where the database actually is.

On larger scale applications, it would be very normal to have your database on it's own server. That is why services such as Amazon's web service family exists, and other services like mLab or Compose offer database hosting.

Thnks for quick answer, that's exactly what I wondered.