Click here to Skip to main content
15,885,767 members
Home / Discussions / Database
   

Database

 
GeneralNested Select query Pin
Poonam Gandash26-Dec-07 20:50
Poonam Gandash26-Dec-07 20:50 
GeneralRe: Nested Select query Pin
Krish - KP26-Dec-07 23:30
Krish - KP26-Dec-07 23:30 
GeneralRe: Nested Select query Pin
Poonam Gandash27-Dec-07 0:44
Poonam Gandash27-Dec-07 0:44 
GeneralRe: Nested Select query Pin
andyharman26-Dec-07 23:33
professionalandyharman26-Dec-07 23:33 
GeneralRe: Nested Select query Pin
vimal_yet27-Dec-07 0:13
vimal_yet27-Dec-07 0:13 
QuestionDatabase Design Issue Pin
Mostafa Siraj26-Dec-07 19:57
Mostafa Siraj26-Dec-07 19:57 
GeneralRe: Database Design Issue Pin
vimal_yet27-Dec-07 0:18
vimal_yet27-Dec-07 0:18 
GeneralRe: Database Design Issue Pin
Colin Angus Mackay27-Dec-07 0:30
Colin Angus Mackay27-Dec-07 0:30 
Mostafa Siraj wrote:
I'm building a web application which has lots of users, each with lots of security rules. what is better???
1- to make a table for users and another table for permissions. and insure by coding(in ASP.NET for example) the security
2- to create for each user in the system new user in the DBMS itself and assign the security from the database.


Number 2 is a bad idea because every time you create a user from your ASP.NET application you will have to supply the database with sufficient permission to perform that action. If your application is attacked, do you really want the attacker to have the ability to create users in the database?

Number 2 is also a bad idea from a performance perspective. It means you won't be able to take advantage of the pooling of connections in your ASP.NET application as each user will be using a different connection. If they all use the ASP.NET user connection then you get the advantages of connection pooling.

So, by a process of elimination the answer seems to be #1. However, you can implement some of this in SQL Server by using Stored procedures and passing in a user ID and constraining the data returned based also on the user.


GeneralRe: Database Design Issue Pin
Adeel Chaudhry27-Dec-07 20:50
Adeel Chaudhry27-Dec-07 20:50 
GeneralRe: Database Design Issue Pin
Paul Conrad28-Dec-07 10:25
professionalPaul Conrad28-Dec-07 10:25 
GeneralSelect statement Pin
tellytub26-Dec-07 16:13
tellytub26-Dec-07 16:13 
GeneralRe: Select statement Pin
Krish - KP26-Dec-07 17:21
Krish - KP26-Dec-07 17:21 
AnswerRe: Select statement Pin
tellytub26-Dec-07 21:08
tellytub26-Dec-07 21:08 
Generaldoing function of search Pin
shufun26-Dec-07 14:29
shufun26-Dec-07 14:29 
GeneralI'm sure it is just a minor syntax error... Pin
Andy_L_J26-Dec-07 12:23
Andy_L_J26-Dec-07 12:23 
GeneralRe: I'm sure it is just a minor syntax error... Pin
J$26-Dec-07 13:08
J$26-Dec-07 13:08 
GeneralRe: I'm sure it is just a minor syntax error... Pin
Krish - KP26-Dec-07 17:11
Krish - KP26-Dec-07 17:11 
AnswerRe: I'm sure it is just a minor syntax error... Pin
Andy_L_J26-Dec-07 18:15
Andy_L_J26-Dec-07 18:15 
QuestionUsing avg function for new constructed column? Pin
omegazafer26-Dec-07 9:50
omegazafer26-Dec-07 9:50 
AnswerRe: Using avg function for new constructed column? Pin
Paul Conrad26-Dec-07 12:11
professionalPaul Conrad26-Dec-07 12:11 
AnswerRe: Using avg function for new constructed column? Pin
andyharman26-Dec-07 23:40
professionalandyharman26-Dec-07 23:40 
QuestionHow to encrypt? Pin
Rock Star.25-Dec-07 23:08
Rock Star.25-Dec-07 23:08 
AnswerRe: How to encrypt? Pin
Ujjaval Modi25-Dec-07 23:35
Ujjaval Modi25-Dec-07 23:35 
GeneralRe: How to encrypt? Pin
Rock Star.26-Dec-07 0:12
Rock Star.26-Dec-07 0:12 
AnswerRe: How to encrypt? Pin
Paul Conrad26-Dec-07 12:12
professionalPaul Conrad26-Dec-07 12:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.