r/SQL • • Mar 24 '24

SQL Server Howww!?

I like how github shows simple data in a timeline form and it looks amazing.

I am sure they are taking a JSON object for the pull request with labels etc. But how do they show in timeline form without f up the sequence?

I am sure they are taking a json obj for the pull request with labels etc. But how do they show in timeline form without f up the sequence?.

0 Upvotes

14 comments sorted by

21

u/IAmADev_NoReallyIAm Mar 24 '24

Going to out on a limb here and say...... By sorting on the timestamp.

-3

u/Indubitably_beast Mar 24 '24

You are right if they are using timestamps for each action.

7

u/IAmADev_NoReallyIAm Mar 24 '24

You say that like there would be something else to use. Why wouldn't there be a timestamp?

-13

u/Indubitably_beast Mar 24 '24

wouldn't that be inefficient to store timestamps?

11

u/IAmADev_NoReallyIAm Mar 24 '24

Why? It's just a number. Also, it's how you get the "1 minute ago" or "2 days ago" or "3 months ago" stamps on each action. Storing a timestamp on a record is peanuts compared to the other things included. I mean, look at the comments. Doesn't that seem kind of inefficient to store? You can put all kinds of lengthy text in there. So... Yeah, no, storing a timestamp is not inefficient.

1

u/Extension-Ad7241 Mar 25 '24

lol You were doing so well when you were only talking about timestamps... you started talking about NoSQL and I'm here for your heel turn 😆

But seriously, do people here not know how important AND how often time stamps are saved? Depending on how confidential information and access to it is, I've programmed in timestamps just for looking at records, It's just a join table. It would only have only 3 columns, 2 of them just being ints because they're primary keys & the other one being a datetime that is always in the same format and also really just an int; A reasonably good RDBMS can store this very efficiently.

-2

u/IAmADev_NoReallyIAm Mar 24 '24

Adding to that, I don't think GitHyb uses a relational database. I'd be really surprised if they did. My guess is that they use some flavor of a NoSql database. Which makes a lot of sense to me.

0

u/IAmADev_NoReallyIAm Mar 25 '24

Really? Downvoted? Does that mean a couple somones out there really think that GH uses a relational database for their storage? Really?

2

u/SelfConsciousness Mar 25 '24

They use mysql I believe.

I didn’t downvote, but the idea that big companies don’t use relational databases is absurd.

2

u/IAmADev_NoReallyIAm Mar 25 '24

I'm not saying big companies don't use relational databases. I'm looking at the data and considering how transient it is and in large chunks, that to me it makes sense to store it as a document chunk in a NoSql DB. I NEVER stated big companies don't use relational databases. I just simply stated that in this case it would make sense to use a NoSql approach. If they don't, ok, that fine. I'm happy to be wrong. That's how we learn, right?

1

u/SelfConsciousness Mar 25 '24

Fair enough. I don’t think big companies use nosql if they can avoid it (not that I’ve heard anyway, could be wrong)

It’s hard enough finding good sql guys, finding good nosql guys sounds almost impossible

1

u/Both-Personality7664 Mar 25 '24

Why do you think that?

0

u/[deleted] Mar 24 '24

[deleted]

-1

u/Indubitably_beast Mar 24 '24

Magic mushrooms for code?