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

Development Tools Database Foundations Creating Tables and Manipulating Data with SQL Creating a Database

Alexander Nortung
Alexander Nortung
6,930 Points

diffrence on schema and database?

I was wondering what is the diffrence when creating a schema and a database?

2 Answers

Ken Alger
STAFF
Ken Alger
Treehouse Teacher

Alexander;

It will vary a bit depending on which SQL vendor you are using as to whether the commands are interchangeable. In MySQL they are, take a look at the docs.

Some other versions of SQL the commands result in different actions. For example, take a look at Microsoft's and Oracle's docs on the command.

Probably just caused more confusion for you, and am sorry about that. Post back with additional questions though, and I'll answer as best as I can.

Happy coding,
Ken

Alexander Nortung
Alexander Nortung
6,930 Points

Thank you i took a look on the docs and read that it was just a synonym and borg of Them created a database :)

Ken Alger
STAFF
Ken Alger
Treehouse Teacher

Alexander;

In a very simplistic terms, a database holds the data, a schema is how that data "looks" inside the database.

Post back with other questions.

Happy coding,
Ken

Alexander Nortung
Alexander Nortung
6,930 Points

Hi, thanks for the answer. In the course we used the CREATE DATABASE and CREATE SCHEMA, and i didn't see any difference, so i was just wondering if there is any difference, when creating it.