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

Nikeza Server Data Access Strategy #77

Closed
odytrice opened this issue Jul 9, 2017 · 14 comments
Closed

Nikeza Server Data Access Strategy #77

odytrice opened this issue Jul 9, 2017 · 14 comments
Assignees
Projects

Comments

@odytrice
Copy link
Contributor

odytrice commented Jul 9, 2017

Data Access Options for Nikeza

Technology ADO.NET E.F Core SQLClient TP Entity TP
Automated SQL No Yes No Yes
Type Safety No Yes Yes Yes
Entities Free Yes No Yes Yes
Database Migrations No Yes No No
Database Free Builds Yes Yes No* No*
Atomic IO Yes No Yes No

*There is a way to prevent this but it requires manually building a dbml file and check-in that into source control

Automated SQL - This means that the library writes the SQL on your behalf leading to simpler queries thats easy to read
Type Safety - This means that the compiler can check for errors in queries
Entities Free - This means that the library does not require that you create classes/records for Each table in the database.
Database Migrations - This means that the library manages schema changes and can automatically do updates to the schema when the application is deployed to a new environment without having to run scripts for each deployment Environment
Database Free Builds - This means that during build time on a build server, you don't need to have a live connection string to a database server for builds to work
Atomic IO - This means that a single IO can be scoped to exactly one function. without needing to pass some sort of context around

No SQL Option

There is also the no-sql option. They solve most of these problems but there is a bigger discussion to be had there and I don't have much experience with them especially from F#

@yelluw
Copy link
Contributor

yelluw commented Jul 10, 2017

What's the next step forward?

@bizmonger
Copy link
Owner

bizmonger commented Jul 10, 2017

As discussed, we are going to go MS SQL Server and ADO.Net with the option to swap out ADO.Net as the Data Access framework as tooling improves for .Net Core over time.

As a result, let's throw up MS SQL Server and add some tables that will support Nikeza/client/app/server.elm.

Examples include:
Followers
Subscriptions
ContentProviders
Sources
Topics
Link
ContentProviderLinks
LinkTopics
Platforms
ContentProviderPlatforms
Profile

Let's close this issue once we have an instance of SQL Server running with the relevant tables.

@yelluw
Copy link
Contributor

yelluw commented Jul 14, 2017

I have no working knowledge of ADO and last time I touched MSSQL.

Can we define who will setup the database instance?

Are there any references that you recommend to get started with ADO?

@yelluw
Copy link
Contributor

yelluw commented Jul 14, 2017

Ok, so Im setting up MSSQL locally with the official docker image from MS found here: https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-docker

Then I'll use that to work with ADO with @bizmonger :)

@bizmonger
Copy link
Owner

bizmonger commented Jul 14, 2017

Pablo, I recommend your journey of leading this effort to start with TDD.
Specifically, consider building a suite of failing integration tests.
Then overtime, getting all of those tests to finally pass.

Because, we are initially using ADO.Net, integration tests are essential to identifying schema changes.

@bizmonger bizmonger self-assigned this Jul 21, 2017
@bizmonger
Copy link
Owner

I will start building this out tonight in hopes that I can begin integrating the client and server on Monday.

@yelluw
Copy link
Contributor

yelluw commented Jul 24, 2017

Created this gist to flush out the Schema

https://gist.github.com/yelluw/d44bd2456c75c931051402414bfd20fb

@bizmonger
Copy link
Owner

I created the database.
Still need to wire-up the relationships.

nikezadb

@bizmonger
Copy link
Owner

database

@odytrice
Copy link
Contributor Author

Is it possible to get the schema file so that I start work on this today?

@bizmonger
Copy link
Owner

I can publish the schema later today after I get off work.
Might need some help figuring out how to though.
Hence, I'm not a DB person.

@bizmonger
Copy link
Owner

Nikeza backup attached.
Nikeza_db.zip

@odytrice
Copy link
Contributor Author

Database Version for the Backup is a bit too high, You can either redo the backup for a lower version or preferably you can just generate the SQL

@bizmonger
Copy link
Owner

Attached: SQL Script for database.

Nikeza_db.zip

@bizmonger bizmonger reopened this Jul 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Features
Awaiting triage
Development

No branches or pull requests

3 participants