TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

DOGE employees don't understand the basics of SQL

78 pointsby mnewme3 months ago

12 comments

ahwelitif3 months ago
There&#x27;s so much partisan noise about DOGE going around -- At this point, I don&#x27;t know what to believe anymore. Elon lies constantly, abuses employees, backstabs partners, and is probably a racist; At the same time, his companies have created seemingly impossible&#x2F;fantastic technologies&#x2F;tools that have changed the world forever.<p>Is DOGE a genuine effort at desperately needed reforms to save America from bankruptcy? Is it a secret plot to take full control of the federal government like a dictator&#x27;s coup? Is it a mix of both at the same time (ie; recent Saudi and Chinese &#x27;anti-corruption&#x27; campaigns)?<p>What should I believe?
评论 #43122260 未加载
评论 #43123436 未加载
评论 #43122323 未加载
评论 #43123530 未加载
评论 #43122913 未加载
评论 #43122164 未加载
评论 #43122206 未加载
评论 #43122257 未加载
评论 #43124886 未加载
评论 #43127772 未加载
评论 #43122163 未加载
评论 #43122248 未加载
评论 #43123049 未加载
评论 #43127973 未加载
TransAtlToonz3 months ago
A sledgehammer doesn&#x27;t need to be able to turn a screw. Perhaps states might take advantage of this, but the incompetency of toadies at technology won&#x27;t impact their competency at wreaking destruction.
shireboy3 months ago
My read of this post is it&#x27;s just this guy&#x27;s word vs doge&#x27;s. Doge says they allow nulls for TAS, author says they don&#x27;t. I&#x27;m pretty sure in the author&#x27;s example, though, the payment _could_ be created with a NULL vendor, as I&#x27;m pretty sure NULLABLE is default for int in PostgresSQL. Depending on the scenario, this may be &quot;bad&quot; or it may be intentional. What would really matter is &quot;does the system actually transfer funds or cut checks without a TAS&quot;. In ERPs I work with, a payment without a vendor is allowed in a draft state, but to get an actual check, you need a vendor.
评论 #43122478 未加载
mhh__3 months ago
Most of these types of articles I&#x27;d imagine will be right but there is some truth in the argument that &quot;Ah, you see, the system is merely so complicated and murky that you can&#x27;t understand it!&quot; is damning too
评论 #43122187 未加载
andyst3 months ago
When seeing the approach to how Elon&#x2F;DOGE applied themselves to air traffic control after the incidents, I&#x27;m not falling into the Gell-Mann amnesia effect. This group is just incompetent and going to re-learn all the mistakes within each domain that led to industry getting to where it has through a series of hard won lessons.
评论 #43122069 未加载
评论 #43123432 未加载
tyronehed3 months ago
When a foreign key field is left empty, that implies that no foreign key relationship was claimed. By definition a primary key cannot be no. But a foreign key, which is a representation of another table&#x27;s primary key, can be null. It merely means that no foreign key relationship is claimed.
sepositus3 months ago
I&#x27;m glad I don&#x27;t work with this guy. I&#x27;ve had co-workers who routinely talk to me in this way, treating me as an infant so they could feel superior. I wonder if he&#x27;ll regret this post going viral.
评论 #43122105 未加载
评论 #43122039 未加载
werdnapk3 months ago
Just wait until they come across some mainframes and need to figure out JCL.
评论 #43122179 未加载
Clubber3 months ago
<i>In this tweet, Elon Musk (and DOGE?) have come to the conclusion that $4.7T in spending was blank, &quot;making traceability almost impossible.&quot; This is because the TAS is used in many tables, and is used as a primary key in others tables using a foreign key constraint.<p>What his team has seemingly uncovered is not waste. It&#x27;s a little thing I like to call, &quot;Extremely routine database architecture.&quot;<p>This maintains referential integrity between the two tables. It works exactly the same way with TAS in the IRS database. I checked for myself. It&#x27;s not optional.</i><p>The last sentence, &quot;It&#x27;s not optional,&quot; is the crux of the argument. When he says it&#x27;s not optional, I assume he means the payment.vendor_id FK is defined as NOT NULL. When doing exports like he is referencing, if it&#x27;s an (inner) join, it wouldn&#x27;t export the nulls. Here is an example of an inner join that if used doing an export wouldn&#x27;t export the NULL vendor_id payment rows:<p><pre><code> select * -- for brevity from payment p join vendor v on p.vendor_id = v.vendor_id </code></pre> To get the payment rows with null vendor_id, the export would have to be done using an outer (left) join like so:<p><pre><code> select * -- for brevity from payment p LEFT join vendor v on p.vendor_id = v.vendor_id </code></pre> We don&#x27;t know how it&#x27;s exported, so if the author only has access to the exports and not the actual schema, he wouldn&#x27;t know either.<p>In his example he even has it as nullable:<p><pre><code> CREATE TABLE payment ( payment_id SERIAL PRIMARY KEY, vendor_id INT REFERENCES vendor(vendor_id), payment_date DATE NOT NULL ); </code></pre> Notice the payment_date is defined as explicitly NOT NULL while the vendor_id (the FK he is talking about) is not defined as NOT NULL (implicitly NULL). If the vendor_id is NULL, that would represent a payment with no vendor.<p>Now regarding Musk&#x27;s tweet:<p><i>In the Federal Government, the TAS field was optional for ~$4.7 Trillion in payments and was often left blank, making traceability almost impossible. As of Saturday, this is now a required field, increasing insight into where money is actually going.</i><p>To make an existing NULL field required (NOT NULL) in a RDBMS database, you have to first populate it with something. When it&#x27;s a FK like vendor_id, you have to populate it with a vendor_id that exists the vendor table. With the amount of rows I would imagine is in that database, this is no easy feat. To make it required, the would have to:<p><pre><code> 1. Update each NULL row to the actual vendor it was supposed to be (probably impossible to figure this out) 2. Update each NULL row to a new vendor_id named &quot;Unknown&quot; or something to that effect. 3. Update the application(s) that write to the database to make it required, leaving it NULL in the database. 4. Maybe something else </code></pre> One more thing, all this assumes the system is using an RDBMS. If it&#x27;s a mainframe or something (which it very well might be), all bets are off.
palmotea3 months ago
Q: Elon Musk, What did you get done this week?<p>A: Demonstrated my &quot;crack&quot; team is incompetent and lacks basic skills. Also broke a lot of stuff.
twodave3 months ago
Does anyone really believe Elon Musk doesn’t understand basic RDBMS theory? Seems like troll-bait to me.
评论 #43122198 未加载
评论 #43128066 未加载
评论 #43125050 未加载
评论 #43122184 未加载
评论 #43126766 未加载
评论 #43122194 未加载
carabiner3 months ago
It could be that, a big misunderstanding of normal database design, or it could be a legit error. No one has offered direct evidence of either case. What I&#x27;ll say is that working in legacy industries with legacy data, all bets are off as to whether anything is well posed. My first company&#x27;s &quot;database&quot; was a folder of 100 excel files. OP is making a massive assumption that the federal government is using modern SQL database design principles in this specific application, or a modern database at all.
评论 #43122094 未加载
评论 #43122007 未加载