Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider using a SQL database #9

Open
altenstedt opened this issue Nov 16, 2018 · 5 comments
Open

Consider using a SQL database #9

altenstedt opened this issue Nov 16, 2018 · 5 comments
Assignees
Milestone

Comments

@altenstedt
Copy link
Collaborator

This is an issue for thinking about using a different database than MongoDB.

When we decided on MongoDB, we reasoned that we wanted to use the same database and instance between the Java and C# courses. We also felt that the selection of database was important, and wanted to make a selection that introduced a minimum amount of code complexity.

Several of these assumptions turned out to be flawed. No-one's understanding of the code was impacted by the use of the database. We could also easily have used different databases between Java and C#.

Another aspect is that we want to be able to run the database locally (see #6), so selection of database should be something that can be run locally without cost, and without having to install it (by using docker, for example.)

@erica-edholm erica-edholm added this to the 2019_Q1 milestone Feb 7, 2019
@erica-edholm erica-edholm self-assigned this Feb 7, 2019
@erica-edholm
Copy link
Collaborator

Rewriting the code for postgres was more work than anticipated. Postponing this issue until next time.

@erica-edholm erica-edholm removed this from the 2019_Q1 milestone Feb 12, 2019
@altenstedt
Copy link
Collaborator Author

Let's do this. We select different databases for C# and Java. Just do it.

We would like to be able to run the database locally, without installations (using Docker.)

It looks like SQL Server is free to use for educational purposes. There is an official Docker image for Linux here:

https://hub.docker.com/_/microsoft-mssql-server

@altenstedt
Copy link
Collaborator Author

As part of this task, we will also create a Docker image for the service. This will simplify running the service, which several students have had issues with.

We will run the two docker images one-by-one (not using docker-compose) since this more clearly shows what is going on.

@altenstedt
Copy link
Collaborator Author

Do not forget to update the README files and welcome email as well. Docker is now a requirement.

@altenstedt
Copy link
Collaborator Author

Running SQL Server using docker is looking promising. Here is the text I have for the README so far:

SQL Server database

You can use the free developer version of SQL Server using docker:

You should read the documentation on Docker Hub above, but something
like the following is probably correct:

docker run -it --rm -e ACCEPT_EULA=Y -e SA_PASSWORD=yourStrongPassword123 -p 1433:1433 mcr.microsoft.com/mssql/server:2017-latest-ubuntu

The resulting connection string would be something like:

Data Source=.;Initial Catalog=tdd2;User Id=sa;Password=yourStrongPassword123;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants