« first day (3583 days earlier)      last day (1285 days later) » 

2:58 AM
I've come here for a little cry. For months I was managing to immerse in real DB stuff - except unpaid - and now I've got real employment again. Azure Tag Policy Definitions. Did the world ever wake up and decided they wanted json packages to define logic? No they didn't, ever.
(the new job is DBA, but just applying a taxonomy the estate is driving me nuts. It makes me realise how good mature documentation is - SQL Server, MySQL - and how bad the docs are for some superb new cloud tech is)
 
 
5 hours later…
7:41 AM
Morning
 
Mornin
g
 
in 2020 DBA Moderator Election Chat, 24 mins ago, by Paul White
> Election closes in 2 days.
9,164 voters were eligible, 1,674 visited the site during the election, 1,215 visited the election page, and 599 voted
 
Thanks for the running tally
 
 
2 hours later…
9:55 AM
Morning
 
Morning
 
10:15 AM
@ypercubeᵀᴹ you there?
 
It isn't exactly a transitive closure right?
I mean, I've seen some videos about it this weekend, and a transitive closure requires to be "closed".
a -> b -> c (and then again -> a)
 
ok. and this isn't?
 
In this case is only an "un-closed" segment.
Is that right?
 
what do you mean? looks closed to me
 
10:21 AM
Maybe I cannot explain it properly.
a -> b -> c
is not the same as
a -> b -> c  -> a
 
no, it isn't
are you asking if a->b->c is a closure vs a->b->c->a ?
 
Yes
 
ok. so a->b->c means:
we have a s et of paths:
{ a->b, b->c }
the closure of this set would be
{ a->b, b->c, a->c }
it is closed because no more paths can be deduced from it.
 
a->c or c->a ?
 
10:27 AM
Ok, thanks
 
if you start with { a->b->c->a }, which means{ a->b, b->c, c->a }, it is not closed either.
The closure would be
{ a->b, b->c, c->a, a->c, c->b, b->a, a->a, b->b, c->c }
 
All possible relations
 
in this case, yes
If you start with
{a->b, b->a, c->c}
the closure will be
{a->b, b->a, a->a, b->b, c->c}
And the pattern can be applied not only to nodes and paths between 2 nodes, but any (math) relation.
 
Just for fun @McNets @ypercubeᵀᴹ dbfiddle.uk/…
 
Say we define a relation between two buildings if they are less than 100 meters apart.
The closure of a single house in Athens will be almost all the buildings in Athens and surrounding areas.
@PaulWhite nice !
 
10:51 AM
@ypercubeᵀᴹ This is a bit more graph-y but less efficient dbfiddle.uk/…
It's probably trivial in a real graph database idk
I suppose the problem itself isn't that interesting once you have the separate trees within a graph
 
11:25 AM
I have to admit that the graph functions and code is confusing. MS documentation has very little examples so that doesn't make it easier
 
@ypercubeᵀᴹ No doubt about that
Things like MATCH(SHORTEST_PATH(GN1(-(GE)->GN2)+)); are pretty opaque
Presumably it is clearer than recursive queries once the basics are understood
Shortest path from node1 - edge -> node2 with + meaning recursive
All that replacing 'normal' join syntax between the nodes and edges
 
12:04 PM
@PaulWhite check this dbfiddle.uk/…
 
@ypercubeᵀᴹ I tried something similar earlier, but connecting things both ways just seems a bit odd.
 
yes but not to mathematicians
 
Right, absolutely. And it solves the problem quite neatly. The oddness comes from the SQL Graph design saying it is a (uni?) DAG.
@ypercubeᵀᴹ FYI dbfiddle.uk/…
The execution plan and hints in particular!
 
is there a way to define an Edge table as being directional or not?
 
@ypercubeᵀᴹ I'm no expert, but as I understand it so far, no.
 
12:34 PM
Yeah, nothing in the docs.
I notice that you can have FKs between node, edge and normal tables as well. No restrictions as far as I can see.
 
I'm sorry, I was attending a meeting
 
12:48 PM
@ypercubeᵀᴹ I really like your solution by the way.
 
I wonder how efficient these solutions are
or in other words at what graph/tree size they would take the server on its knees
 
 
2 hours later…
3:06 PM
Early testing when the graph stuff came out showed at about 3-4 hops a traditional query would cause my server to whimper while the graph equivalent query zoomed along
 
 
6 hours later…
8:58 PM
@PaulWhite it's really confusing to me
 
9:29 PM
Where can I get more info?
 
10:16 PM
@McNets Glad I could help. Always on deck to answer XML-questions :)
 
@MikaelEriksson thanks again
@MikaelErik what's the best way?
1-Convert the column to XML and remove xml tag before insert
2-Convert the column to nvarchar(max)
3-Simply remove xml tag before insert
It's a log table that stores web service errors
 
I would probably go with 1.
 
10:31 PM
@MikaelEriksson ok, thank you
 
nvarchar will not work with utf-8 either. Needs to be utf-16 or no encoding at all.
 

« first day (3583 days earlier)      last day (1285 days later) »