Go to Post Learning by failure is quite common. - Gdeaver [more]
Home
Go Back   Chief Delphi > Technical > IT / Communications > Website Design/Showcase
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 10-04-2007, 22:45
Gigaman2003 Gigaman2003 is offline
Registered User
AKA: Ben
FRC #1280 (The Raging Seabiscuits)
Team Role: Webmaster
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Singapore
Posts: 32
Gigaman2003 is on a distinguished road
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');
2. create new database(es) as objects and boot() them with the target database.
Code:
$database = &new PQL;
$database->boot('anewdatabase');
3. start inserting,editing,deleting,selecting and a whole lot more!
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"))');
PQL makes it very easy and fast to program PHP scripts that need databases to work, its been a godsend to me since i have so many small-medium sized projects and need to migrate/duplicate them to different servers quickly.

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!
__________________
Webmaster?
Think about making your next site a one.
PQL - The next generation flat-file Relational DBMS.

http://www.srvhsrobotics.org
Team 1280 - The Raging Seabiscuits

Last edited by Gigaman2003 : 11-04-2007 at 00:17.
  #2   Spotlight this post!  
Unread 10-04-2007, 23:25
GRaduns340 GRaduns340 is offline
The Fruit Man
AKA: Gary
FRC #0340 (Greater Rochester Robotics)
 
Join Date: Jun 2006
Rookie Year: 2005
Location: Rochester, NY
Posts: 152
GRaduns340 has a spectacular aura aboutGRaduns340 has a spectacular aura aboutGRaduns340 has a spectacular aura about
Send a message via AIM to GRaduns340
Re: PQL

That looks nice. I particularly like the PQL.Manage feature. Even with experience in databasing it's always nice to be able to take the easy road with a GUI. Very well done. I'll consider taking a look into it for some of my hobbying sometime.
  #3   Spotlight this post!  
Unread 11-04-2007, 00:15
Gigaman2003 Gigaman2003 is offline
Registered User
AKA: Ben
FRC #1280 (The Raging Seabiscuits)
Team Role: Webmaster
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Singapore
Posts: 32
Gigaman2003 is on a distinguished road
Re: PQL

thanks for the quick reply

yes, the whole reason for PQL.Manage is to make things easier for people, as well as a nice way to manage a database without burying yourself in code. PQL stores data in a format thats pretty much never going to be easily human readable. You have to first seek around the reference file that contains the location of the data, then after you get that, seek to where the data is in the data file... then you have to decrypt the data... its all really unappitizing stuff.

anyway, glad to hear you're interested, its hard to get people using something unfamiliar pql is pretty robust, the pql manual runs on it... heck even a CMS, forum and blogging engine are in the works and being powered by it.

on my list of to-dos before 1.0 are

1. stop trying to debug the query JOIN functionality and add it to PQL (im still testing it... not too sure the different types behave as they should yet)
2. query caching, pretty important this one.
3. logical map caching, not too important but could save precious microseconds
4. implement the almost completed operator preceedence preparser (right now you can't use different logical operators in the same compound clause, this will give piority to &&, then ||, then ^^ by enclosing clauses in subclauses.)
5. conform to the ACID standards... this will be pretty tough for a flat-file DBMS but doable i hope.

and get more people using PQL!
__________________
Webmaster?
Think about making your next site a one.
PQL - The next generation flat-file Relational DBMS.

http://www.srvhsrobotics.org
Team 1280 - The Raging Seabiscuits
  #4   Spotlight this post!  
Unread 11-04-2007, 10:48
themagic8ball themagic8ball is offline
Registered User
AKA: Mike Weinand
FRC #0537 (Charger Robotics)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Wisconsin
Posts: 112
themagic8ball is on a distinguished road
Re: PQL

I had thoughts of doing something similar a few years ago. Very cool to see it in action. I use MySQL for all of my websites but I'd love to give this a go if I don't get that option. Keep up the good work! (You may want to put this on Sourceforge)
__________________
  #5   Spotlight this post!  
Unread 11-04-2007, 13:59
Gigaman2003 Gigaman2003 is offline
Registered User
AKA: Ben
FRC #1280 (The Raging Seabiscuits)
Team Role: Webmaster
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Singapore
Posts: 32
Gigaman2003 is on a distinguished road
Re: PQL

Thanks for the comments. I thought about putting it on Sourceforge but decided to wait until i had a stable 1.0 before i start really promoting it.

Hope you find it useful!
__________________
Webmaster?
Think about making your next site a one.
PQL - The next generation flat-file Relational DBMS.

http://www.srvhsrobotics.org
Team 1280 - The Raging Seabiscuits
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 01:36.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi