开发者

Multiple users on the same table

I'm building a database where users will access the same table but they cannot edit each others records. I'will be 开发者_如何学Gousing views+insert/update/delete stored procedures from my .NET application.

What's the best way to achieve safe acess to tables?


It sounds like you're building a sort of a multi-tenant application. For my 10 cents it's better to handle this authorization within your application code. There's a couple of MSDN artlcles at the link below about architecture for these sort of systems:

http://msdn.microsoft.com/en-us/library/aa479086.aspx


You can change their security options and disable access to the base tables. You can then do all of your IO through either stored procedures or views.

For example you make a view for company A and another for company B, company A only has rights to see their view and so on.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜