eupolicy.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
This Mastodon server is a friendly and respectful discussion space for people working in areas related to EU policy. When you request to create an account, please tell us something about you.

Server stats:

226
active users

#databases

3 posts2 participants2 posts today

Guess you *can* hack your way up in PostgreSQL for using `MIN(uuid)` and `MAX(uuid)`.

This involves:
1. Creating a function to compare UUID as binary.
2. Create MIN and MAX aggregates uses the function.
3. Create a function to transform UUID into binary.
4. Create additional indexes that use the UUID as binary.

Or you can just install Microsoft SQL Server and invoke the antichrist.

last night I had a nightmare in which one of the Bad Things that happened was that they changed the size of index cards.

No longer 3x5", but more like 2.5x5.5".

People were looking everywhere to find and hoard the correct sized index cards.

I was trying to get someone to listen to my plea that we write an application that would take index cards and make them into databases so that the size wouldn't matter.

I'm back in the code for Rack Root tonight and realized why I have some of the database relationships I was thinking of getting rid of yesterday. I need ways to track allocations of IP addresses in DHCP ranges and the way I have it setup, there's a nullable foreign key from an IP record over to a DHCP range.

The code for allocating/deallocating an IP in there is easy - if there's a FK set, then you can't set another one.

This is also where I really wish there were better examples of ForeignKey and ForeignKeyConstraints in SQLModel. So far, my searching hasn't turned anything up which might be an opportunity for a blog post and/or pull request.

Working on an mini-oxm (orm and odm in one) in rust and tinkering on the way how entity data should be tunneled back to the caller. Normally this would be done by a simple generic but I want the Driver/Backends to be dyn-compatible so the decision which backend to use can be done at runtime.

Currently I have two prototyped designs:

  • Either a trait Row { fn try_get(&self, idx: &str) -> Result<&Box<dyn Any>, Error>; }, where each driver must encode the data into an custom row type and is thus memory bound, or
  • By an provider-consumer approach that uses two concurrent async tasks (tokio::spawn) and communicates by one shared Arc<Mutex<Option<Box<dyn Any>>>> slot that is blocked until the consumer has consumed it. This is light on memory but has the burden of requiring async (which is already required so no problem) but also a lot more of syncronsation code (Mutex, CondVar etc.)

So at the end it's the old problems of memory vs CPU time; choose one or the other, not both.... I could now microbenchmark it but both approaches will perform VERY differently based on context / environment / application, so benchmarking it dosnt give that much insight I think. Sure I could implement both based on an create feature (or directly let people choose via a low-level API) but would that benefit that users?

What's your opinion?

#rust#databases#orm
Continued thread

Other govt #databases contain secret #whistleblower data. At the Dept of #Veterans Affairs, you’ll find granular #MentalHealth info on fmr service members, including notes from #therapy sessions, details about #medication, & accounts of substance abuse. Govt agencies including the #IRS, #FBI, #DHS, & Dept of #Defense have all purchased #cellphone-#location data, & possibly collected them, via secretive groups such as the National Geospatial-Intelligence Agency.

#Trump#law#privacy
Continued thread

The federal govt is a veritable cosmos of #information, made up of constellations of #databases: The #IRS gathers comprehensive #financial & #employment info from every taxpayer; the Dept of Labor maintains the National Farmworker Jobs Program (NFJP) system, which collects the #personal info of many workers; #DHS amasses #data about the movements of every person who travels by air commercially or crosses the nation’s borders; the #DEA tracks license plates scanned on American roads.