Click here to Skip to main content
15,900,258 members
Home / Discussions / Database
   

Database

 
AnswerSupport Multiple Databases Pin
David Mujica23-Dec-09 5:58
David Mujica23-Dec-09 5:58 
GeneralRe: Support Multiple Databases Pin
cdpace23-Dec-09 10:54
cdpace23-Dec-09 10:54 
Questionsqlite Pin
jashimu23-Dec-09 3:34
jashimu23-Dec-09 3:34 
AnswerRe: sqlite Pin
dxlee23-Dec-09 4:17
dxlee23-Dec-09 4:17 
GeneralRe: sqlite Pin
jashimu23-Dec-09 4:34
jashimu23-Dec-09 4:34 
GeneralRe: sqlite Pin
dxlee23-Dec-09 5:38
dxlee23-Dec-09 5:38 
Question2 SQL quesions: address book Pin
Dmitry Khudorozhkov22-Dec-09 10:27
Dmitry Khudorozhkov22-Dec-09 10:27 
AnswerRe: 2 SQL quesions: address book Pin
Mycroft Holmes22-Dec-09 12:10
professionalMycroft Holmes22-Dec-09 12:10 
Dmitry Khudorozhkov wrote:
First question: is this a good db structure?


No, you need a primary key on the address table AddressID INT Auto increment. You also need a foreign key between User and address. This means you need to put the userID (currently the ID field on the user table) on the address table.


Then to get the address for a user something like

Select *
From Users
 inner join Addresses on Addresses.UserID = User.ID
where Users.ID = @IDno


Never underestimate the power of human stupidity
RAH

GeneralRe: 2 SQL quesions: address book Pin
Dmitry Khudorozhkov22-Dec-09 13:17
Dmitry Khudorozhkov22-Dec-09 13:17 
QuestionQuery to Test for SA [modified] Pin
mobius11100122-Dec-09 7:30
mobius11100122-Dec-09 7:30 
AnswerRe: Query to Test for SA Pin
Dr.Walt Fair, PE22-Dec-09 7:47
professionalDr.Walt Fair, PE22-Dec-09 7:47 
GeneralRe: Query to Test for SA Pin
mobius11100122-Dec-09 7:52
mobius11100122-Dec-09 7:52 
AnswerRe: Query to Test for SA Pin
Giorgi Dalakishvili22-Dec-09 7:53
mentorGiorgi Dalakishvili22-Dec-09 7:53 
GeneralRe: Query to Test for SA Pin
Luc Pattyn22-Dec-09 8:23
sitebuilderLuc Pattyn22-Dec-09 8:23 
AnswerRe: Query to Test for SA PinPopular
mobius11100122-Dec-09 7:58
mobius11100122-Dec-09 7:58 
QuestionHow to store IList<string> in sql server</string> Pin
GauravKP22-Dec-09 5:25
professionalGauravKP22-Dec-09 5:25 
AnswerRe: How to store IList in sql server Pin
J4amieC22-Dec-09 5:34
J4amieC22-Dec-09 5:34 
AnswerRe: How to store IList in sql server Pin
Jordon4Kraftd23-Dec-09 10:03
Jordon4Kraftd23-Dec-09 10:03 
QuestionSQL Server Connect Test Pin
mobius11100122-Dec-09 4:43
mobius11100122-Dec-09 4:43 
AnswerRe: SQL Server Connect Test Pin
David Mujica22-Dec-09 5:27
David Mujica22-Dec-09 5:27 
QuestionMerge Replication Problem Pin
Jay Royall21-Dec-09 23:05
Jay Royall21-Dec-09 23:05 
AnswerRe: Merge Replication Problem Pin
Jay Royall23-Dec-09 1:59
Jay Royall23-Dec-09 1:59 
QuestionQuery Pin
sarang_k21-Dec-09 22:04
sarang_k21-Dec-09 22:04 
AnswerRe: Query Pin
Blue_Boy21-Dec-09 22:33
Blue_Boy21-Dec-09 22:33 
AnswerRe: Query Pin
Niladri_Biswas22-Dec-09 16:32
Niladri_Biswas22-Dec-09 16:32 

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.