Click here to Skip to main content
15,886,919 members
Home / Discussions / Database
   

Database

 
GeneralRe: Math expression as Column value as string in the Dynamic Sql Pin
jschell20-Oct-17 9:27
jschell20-Oct-17 9:27 
GeneralRe: Math expression as Column value as string in the Dynamic Sql Pin
Eddy Vluggen20-Oct-17 10:47
professionalEddy Vluggen20-Oct-17 10:47 
GeneralRe: Math expression as Column value as string in the Dynamic Sql Pin
indian14324-Oct-17 6:41
indian14324-Oct-17 6:41 
GeneralRe: Math expression as Column value as string in the Dynamic Sql Pin
jschell25-Oct-17 9:19
jschell25-Oct-17 9:19 
GeneralRe: Math expression as Column value as string in the Dynamic Sql Pin
indian14330-Oct-17 7:37
indian14330-Oct-17 7:37 
QuestionGUID or long for MVC site Pin
#realJSOP17-Oct-17 6:37
mve#realJSOP17-Oct-17 6:37 
AnswerRe: GUID or long for MVC site Pin
Wendelius17-Oct-17 7:01
mentorWendelius17-Oct-17 7:01 
AnswerRe: GUID or long for MVC site Pin
jschell17-Oct-17 7:43
jschell17-Oct-17 7:43 
John Simmons / outlaw programmer wrote:
Are there any hidden/subtle down-sides to using GUIDs for identity columns, or overriding benefits for using longs instead of GUIDs?


GUIDs are 'probably' unique. So very, very likely unique.

Longs are sequential. Always (unless you do something weird.) So they implicitly define insertion order even in cases when a database reuses slots. Sometimes GUIDs do that but most do not. Normally I insertion order a significant factor when I need to debug subtle production errors. Other than that they are convenient alternative which can only otherwise be solved (sort of) by adding a 'creation time' column to each table.

Small extra space that they use hasn't been a concern of mine for a very long time. But your business model might define something different. If so then you might even want to consider an int rather than long (again business model drives that.)

As you noted GUIDs have an obscurity advantage when exposed. Of course that is easy to do the same thing by creating the client to server interface such that it creates ids specific to that (so map it.)

Syncing two disparate databases (perhaps offline to main) is at least somewhat easier with GUIDs because one can ignore the id overlap that would exist with longs.

I would say that these days although I still like the sequential nature of longs, I would probably start with GUIDs unless I knew of something specific that I needed to support. But I would also add a 'creation time' regardless.
GeneralRe: GUID or long for MVC site Pin
k505418-Oct-17 5:30
mvek505418-Oct-17 5:30 
GeneralRe: GUID or long for MVC site Pin
jschell20-Oct-17 8:34
jschell20-Oct-17 8:34 
AnswerRe: GUID or long for MVC site Pin
Eddy Vluggen17-Oct-17 23:38
professionalEddy Vluggen17-Oct-17 23:38 
AnswerRe: GUID or long for MVC site Pin
Gerry Schmitz18-Oct-17 18:32
mveGerry Schmitz18-Oct-17 18:32 
QuestionInserting the values of a Stored Procedure directly into a Table by using the Column names Pin
indian14313-Oct-17 12:59
indian14313-Oct-17 12:59 
AnswerRe: Inserting the values of a Stored Procedure directly into a Table by using the Column names Pin
jschell15-Oct-17 8:15
jschell15-Oct-17 8:15 
GeneralRe: Inserting the values of a Stored Procedure directly into a Table by using the Column names Pin
indian14315-Oct-17 15:03
indian14315-Oct-17 15:03 
GeneralRe: Inserting the values of a Stored Procedure directly into a Table by using the Column names Pin
indian14316-Oct-17 7:25
indian14316-Oct-17 7:25 
GeneralRe: Inserting the values of a Stored Procedure directly into a Table by using the Column names Pin
Eddy Vluggen17-Oct-17 2:14
professionalEddy Vluggen17-Oct-17 2:14 
QuestionOpenRowSet is giving error: Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)". Pin
indian14312-Oct-17 7:38
indian14312-Oct-17 7:38 
AnswerRe: OpenRowSet is giving error: Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)". Pin
Victor Nijegorodov12-Oct-17 9:00
Victor Nijegorodov12-Oct-17 9:00 
GeneralRe: OpenRowSet is giving error: Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)". Pin
indian14312-Oct-17 11:30
indian14312-Oct-17 11:30 
GeneralRe: OpenRowSet is giving error: Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)". Pin
Richard MacCutchan12-Oct-17 22:11
mveRichard MacCutchan12-Oct-17 22:11 
AnswerRe: OpenRowSet is giving error: Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)". Pin
Richard Deeming13-Oct-17 2:10
mveRichard Deeming13-Oct-17 2:10 
QuestionSSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0209302 Pin
indian14311-Oct-17 7:36
indian14311-Oct-17 7:36 
QuestionSQL Server store procedure and prevent sql injection Pin
Mou_kol6-Oct-17 8:45
Mou_kol6-Oct-17 8:45 
AnswerRe: SQL Server store procedure and prevent sql injection Pin
Richard Deeming6-Oct-17 9:27
mveRichard Deeming6-Oct-17 9:27 

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.