Xepher.Net Forums

Xepher.net => Technical Support => Topic started by: Raven on May 01, 2006, 12:10:58 PM

Title: After a long time... (SQLite Related)
Post by: Raven on May 01, 2006, 12:10:58 PM
... I've decided to do something worthwhile with my space here.

The problem is I wanted to use some MySQL stuff... and it appears that Xepher wants us to move away from that (I can't make new tables in PHPMyAdmin anyway for some reason).

Basically, I've never used SQLite before, and I was wondering first of all, how do I access the database interface for it? Is there one?

Secondly, are they are major differences in coding between MySQL and SQLite?
Title: After a long time... (SQLite Related)
Post by: Xepher on May 01, 2006, 06:01:49 PM
SQLite doesn't have a database server the way MySQL does. When used in an application, it lets the application read/write directly to a database file. As such, there's not any centralized admin interface like we have with phpmyadmin. From a coding standpoint, there's almost no difference. There's a few technicalities in SQL syntax that are different (like quotes vs. doublequotes) but otherwise it's almost the exact same functions as MySQL, save that you won't be connecting to a server with the connect function, but will instead give a filename ot use as the database. If you're talking about writing something in PHP it's really easy. Basically just used the sqlite functions instead of mysql... so something like mysql_query() would become sqlite_query()
Title: After a long time... (SQLite Related)
Post by: Databits on May 02, 2006, 05:41:15 AM
MySQL is a database server, where as SQLite is not. In the event of extremely large traffic and information exchange, I hear that MySQL actually out preforms SQLite quite a bit. SQLite is more suited for smaller operations due to this, so I myself dropped it as a possibility for game server data storage. :P
Title: After a long time... (SQLite Related)
Post by: Xepher on May 02, 2006, 04:00:48 PM
Just to be clear, he's talking about "Extremely large traffic" there. Yeah, you don't run world of warcraft on SQLite. For any sort of web-based scripts and such (at least for sites smaller than ebay/amazon/etc) SQLite is more than enough. On this forum, it's about 10x faster than MySQL was in terms of actual CPU time, and I estimate it would take about 30 posts/second (constantly being posted) to get to where MySQL and SQLite were about equal.