Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 SQL design/architecture dilemma

Author  Topic 

ManyTimes
Starting Member

2 Posts

Posted - 2010-05-03 : 15:09:34
Hello guys! :)

I am using SQL server 2005.

My dilemma:
I am going to have other partners connecting to my database which leaves me to how should I put up the database/tables?

Take this sample:
Partner1 gets access to table1 and table1 only.
Partner2 gets access to table4 and table6.
I am using table1, 2, 3, 4, 5 and 6.
Partner 1 and 2 does not communicate with each other, ever.

The sample above will happen in near future, so I was wondering, should I create three (3) different databases where each database has its unique user name and password (all bases runs on same server). Then put table1 in the first database for partner1, table 4 and 6 in database2 and database3 will hold the rest of the tables...

Or is it possible to make a partner connect to a database, but strict the access to only some of the tables within the database?

Or might be some other ways of achieving this? :)

Or should I just trust the two partners and make them have access to all 6 tables? Bad way of doing it, so 90's?

Thanks in advance.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-05-03 : 15:14:01
1. You could put it into multiple databases, however it could be challenging if you ever need to do a recovery on just one of them.
2. Yes you can restrict access for each object. Use database roles to help out if each partner uses multiple users.
3. You could use views in one database.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

Julien.Crawford
Starting Member

21 Posts

Posted - 2010-05-03 : 21:02:22
I've had a similar situation recently.
We decided to provide a new database for them, and we created views back to the original data in 'our' database.
This meant that they had readonly on the tables we explicitly made available, but also it gave them the freedom to do what they wanted in that database. ie: Create their own tables.

We proposed to them that if they wanted to add data we would create insert SP's for them that called the sp's in 'our' db.

They never asked.

This also has the advantage of letting us change the underlying schema.
Go to Top of Page

ManyTimes
Starting Member

2 Posts

Posted - 2010-05-04 : 13:01:54
Thanks for the response tkizer and Julien.Crawford

So all options I thought about is actually doable, cool. It is just to get back into the SQL server management studio and "go figure".

Have a great one!
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-05-04 : 13:21:34


Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -