|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
PQL
Hey guys, here is something ive been working on (and very excited about). Its been around for some time now, I just haven't had the time to finish writing the manual for it but finally completed it today. I thought it would come in handy to the majority of us web developers who have many side-projects and next year's site to worry about.
PQL - Portable Query Language What PQL is is a speedy, feature rich database management system that runs on flat-files. Its PERFECT for situations such as a FIRST team site which is why im posting it here. I have a full description up on the PQL site so im not going to repeat everything. Some techniques developed for PQL are pretty advanced... Don't expect to understand the query system without reading the comments and a lot of playing around .PQL in 30 seconds: 1. Portable, since it runs on flat files 2. Relational, like mysql databases 3. Delimiter-less, like Chuck Norris (no more injections corrupting your databases!) 4. Automatic data encryption, so you data is safe 5. A very advanced and innovative query system that makes even the most complicated queries a piece of cake to type out and run. 6. Open source, so you can adapt it to your needs. 7. Easy to learn, with a very detailed manual for reference. 8. Easy to script, with powerful functions that let you do more in less code. 9. Easy to implement, since its structure is similar to mysql. 10. Dean Kamen Approved. I wish ![]() How to use PQL: 1. include PQL.class.php Code:
include('PQL.class.php');
Code:
$database = &new PQL;
$database->boot('anewdatabase');
Code:
$database -> insert('profiles','John Doe',array('firstname'=>'John','lastname'=>'Doe','middleinitial'=>'K'));
$database -> edit('profiles',$rid,array('middleinitial'=>'M'));
$results = select('profiles','firstname,lastname','(({middleinitial}=="M")&&({firstname}**"John"))');
Not on the site is PQL.Manage, a set of tools in a standalone package similar to PHPmyAdmin's that allow you to do anything to a PQL database. The only things left to add are the defragmentation tool and the query tool. Here are some screenshots of its awesomeness. Note the analyze tool, which really demonstrates how PQL's internal file structure is very much like your PC's hard drive, except the files can get as big as they want. A couple of screenshots from the current progress of PQL.Manage. (yes i know i spelt occupied wrong...) Analyzing a table's fragmentation: ![]() The alter ids interface: ![]() The view tab generates an actual xhtml table with the data in the database and organized by id, index and key, but that database contains private/sensitive statistics from the PQL manual so i'm not going to show that to you ![]() Anyway, if you are interested you can grab the latest copy of PQL from the 'download pql' page in the manual (do a search, and check out the processing time for an idea of pql's speed). I update it very frequently as I discover bugs, optimize functions or decide to expand on the function set. If you want to participate in the development of PQL or need help with your own PQL-powered site you can check out our development forums at nullpo. Raw numbers for the mathematically inclined: Fields read per second : 500,000 +/-1000 Records queried per second : 10,000 +/-1000, depending on how many columns were requested and query complexity. This is without query caching. Compare this to mySQL that with a huge query cache, averages 20,000 per second on the same system. Not half bad eh? Note the queries pretty much take the same time regardless of query complexity. This is because of the logic map system that PQL uses, and how it buffers only what it needs before it runs the query, saving a lot of time. A lot of serious innovation and hard work went into PQL, I hope you like it! Last edited by Gigaman2003 : 11-04-2007 at 00:17. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|