skip to Main Content

I’ve been learning about the aforementioned things in a university course all about database management, but I’m a bit confused by the details of what all these things actually mean, so I was hoping to just write down my interpretation of them to see how much I understand, as well as clear up some things I’m not so sure about.

Firstly, containers are something new to me that I’ve only just learnt about recently. As I understand it, they are a way to run programs or other services in a well, contained environment that ensures that the performance of that program performs the same on different systems. I’m not so sure on the details but as a concept that’s what I’ve taken it to mean.

We’ve been provided an image to use to create a container, which supposedly runs our database on it. What I’m confused by though is what this actually means.

I have the database running in the container, and Azure Studio connects to that as a localhost as if it’s connected to a database that could exist somewhere else in the world, does that mean all the tables, records and other bits of data end up being stored within that container? And the SQL Server, I attribute that to mean something that’s online, but is that simply an app that lets me manipulate what I’ve got in that container? If so, why is it then called a server if it’s just something on my machine alone?

2

Answers


  1. Let me Tarantino my response and answer your last question first. SQL Server is a product name, like Oracle, or MySQL. The fact that it contains the word "Server" in it is incidental to where it’s actually being run. It could be run on your desktop, a virtual machine, a container, a physical server, in the cloud, etc.

    Second, to your question about what the container is; one of the better analogies I’ve heard is that you should think of a container as a light-weight virtual machine. It has it’s own allocated storage, CPU, memory. The difference between a VM and a container is a VM has an entire operating system installed on it, whereas a container skips a lot of that, and interacts directly with the host system. For the purposes of this question, I think you can largely think of them as logically the same.

    So all the data is stored on storage dedicated to the container (but borrowed from the host operating system). There are ways you can make that Container storage visible to the host if you want (through volumes), but by default, all the data lives "in the container"

    Login or Signup to reply.
  2. There are three flavors (within this context) of SQL Server; An on-premise SQL Server (a different host in the server room in your local network), on the cloud (Azure SQL), and a localhost installation of SQL Server (the same PC where your application is running).

    A container using a connection to localhost is running a local version of SQL Server (it is a running application in that same host).

    Your application can use any of these three variants. If you want your data available to other containers and other hosts, you would need to have your database elsewhere where it can be reached by other hosts.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search