1
Saas applications are getting higher, reducing costs, maintenance, etc.
We know we have the concept: Multitenancy (http://msdn.microsoft.com/en-us/library/aa479086.aspx)
It’s them:
By Column: Place an idClient column in all tables
By Schema: Separating clients by schema, cliente1.contaspagar cliente2.contaspagar cliente123234234.contaspagar etc
By Database: Each customer with their database.
My doubt:
The separation by Column, tends to be the easiest, however, when viewing from a DBA is very bad? if it has more than 130 tables and about 200 clients?
What about security? Remembering that what separates the data of each client, is a simple "Where" Where idclient = ? Or how that security could be made?
And performance? of queries, Inserts,delete
Databases that will be created with this structure: Sql Server, Mysql (Structure generated with Entity Framework)
Thanks Gypsy, I’m still in the fight of Saas with Entity Framework rsrsrs, it would be easier to create separate by schema or database with the Entity framework?
– Rod
I think it is better to separate by database. Everything becomes simpler.
– Leonel Sanches da Silva
What about Entity Migrations? Does it accept multiple bases? I remember you helped me with a question about SPA, that I would only use Webapi, I gave up, I will use Asp.net’s MVC and I will only use the "SPA" in the Home that renders with @renderbody, then it is easier to access by begin_autentication right right
– Rod
You can write one system and open multiple sites on your server, each database serving a different client. EF even accepts multiple bases, but I see no need to use multiple contexts at the beginning of its application.
– Leonel Sanches da Silva
did not mean multiple contexts in the application, 1 single deploy, then passes the database to the user to authenticate, only leave configurable context, what you think?
– Rod
This is possible and quite easy to do. Each client would have its database. When authenticating, you make the user connect to a specific context.
– Leonel Sanches da Silva
I got it =D thanks Gypsy, I don’t know how to thank you kkk even, soon I go to Uritiba to do a training, I buy you a beer there kkk
– Rod
@Rod I live in São Paulo, man. I go to Curitiba only once or twice a month. In my profile there is a link for you to pay me a shit, if you want huahuahaua
– Leonel Sanches da Silva