Go Back   EQEmulator Home > EQEmulator Forums > General > General::General Discussion

General::General Discussion General discussion about EverQuest(tm), EQEMu, and related topics.
Do not post support topics here.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-12-2006, 05:51 AM
zephyr325
Hill Giant
 
Join Date: Sep 2004
Posts: 117
Default Perl Script to Compare Two Database Tables - What's Different?

Hiyas, folks.

I've got two databases loaded up on my server - the "regular" eq database, and the PEQ_Lucin database. My server is running off the "regular" databsae, but there's a lot of stuff that I'm pulling out a bit at a time from the PEQ_Lucin database. One of the things I kept running into was wanting to see if there was an item in one database not in the other. Below is a perl script that will allow you to input your "first" database name, your "second" database name, your "table" name and your "compare column" name. It will then print out a list of items in the second database that are not in the first one. There's probably a way to do this in SQL, but I couldn't find it, so here's a script that might be useful to someone.

Usage:

unique.pl -f database1 -s database2 -t table -c column

So...this program will load up the column from the table you specific in the 2nd database and see if that item exists in the first database. If it doesn't, it will print out that row for 'ya, and at the end will tell you how many differences there are.

I get an error when I upload the script. You can find it at http://www.verycarr.com/apps/scripts/unique_items.pl
__________________
"Like what you like, enjoy what you enjoy, and don't take crap from anybody."

Last edited by zephyr325; 08-12-2006 at 02:07 PM..
Reply With Quote
  #2  
Old 08-12-2006, 06:24 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

You're better off starting with the PEQ database and pulling data off the EQ database ( a lot of us are doing this). This way, you will have most of your work done, up to Kunark expansion.
EQ database is great for pulling out some basic spawns and transfering them to PEQ.
At first, I did what you are doing , and found myself doing all my work in pre-Kunark expansions.
Example:
PEQ - pre-Kunark, has most named mobs (not all) and drops EQ Pre-Kunark has very few named (boss) mobs.
After Kunark , PEQ has nothing - but EQ has many "populated" zones. EQ's "after Kunark" zones have little if any named (boss) mobs and partial drops.
In reality, they both lack a lot , but the PEQ database is a much better start with the EQ database for a reference.
What a few of us are working at, is getting work done in the PEQ database in such a way that it can be posted in these forums, so we all can benefit.
Your help is not only welcomed, but needed.
Reply With Quote
  #3  
Old 08-12-2006, 06:47 AM
zephyr325
Hill Giant
 
Join Date: Sep 2004
Posts: 117
Default

Understood - thanks - I'm actually working with Soulshot on the Darktides DB. He started from the Cavedude database and has done a lot of customizing it, and is already up and running, so we don't want to do a wholesale replacement. This is just a way to do some comparisons between the two.

My next project is actually to write something that will, based on an npc id, grab the data from the Lucin db (npc_type, spawn stuff, loot stuff, spell stuff, etc) and create insert statements in a nice, easy-to-source file. Presto, chango - you've now got a new, fully functional npc in your server.

Unless someone has already written something like this?
__________________
"Like what you like, enjoy what you enjoy, and don't take crap from anybody."

Last edited by zephyr325; 08-12-2006 at 03:02 PM..
Reply With Quote
  #4  
Old 08-12-2006, 07:49 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Quote:
Originally Posted by zephyr325
My next project is actually to write something that will, based on an npc id, grab the data from the Lucin db (npc_type, spawn stuff, loot stuff, spell stuff, etc) and create insert statements in a nice, easy-to-source file. Presto, chango - you've now got a new, fully functional npc in your server.

Unless someone has already written something like this?
No body is on that type of a grove here - it would be real nice to have a tool like that.
Reply With Quote
  #5  
Old 08-12-2006, 08:02 AM
soulshot
Hill Giant
 
Join Date: Jun 2006
Posts: 142
Default

Kind of meshing the peq's mobs, quests, and spawn tables with cavedudes extra zones and mobs. Plus our custom items, zonelines, portals. npcs, bazaar vendors etc.
Reply With Quote
  #6  
Old 08-12-2006, 03:20 PM
Zengez
Hill Giant
 
Join Date: Nov 2004
Posts: 160
Default

Got it to work great, but is there anyway to have this exported to a file? only shows the last couple dozen rows of a 2,500+ querry which doesn't really help me much
Reply With Quote
  #7  
Old 08-12-2006, 03:21 PM
zephyr325
Hill Giant
 
Join Date: Sep 2004
Posts: 117
Default

Pipe it to a file... use " > filename.txt" on the end.
__________________
"Like what you like, enjoy what you enjoy, and don't take crap from anybody."
Reply With Quote
  #8  
Old 08-12-2006, 03:22 PM
Zengez
Hill Giant
 
Join Date: Nov 2004
Posts: 160
Default

ah, well thanks for the instantaneous reply, and i'm a newb thanks again for the great tool
Reply With Quote
Reply


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 07:34 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3