Click here to Skip to main content
15,887,596 members
Home / Discussions / Database
   

Database

 
GeneralRe: Calculation For Time Attendance System Pin
caulsonchua7-Jul-13 21:13
caulsonchua7-Jul-13 21:13 
Questionsqlserver 2005 connection problem Pin
hamadam212-Jul-13 23:13
hamadam212-Jul-13 23:13 
AnswerRe: sqlserver 2005 connection problem Pin
Eddy Vluggen3-Jul-13 0:30
professionalEddy Vluggen3-Jul-13 0:30 
QuestionSQL Server 2012 - forming relationship between tables Pin
RickBStewart2-Jul-13 10:53
RickBStewart2-Jul-13 10:53 
AnswerRe: SQL Server 2012 - forming relationship between tables Pin
Richard Deeming2-Jul-13 11:06
mveRichard Deeming2-Jul-13 11:06 
GeneralRe: SQL Server 2012 - forming relationship between tables Pin
RickBStewart2-Jul-13 11:47
RickBStewart2-Jul-13 11:47 
GeneralRe: SQL Server 2012 - forming relationship between tables Pin
Mycroft Holmes2-Jul-13 13:01
professionalMycroft Holmes2-Jul-13 13:01 
GeneralRe: SQL Server 2012 - forming relationship between tables Pin
Ralph D. Wilson II10-Jul-13 6:50
Ralph D. Wilson II10-Jul-13 6:50 
To somewhat piggy-back on the previous suggestions, I would recommend that you consider using an Identity column for your Primary Key and then using the PK to accomplish the links beween tables.

For Example:

Table: Buildings
BuildingID [int] Primary Key Identity (1-1)
BuildingName [VarChar] (25)
...

Table: BuildingRooms
BuildingRoomID [int] Primary Key Identity (1-1)
BuildingID INT
RoomName [Varchar] (10)
...

Table: Assets
AssetID [int] Primary Key Identity (1-1)
AssetNumber [varchar] (25)
AssetName [VarChar] (50)
BuildingRoomID [int]
...

By using using the Identity columns for the PK's of the tables, you can make your joins much more easily. You may also want to add some Unique Indexes on, for instance, the BuildingName, RoomName, and AssetNumber columns just to make sure someone doesn't accidentally add those items multiple times. Wink | ;-)

Check out the following link regarding what is termed "normalization" . . . which is what we have suggested with regard to your tables. Wink | ;-)

http://www.dbnormalization.com/rules-of-normalization-i
GeneralRe: SQL Server 2012 - forming relationship between tables Pin
RickBStewart10-Jul-13 9:29
RickBStewart10-Jul-13 9:29 
QuestionDefault Button is not working using different (skinid) Pin
rubonkumar2-Jul-13 0:02
rubonkumar2-Jul-13 0:02 
AnswerRe: Default Button is not working using different (skinid) Pin
Eddy Vluggen2-Jul-13 0:31
professionalEddy Vluggen2-Jul-13 0:31 
GeneralRe: Default Button is not working using different (skinid) Pin
Mycroft Holmes2-Jul-13 1:23
professionalMycroft Holmes2-Jul-13 1:23 
GeneralRe: Default Button is not working using different (skinid) Pin
Shameel8-Jul-13 19:29
professionalShameel8-Jul-13 19:29 
GeneralRe: Default Button is not working using different (skinid) Pin
Mycroft Holmes8-Jul-13 21:26
professionalMycroft Holmes8-Jul-13 21:26 
QuestionDate difference with total years, months and days Pin
maxRazar1-Jul-13 18:37
maxRazar1-Jul-13 18:37 
AnswerRe: Date difference with total years, months and days Pin
Eddy Vluggen2-Jul-13 0:32
professionalEddy Vluggen2-Jul-13 0:32 
AnswerRe: Date difference with total years, months and days Pin
Mycroft Holmes2-Jul-13 1:21
professionalMycroft Holmes2-Jul-13 1:21 
GeneralRe: Date difference with total years, months and days Pin
Richard Deeming2-Jul-13 1:35
mveRichard Deeming2-Jul-13 1:35 
GeneralRe: Date difference with total years, months and days Pin
Tim Carmichael2-Jul-13 1:57
Tim Carmichael2-Jul-13 1:57 
GeneralRe: Date difference with total years, months and days Pin
Mycroft Holmes2-Jul-13 2:20
professionalMycroft Holmes2-Jul-13 2:20 
AnswerRe: Date difference with total years, months and days Pin
Tim Carmichael2-Jul-13 1:59
Tim Carmichael2-Jul-13 1:59 
QuestionKeep Client QL DB Updated Pin
Kevin Marois1-Jul-13 7:02
professionalKevin Marois1-Jul-13 7:02 
AnswerRe: Keep Client QL DB Updated Pin
Mycroft Holmes1-Jul-13 12:43
professionalMycroft Holmes1-Jul-13 12:43 
QuestionAutomatically open keys upon connection Pin
PIEBALDconsult28-Jun-13 7:58
mvePIEBALDconsult28-Jun-13 7:58 
QuestionDerived Fields Pin
eddieangel28-Jun-13 6:49
eddieangel28-Jun-13 6: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.