Embedded databases

For quite some time I have been looking for an embedded database I could use with the confidence that it was the best choice. My usual choice so far has been SQLite, but mostly out of convenience and I haven't done any proper research of options.

This article is not meant as an exhaustive comparison or general recommendation, but to inform about various qualities or problems of these options. I will add new information as I find it, but I will likely eliminate some options early on.

When it comes to applications that use database, I usually hack simple tools in PHP and complex or computation intense in C#/ASP.NET. Additionally I need a somewhat comfortable tool for manual changes and debugging.

I usually combine relational databases with NHibernate (or Dapper) for C# and use dibi for PHP. I used Subsonic for one project, which eventually turned out to be inefficient and impractical. Entity Framework has significantly evolved in the past year, so I haven't tried the current version yet.

SQLite (3.7.7.1 and 3.8.6)

Firebird Embedded (2.5.3)

SQL Server Compact (4.0)

VistaDB (5)

Siaqodb

Recommended on StackOverflow, but not impressive. The examples look poorly written and I didn't find any appropriate tools.

NDatabase

Object database, limited to .NET (no PHP). No good tool that I know of.

Db4o

Object database, no PHP (supported is .NET and JVM). Has a nice tool, but is somewhat Java-centric and requires different approach than relational databases.

VelocityDB

Object database, limited to .NET (no PHP). No good tool that I know of. Has lazy-loading (not for POCOs), which is kind of useful for ad-hoc manipulation.

03.09.2014 10:55 · jakub

Úřad seznámení

English summary below

Dneska jsem dostal vcelku vtipný nápad, který by ovšem mohl ve výsledku mít vážné a pozitivní dopady na celou společnost. Podobně jako máme úřad práce, který je zodpovědný za evidenci volných pracovních míst a hledání vhodného zaměstnání pro lidi hledající práci, tak bychom mohli mít 'úřad seznámení', který by měl za úkol evidovat lidi hledající vztah a pomáhat jim ho najít.

Z hlediska státu by to mělo určité nezanedbatelné benefity. Pokud by byl schopen zorganizovat stabilní partnerství, tak by to mělo kladný vliv na porodnost a následně státní penzijní fond. Společné bydlení by uvolnilo peníze lidí na konzumní spotřebu. A pokud populárně citované výzkumy nelžou, tak stabilni manželství přináší psychickou pohodu (což při národním systému zdravotnictví jsou zase ušetřené peníze).

Jednu z velkých výhod, kterou by to mělo proti současným (soukromým, komerčním) seznamkám by byl výrazně větší počet registrovaných. Vzhledem k tomu, že státní organizace jako katastrální úřad mají důvěru lidí vzhledem k evidenci příslušné agendy, tak státem podporovaný úřad seznámení by mohl mít výrazně větší množství lidí, kteří by se zúčastnili, pokud by to působilo dostatečně důvěryhodně.

A to je další faktor. Díky systému veřejného výzkumu jako jsou univerzity, by bylo o dost snadněji realizovatelné nějaké vědecky podložené párování. Existují například testy a tabulky kompatibility osobnostních typů. A předpokládám, že psychologové a statistici mají nějaké další poznatky, o kterých obecná populace neví.

Navíc to má vysoký potenciál na ladění příslušných modelů. Stát přesně ví, která manželství jsou určitě neúspěšná (ta rozvedená). A přes daňový systém a evidenci trvalého bydliště by bylo možné naopak vytipovat charakteristiky úspěšného vztahu.

Marketing by byla v podstatě trivialita. Pro začátek máme veřejnoprávní televizní stanice, pak třeba lze přihodit propagační letáček do každé obálky s volebními lístky (kdo je četl, tak ví, že by byl hodnotnější než polovina z nich).

Pokud máte pocit, že to zní trochu jako orwellovská distopie, tak uvažte, že úřad práce má podstatně větší pravomoci a řada lidí nemá problém si najít práci samostatně bez jeho účasti.

Jenom mám silnou obavu, že podle nedávných výsledků IT projektů státu to co by mohla pro začátek být triviální evidence údajů by v rukou státního aparátu nějak vyrostlo na miliardovou zakázku, která by trvala 3 roky a výsledkem by byla seznamka pro andulky.

English summary

In the Czech republic, there is a state run labour office which is given specific rights and responsibilities by law, mostly with the goal to provide appropriate means of livelihood (such as employment) for every citizen. It's not by any means perfect and many private companies are more efficient for a specific section of population, but nevertheless it provides a critical service. As a whole it's beneficial to the state.

Similarly to this, it would make sense to establish a 'dating office'. For the state there would be many benefits (eg. dating → children → pension funds, dating → happier population → lower medical expenses for psychic disorders).

Currently, the (private and commercial) dating sites kind of suck. One aspect is lack of registered users, other is lax approach to matchmaking. A state endorsement would encourage people to register and public universities would be more than able to provide appropriate tools to find the compatible people.

27.07.2014 20:49 · jakub

Men's swimwear goes back in time

Today I've been thinking about men's swimwear a bit. At the swimming pool I've noticed a quite striking contrast. While women's swimwear has liberalized over years in a such way that bikini (and monokini for that matter) for swimming are socially acceptable, the men's swimwear went through a regression. Many men wore trunks and sometimes even something even longer. While bikini make sense for suntanning, I can't exactly put my finger on this. Perhaps it's the convenience of not having a separate swimwear, but that's not really hygienic and I don't see swimming in trunks being quite comfortable enough.

As a cherry on top, for some men their trunks don't really fit and naked butts can be seen occasionally. This part is actually fun.

22.07.2014 19:49 · jakub

Crazy warrant in a sexting case in the USA

Everytime I read something like this I'm more and more determined to never ever leave Europe. Even for a vacation. While the whole case should have been dismissed, the fact that someone proposed this horrible idea and a judge have signed that warrant means that there's way too many crazy people in position of power over there.

http://arstechnica.com/tech-policy/2014/07/in-sexting-case-virginia-prosecutors-want-to-photo-teens-genitalia/

http://arstechnica.com/tech-policy/2014/07/police-drop-plans-to-photograph-teens-erection-in-sexting-case/

<rant>How is this case even possible?! Touching girlfriend's genitalia - perfectly legal, sending her picture of your own - child pornography. If anything, isn't the photographed person be supposed to be the victim? Makes me feel like screaming someone's head off. I need to watch some science-fiction (guaranteed to not be real) now to calm down.</rant>

11.07.2014 18:01 · jakub

Bioshock Infinite ending feels kind of dumb

I've just finished the Bioshock Infinite main story and decided to write a short summary of my opinion on it's ending.

<note warning>Warning: Spoilers for Bioshock franchise ahead. Also if the following post sounds too technical and uncomprehensible, it may have something to do with the fact that the title of my dissertation-to-be is “Temporal Aspects of Transparent Intensional Logic” :-).</note>

Since I've played the previous Bioshocks I knew there is a very good chance that Booker DeWitt is not going to survive. This is not a criticism of Bioshock, I've really liked the game. Rather this is a wish that maybe someone would create that is as beautiful and as deep as Bioshock without Greek tragedy style final scene, where everybody goes bonkers and people die.

In the end, Elizabeth supposedly sees and understands the infinite universes. As far as I understand, the basic idea of the theory of infinite parallel universes is that every possible universe exists (and of course, no impossible universe exists).

If Elizabeths want to prevent any Booker from becoming a Comstock, there needs to be at least as many Elizabeths as Comstocks to drown the appropriate number of Bookers. This is of course assuming that universes are countably infinite (if they are not, then the whole idea is pointless). The basic problem twofold. First is that the Booker/Comstock schizm happened before successful rescue of Elizabeth and is its direct cause (without a Comstock there won't be an Elizabeth) and therefore there are at least as many Comstocks as universe-travelling Elizabeths.

Furthermore there is at least one Elizabeth that is not participating in this solution - for example the old one from New York, but since it is possible that Elizabeth may have been killed by a stray bullet during her rescue, there must also be an universe where this is true. Simply put, there is just not enough Elizabeths to go around.

And that's not every angle. It is possible for an Elizabeth to decide that killing her father is not a particularly good idea and similarly some Bookers may not be too keen on dying. And if there is one such universe (hint: it is - every possible universe exists) then there is an infinite amount of them (not just “milions of milions”).

Unfortunately the Booker and Elizabeth we see at the end of the game are those dumb enough to not realize this.

Another thing is the final tally of people saved versus people killed. Let's assume that the drowning solution worked in all universes and there is no Comstock. This also erases any Elizabeths. Hopefully this idea of hers is not supposed to save her, since it essentially kills her. I assume that she wants to prevent the destruction of New York by Columbia. This overall hinges quite a lot on the assumption that without Comstock there won't be Columbia. Since there is actually at least one other person with a similar idea (Andrew Ryan later creates Rapture), I personally wouldn't bet on it. And since there is no Booker and Elizabeth in any universes to intervene, the results could prove be quite fatal.

Finally, there is a possibility that if all possible universes are actual universes (I hope not, since that would get a lot of me randomly killed all the time), then there are universes, in which the Bioshock ending is the happy one.

18.01.2014 23:01 · jakub

<< Newer entries | Older entries >>

blog/start.txt · Last modified: 06.03.2014 11:00 (external edit)
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki