uniqueidentifier

Changing GUID Primary Keys to Integer Primary Keys

烈酒焚心 提交于 2019-12-14 03:59:53
问题 I took over an application a few months ago that used Guids for primary keys on the main tables. We've been having some index related database problems lately and I've just been reading up on the use of Guids as primary keys and I've learnt how much of a bad idea they can be, and I thought it might pay to look into changing them before the database gets too large. I'm wondering if there's an easy way to change them to Ints? Is there some amazing software that will do this for me? Or is it all

Unique ID across multiple SQL servers

穿精又带淫゛_ 提交于 2019-12-14 03:57:42
问题 I'm developing some software that will be used in multiple instances across the country. Like much software that uses logins, I need a unique ID for each user. Each instance of the software needs to operate completely independent, but the chances are high that eventually a few of the databases will be combined. In this case, I would like the ID for each user to be unique across all servers. Without communication between the servers (They only serve LANs), I've thought that maybe generating an

Algorithm to generate unique (possibly auto incremented) ids

此生再无相见时 提交于 2019-12-14 03:42:53
问题 I need to generate unique ids for my application and I am looking for suitable algorithms. I would prefer something like this -- YYYY + MM + DD + HH + MM + SS + <random salt> + <something derived from the preceding values> F.ex. - 20100128184544ewbhk4h3b45fdg544 I was thinking about using SHA-256 or something but the resultant string should not be too long. I could use UUID but again, they are too long and they are guaranteed to be unique on only one machine. I would welcome suggestions,

Does every record has an unique field in SQL Server?

血红的双手。 提交于 2019-12-14 02:23:42
问题 I'm working in Visual Studio - VB.NET. My problem is that I want to delete a specific row in SQL Server but the only unique column I have is an Identity that increments automatically. My process of work: 1. I add a row in the column (the identity is being incremented, but I don't know the number) 2. I want to delete the previous row Is there a sort of unique ID that every new record has? It's possible that my table has 2 exactly the same records, just the sequence (identity) is different. Any

NFC Tag as authentication tool

我的未来我决定 提交于 2019-12-14 00:39:27
问题 Can I use NFC tag as authentication tool, for example when the tag is tapped, it opens a url, connects to a remote database and checks if that is the original Tag and returns true or false. The information and the url will be public so anyone can tap the tag, but if someone copy its content to another tag, then it connects to the database it will return false. So actually that would be a public tag but with an unique identificator that can't be copied. Hope it makes sense, im new to the NFC

How to INSERT INTO table from dynamic query?

空扰寡人 提交于 2019-12-13 16:13:50
问题 My version of Postgres is: "PostgreSQL 9.4.4, compiled by Visual C++ build 1800, 32-bit" Let's say I have two tables Table1 and Table2 , which are having column col1 and col2 respectively. CREATE TABLE Table1(col1 int); CREATE TABLE Table2(col2 int); There is another table Table3 storing a formula for migrating data from Table1 to Table2 : CREATE TABLE Table3 ( tbl_src varchar(200), col_src varchar(500), tbl_des varchar(200), col_des varchar(100), condition varchar(500) ); INSERT INTO Table3

A unique ID per User / Session in logs on all levels? Log4J?

佐手、 提交于 2019-12-12 23:53:03
问题 Well we are doing some performance testing to figure out what steps of our application take how much time. Of course easy to parse / filter logs with regexp are a charm. To the problem: Our jsf application is split into several projects, which are used by other (non jsf) applications. My first approach would have been: if(logger.isDebugEnabled()) logger.debug("Service call took: " + (System.currentTimeMillis() - time)+ " JSESSIONID="+CookieUtil.getJsessionId(FacesContext.getCurrentInstance())

Reliable (auto)incrementing identifiers for all nodes/relationships in Neo4j

穿精又带淫゛_ 提交于 2019-12-12 22:09:29
问题 I'm looking for a way to generate unique identifiers for all my nodes/relationships in Neo4j, based on an incrementing counter (not big long uuids). The internal ids maintained by the Neo4j engine are known not to be reliable as outside references. A solution that comes close is the code proposed in this question, but it doesn't work when a single CREATE clause creates multiple new nodes: // get unique id MERGE (id:UniqueId{name:'Person'}) ON CREATE SET id.count = 1 ON MATCH SET id.count = id

How can I read the NFC ID of another Android device?

巧了我就是萌 提交于 2019-12-12 09:19:00
问题 I want to exchange (or only read) the NFC tag ID from one Android device to another but I don't know if I should use peer-to-peer mode or emulate an NFC tag with HCE. If I use HCE, is the emulated tag ID unique? What is the better option or is there a simpler one? 回答1: Neither P2P nor HCE will provide you a unique ID, least not on any phone I'm aware of. With P2P it's required that the ID exchanged in ATR is random. With HCE the emulated tag ID is usually set to 08h plus a random number.

Unique Count Formula for large dataset

让人想犯罪 __ 提交于 2019-12-12 06:00:40
问题 I am having trouble determining a way to enter a 1 or 0 into an adjacent cell to indicate whether or not a value is unique when working with a large dataset. I have read of multiple methods for accomplishing this, however none of them seem efficient for my purposes: I am using an instance of Excel 2010 (so I do not have the Distinct Count feature in PivotTables, and when I try to use PowerPivot it crashes my file due to processing limitations. In this StackOverflow question: Simple Pivot