Click here to Skip to main content
15,884,986 members
Home / Discussions / Database
   

Database

 
AnswerRe: Protect my sql server database Pin
Corporal Agarn24-Sep-14 4:33
professionalCorporal Agarn24-Sep-14 4:33 
GeneralRe: Protect my sql server database Pin
dilkonika24-Sep-14 6:18
dilkonika24-Sep-14 6:18 
AnswerRe: Protect my sql server database Pin
data modeling guy29-Sep-14 6:58
data modeling guy29-Sep-14 6:58 
AnswerRe: Protect my sql server database Pin
Wendelius30-Sep-14 8:59
mentorWendelius30-Sep-14 8:59 
QuestionSQL Server : Multiple relationship for the same field Pin
dilkonika23-Sep-14 7:29
dilkonika23-Sep-14 7:29 
AnswerRe: SQL Server : Multiple relationship for the same field Pin
Wendelius23-Sep-14 8:04
mentorWendelius23-Sep-14 8:04 
GeneralRe: SQL Server : Multiple relationship for the same field Pin
dilkonika23-Sep-14 8:14
dilkonika23-Sep-14 8:14 
AnswerRe: SQL Server : Multiple relationship for the same field Pin
Wendelius23-Sep-14 8:33
mentorWendelius23-Sep-14 8:33 
In my opinion it's ok to have merge the tables and have nullable columns as long as the data is suitable concerning the table purpose. However, without seeing the whole model, it's impossible to say if this is feasible solution in your case.

As a rule of thumb one column stores data only for one purpose. What I mean is that even though you can do a dual reference, it's not advisable.

Another approach could be to use a whole separate table for the links. Consider the following
Article 
-------
Id
Name
Category

Services
-------- 
id
name
nr
value

Sell_action
--------- 
sell_Id
other possible fields describing a single selling action

ArticlesSold
--------- 
sell_Id
article_id
amount
price

ServicesSold
--------- 
sell_Id
service_id
amount
price

Again this should be verified against the whole model and I must admit, I would put all the effort in modeling the sell able products properly instead of thinking how to simultaneously reference two separate tables. That would keep the model simple and clear Smile | :)
AnswerRe: SQL Server : Multiple relationship for the same field Pin
Mycroft Holmes23-Sep-14 14:19
professionalMycroft Holmes23-Sep-14 14:19 
AnswerRe: SQL Server : Multiple relationship for the same field Pin
data modeling guy29-Sep-14 5:02
data modeling guy29-Sep-14 5:02 
QuestionAdd primary Key as GUID automatic generation Pin
MrKBA22-Sep-14 21:31
MrKBA22-Sep-14 21:31 
AnswerRe: Add primary Key as GUID automatic generation Pin
Kornfeld Eliyahu Peter22-Sep-14 22:00
professionalKornfeld Eliyahu Peter22-Sep-14 22:00 
GeneralRe: Add primary Key as GUID automatic generation Pin
MrKBA22-Sep-14 22:52
MrKBA22-Sep-14 22:52 
JokeRe: Add primary Key as GUID automatic generation Pin
Kornfeld Eliyahu Peter22-Sep-14 23:08
professionalKornfeld Eliyahu Peter22-Sep-14 23:08 
GeneralRe: Add primary Key as GUID automatic generation Pin
MrKBA22-Sep-14 23:40
MrKBA22-Sep-14 23:40 
JokeRe: Add primary Key as GUID automatic generation Pin
Kornfeld Eliyahu Peter22-Sep-14 23:42
professionalKornfeld Eliyahu Peter22-Sep-14 23:42 
GeneralRe: Add primary Key as GUID automatic generation Pin
MrKBA23-Sep-14 0:01
MrKBA23-Sep-14 0:01 
JokeRe: Add primary Key as GUID automatic generation Pin
Kornfeld Eliyahu Peter23-Sep-14 0:02
professionalKornfeld Eliyahu Peter23-Sep-14 0:02 
GeneralRe: Add primary Key as GUID automatic generation Pin
Estys23-Sep-14 0:24
Estys23-Sep-14 0:24 
GeneralRe: Add primary Key as GUID automatic generation Pin
MrKBA24-Sep-14 4:16
MrKBA24-Sep-14 4:16 
AnswerRe: Add primary Key as GUID automatic generation Pin
jschell23-Sep-14 12:01
jschell23-Sep-14 12:01 
AnswerRe: Add primary Key as GUID automatic generation Pin
Bernhard Hiller23-Sep-14 22:19
Bernhard Hiller23-Sep-14 22:19 
GeneralRe: Add primary Key as GUID automatic generation Pin
MrKBA24-Sep-14 22:04
MrKBA24-Sep-14 22:04 
Questiondownload aexcel file using url of website from where file should be download Pin
Member 1074389922-Sep-14 21:00
Member 1074389922-Sep-14 21:00 
SuggestionRe: download aexcel file using url of website from where file should be download Pin
Richard MacCutchan22-Sep-14 22:16
mveRichard MacCutchan22-Sep-14 22:16 

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.