Baumstrukturen sind weit verbereitet in der EDV. Jedes aktuelle Betriebssystem kennt "Verzeichnisse" oder "Ordner" die beliebig verschachtelt werden können und auch viele moderne Applikationen beschränken sich nicht mehr auf eine feste Anzahl von Ebenen. Aber wie legt man so einen Baum in einer (SQL-)Datenbank ab?
Suchergebnisse mit Tag „sql“
Data::ObjectDriver is a great ORM. It's easy to configure and easy to use, but not as powerful as DBIx::Class (which isn't that easy to learn and I actually prefer using a wrapper instead of "native" DBIx::Class, but that's another story). There is one major thing I missed with Data::ObjectDriver: JOINing foreign tables.
Some weeks ago, I wrote a post about aggregated logging by merging many "UPDATE ... SET count=count+1" SQL statements into one. But there's a problem: All of the data stored in memory is lost if the task or server crashes or if the database dies and doesn't come back until the task exists. Here is how I solved this problem.
I recently decided to prefer MongoDB for new projects and it turned out that I still need to learn a lot of things about it. One of them is MapReduce which is more powerful than (most) SQL SELECT options.
SQL injections are well-known and could easily be used against against most PHP scripts, but there is a much easier injection leak in many Perl scripts: Regular Expression injection.
Sybase ASE Express Edition is an enterprise level database server - for free. It recovers (usually) flawless from any unclean shutdown (server reset/power outage), but the identity column counters usually skip big after recovery leaving huge gaps in the numbering.