Click here to Skip to main content
15,902,299 members
Home / Discussions / Database
   

Database

 
AnswerRe: SQL Server Interview Question and Answers - Need your valuable comments, real experience and suggestions Pin
i.j.russell19-Mar-10 2:03
i.j.russell19-Mar-10 2:03 
GeneralRe: SQL Server Interview Question and Answers - Need your valuable comments, real experience and suggestions Pin
pinaldave19-Mar-10 2:32
pinaldave19-Mar-10 2:32 
GeneralRe: SQL Server Interview Question and Answers - Need your valuable comments, real experience and suggestions Pin
Jörgen Andersson19-Mar-10 4:11
professionalJörgen Andersson19-Mar-10 4:11 
GeneralRe: SQL Server Interview Question and Answers - Need your valuable comments, real experience and suggestions Pin
Andy_L_J19-Mar-10 18:08
Andy_L_J19-Mar-10 18:08 
QuestionDatabase design for a private message system Pin
Joshua Tully18-Mar-10 19:35
Joshua Tully18-Mar-10 19:35 
AnswerRe: Database design for a private message system Pin
Wayne Gaylard18-Mar-10 21:21
professionalWayne Gaylard18-Mar-10 21:21 
GeneralRe: Database design for a private message system Pin
Joshua Tully18-Mar-10 22:24
Joshua Tully18-Mar-10 22:24 
GeneralRe: Database design for a private message system Pin
Wayne Gaylard19-Mar-10 1:48
professionalWayne Gaylard19-Mar-10 1:48 
Sorry, didn't get the part about folder ownership. This how I would set it up

Tables:

folders:
id int
name varchar
userid int

messages:
id int
fromid int
toid int
message varchar(250)
messagedate datetime
folderid int

users:
id int
name varchar

Then when you want to look up all messages from one person (say his id is 1) to another person (id = 2) in a particular folder (say id = 1) you would have a query like this

SELECT 
    m.message
FROM 
    messages m 
INNER JOIN 
    folders f 
ON 
    m.folderid = f.id 
WHERE 
    m.fromid = 1 
AND m.toid = 2
AND f.id = 1;

Questionstored procedur to update multiple tables Pin
Enobong Adahada18-Mar-10 2:05
Enobong Adahada18-Mar-10 2:05 
Questionstored procedur to update multiple tables Pin
Enobong Adahada18-Mar-10 1:21
Enobong Adahada18-Mar-10 1:21 
AnswerRe: stored procedur to update multiple tables Pin
Wayne Gaylard18-Mar-10 1:49
professionalWayne Gaylard18-Mar-10 1:49 
AnswerRe: stored procedur to update multiple tables Pin
The Man from U.N.C.L.E.18-Mar-10 7:38
The Man from U.N.C.L.E.18-Mar-10 7:38 
Questionlist all host names Pin
Mogamboo_Khush_Hua18-Mar-10 0:23
Mogamboo_Khush_Hua18-Mar-10 0:23 
AnswerRe: list all host names Pin
Eddy Vluggen18-Mar-10 2:40
professionalEddy Vluggen18-Mar-10 2:40 
QuestionStoredProcedures - which is fastest and why Pin
alwinSCH17-Mar-10 22:39
alwinSCH17-Mar-10 22:39 
JokeRe: StoredProcedures - which is fastest and why Pin
Mycroft Holmes17-Mar-10 23:27
professionalMycroft Holmes17-Mar-10 23:27 
GeneralRe: StoredProcedures - which is fastest and why Pin
alwinSCH17-Mar-10 23:53
alwinSCH17-Mar-10 23:53 
AnswerRe: StoredProcedures - which is fastest and why Pin
WoutL18-Mar-10 0:26
WoutL18-Mar-10 0:26 
GeneralRe: StoredProcedures - which is fastest and why Pin
alwinSCH18-Mar-10 0:50
alwinSCH18-Mar-10 0:50 
GeneralRe: StoredProcedures - which is fastest and why Pin
WoutL18-Mar-10 1:15
WoutL18-Mar-10 1:15 
GeneralRe: StoredProcedures - which is fastest and why Pin
Mycroft Holmes18-Mar-10 11:44
professionalMycroft Holmes18-Mar-10 11:44 
QuestionDataGridView problem with cell coloring [modified] Pin
Mattzimmerer17-Mar-10 15:54
Mattzimmerer17-Mar-10 15:54 
AnswerRe: DataGridView problem with cell coloring Pin
Luc Pattyn17-Mar-10 16:22
sitebuilderLuc Pattyn17-Mar-10 16:22 
GeneralRe: DataGridView problem with cell coloring Pin
Mattzimmerer17-Mar-10 18:58
Mattzimmerer17-Mar-10 18:58 
AnswerRe: DataGridView problem with cell coloring Pin
darkelv17-Mar-10 17:49
darkelv17-Mar-10 17:49 

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.