26

Re: Generation unique for several string fields

Hello, samius, you wrote: S> If in storage the substitute is not necessary. It is enough to construct on 1  where  will be Tuple <T1..., T7>, and value - a line 1.  itself calculates a combination , and  understands with collisions. S> at first I want to understand, whether such decision basically goes, then it it will be possible  on storage and speed of operation. In a limiting case can be generally HashSet <DataRow> with special , i.e. does not demand storage for storage of keys. Than it is better than DataTable/DataView + the correct indexes and surrogate keys for relations between the data? Here in such here the general case, without any details?

27

Re: Generation unique for several string fields

Hello, itslave, you wrote: I> Hello, samius, you wrote: S>> If in storage the substitute is not necessary. It is enough to construct on 1  where  will be Tuple <T1..., T7>, and value - a line 1.  itself calculates a combination , and  understands with collisions. I> than it is better than DataTable/DataView + the correct indexes and surrogate keys for relations between the data? Here in such here the general case, without any details? Without any details what generally to consider? The essential detail here is - that that two data sets are connected by nothing, except as composite . And not to pay to it attention it does not turn out. The surrogate key in this case generally in any way does not help to do . That on it it would be possible to do , it should be created equally for two tables in different . I.e. the task of search of correspondence of records on composite key already should be solved somehow. How to solve this task - too a question. And too without its details there is no sense to consider. Actually I simply showed that presence of collisions can not represent a problem if the result is not used for surrogate key creation.

28

Re: Generation unique for several string fields

Hello, itslave, you wrote: I> Hello, Mr. Delphist, you wrote: I> thanks, for a long time so did not neigh. Ugu-ugu, the official documentation it is proud informs "Such an identifier has a very low probability of being duplicated." Let's look here for argument "duplication it is impossible"? Plus read a blog of one children - they valorously  system where primary key of entities was generated at adding in DB Guid. In testing all ,  in . And suddenly with growth of loading at them started to be strewed key duplication. Let's guess, why? And whether they neighed in the course of alteration?

29

Re: Generation unique for several string fields

Hello, vsb, you wrote: vsb> Hello, Mr. Delphist, you wrote: I>>> Guid. NewID (). But correctly it is called - a substitute (primary) key. MD>> how many time repeated a pattern: generation  with enough high frequency gives sooner or later two identical values successively. vsb> It whence such information? https://msdn.microsoft.com/en-us/librar … .guid.aspx Such an identifier has a very low probability of being duplicated. It "is improbable" does not mean it "is impossible".

30

Re: Generation unique for several string fields

Hello, Mr. Delphist, you wrote: MD> Ugu-ugu, the official documentation is proud informs "Such an identifier has a very low probability of being duplicated." Let's look here for argument "duplication it is impossible"? You do not distort. The initial citation was MD> generation  with enough high frequency sooner or later gives two identical values successively. I will repeat: in dock it is written very low probability and you broadcast about with enough high frequency successively. This sky and the earth. And yes,  that a thread proprobability of repetition - it is astronomically small: https://ru.wikipedia.org/wiki/UUID It is possible to tell with confidence that the first  keys (10^15) will be unique. MD> plus read a blog of one children - they valorously  system where primary key of entities was generated at adding in DB Guid. In testing all ,  in . And suddenly with growth of loading at them started to be strewed key duplication. Let's guess, why? And whether they neighed in the course of alteration? I know why. Because hands curves. It is necessary not to alter a software, and conservatory to correct.

31

Re: Generation unique for several string fields

Hello, Mr. Delphist, you wrote: I>>>> Guid. NewID (). But correctly it is called - a substitute (primary) key. MD>>> how many time repeated a pattern: generation  with enough high frequency gives sooner or later two identical values successively. vsb>> It whence such information? MD> https://msdn.microsoft.com/en-us/librar … .guid.aspx MD> MD> Such an identifier has a very low probability of being duplicated. MD> it "is improbable" does not mean it "is impossible". In practice at usage normal  it is impossible.

32

Re: Generation unique for several string fields

Hello, Antei, you wrote: I>>> Hello, samius, you wrote: A> Thoughts aloud... A> And that if to take two  algorithm and: A> - on the basis of input 5-7 string columns to count two  and A> -  them, i.e. as a result we receive A> HashFunction1 (col1, col2..., col7) + delimiter + HashFunction2 (col1, col2..., col7) A> It should reduce probability  practically to 0. A> That think (practically, not )? Filter Bluma detected https://ru.wikipedia.org/wiki/%D0%A4%D0 … 0%BC%D0%B0 Filtr Bluma represents bit map from m bit. Initially, when the data structure stores empty set, all m the bit is nullified. The user should define k independent hash functions h1, ..., hk, displaying each element in one of m bit map positions in uniform enough image. For element adding e it is necessary to write down units on each of positions h1 (e), ..., hk (e) bit map. For check of an accessory of an element e to set of storable elements, it is necessary to check up a state of bits h1 (e), ..., hk (e). If at least one of them is equal to zero, the element cannot belong to set (differently at its adding all these bits would be installed). If all of them are equal to unit the data structure informs that  belongs to set. Thus there can be two situations: or the element really belongs to set, or all these bits appeared are installed on randomness at adding of other elements, as is a source of false actuatings in this data structure.