Is there an alternative to MySQL or other server based database?

Instead of using database servers, and assuming i cant get the database in the same server where my website is hosted (“localhosting” the database), and assuming that the access to my database in my very far away server is slow, what alternatives do i have?

Is the process of generating a .txt file where a PHP script stores and parses all its data like if it was a database a faster alternative? Assuming that the parser will take the normal amount of time that a normal parser takes, like Yacc for examples (LALR(1)). If so, are there any free open source (GNUs) libs that PHP can use to achieve that?

Thanks.

SQLite? Built right into a PHP extension no installation required, no sever required.
PHP 5.3 default to: http://us2.php.net/manual/en/book.sqlite3.php

Older interface: http://us2.php.net/manual/en/sqlite.installation.php

Amazing… Thank you!