04.07.2015, 23:46
The title says it all
I remember ****** saying something such as using SQLite for small projects since you're not running an enterprise size website. MySQL(a web version of SQLite, another implementation of the SQL language) is better for large projects whereas a small SAMP server would be perfect for SQLite, an offline implementation of the SQL language using a .db or alike file for the database storage.
|
Y_Less: "I've said this before. People think that MySQL is some simple plug-and-play magic bullet that you can use to just make your mode instantly better. The don't realise that the "L" in "SQL" means "language". So instead of programming PAWN, and using a bit of this mystery thing, you are now programming in two languages at once. If you spend months learning PAWN, you should spend the same time learning SQL, if not more - it is probably the more complex of the two languages, and not something that just gets bolted on to the side." |
Well i'm one of those who thought that MySQL is some simple plug-n-play magic bullet. xD. I think i'm changing to SQLite and I hope it's not really diffrent from MySQL so whenever i want to change to MySQL i won't have much difficulties
|
SQLite is my choice because there isn't a worry about query errors and of the such.
|
SELECT a.reg_name, INET_NTOA(a.regip), c.name, i.block FROM account_main a
JOIN list_ipv4 i ON a.regip BETWEEN i.range_start and i.range_end
JOIN list_countries c ON i.country_code = c.code
Wat. If anything, if you write wrong queries it will only be harder to debug because SQLite does not keep logs like the MySQL plugin does/can.
I also want to disprove Sergei's point about "not messing with threaded queries". If you have a moderately large database an extensive/expensive query can take a few seconds to complete. Doesn't seem like much, but if you don't thread then the main server process has to wait. This means no player updates, no callbacks being called, etc. This inevitably means that players will start to experience lag. And my final point: the version of SQLite that is included with SA-MP doesn't seem to be have been updated since it was first implemented in 2007. This means it doesn't benefit of all the updates pushed since 2007 and it also means that it lacks a very basic feature: foreign key support. It is nearly impossible to build a properly normalized database without foreign key support. But then again, most SA-MP scripters don't know how to properly use them and can get away with merely 2 or 3 tables, whereas in both SA-MP projects I worked on I exceeded 50 tables both times. |