Talk:Database Schema

From ISFDB
Revision as of 14:33, 18 March 2008 by NsqIe4 (talk | contribs)
Jump to navigation Jump to search

electrika movie al pacino movie quotes access defibrillation public video link letters of praise eo video crack 1.36 http motorola cell phone ring tone 1first gmac realty iowa edit home video in nj northern videographers wedding tax relief reconciliation act of 2003 steam shower gay dad son pic jobs no one wants property for sale in the uk jamie thomas skate videos anaesthesia colonoscopy performed screening usually song football elizabeth hurley nude video clip jenny mccarthy airport video lapdance video clips nero version history a team movie news abcs movie of the week jordans video integrated sis mirage2 graphics with 128mb shared video memory arcade big game home video earth spinning video internet subir video attached carlos mencia no string video new camaro homebuilt cnc latina girl shine mp3 illusionism in movies escort exterior ford part zx2 air conditioning home recharge lesbian kissing movie gallery silver solder ireland music music.uk video yahoo page privacy fences direct merchant account central ipod video win free busty mature pic work at home with no investment we belong together-mariah carey custom airbrushing adult video party giro ditalia korean movie the classic island movie staten theater free pamela anderson tommy lee movie star symbol keyboard after day movie review tomorrow elvis presley download free video lisinopril army basic training movies flowers pictures nickel exploration adoption game site sprite video san andreas car stats image krull movie laritza latina movie uniform residential loan application singapore airline reservation lakeville movie animalmovies.com american express gold card www loews movie theatres new york city eyes wide shut movie korman communities durham nc 2 cheetah girl picture auction charity movie premiere unlimited ringtones jackson square movie theater main here audio file fix mpg video abu movies com semisonic secret smile inside vagina video japanese tattoo symbols lamborghini diablo lighting in a bottle movie equipment houston race track baywatch hawaii jamie pressly nude videos adapter component s video andrew giuliani inauguration video here kerry fox video dining tables mootsie tootsie wireless spy camera darkstar wheels amateur nude teen video holly kiss kiss valance video andrew mccarthy movies loving video hair loss jane fonda exercise videos designer handbags lexus locklear video i.us online pharmacy phentermine jacket leather motorcycle woman satellite key code indian blankets nicole richie adding calculator machine car show babes milf lessons jazzercise video workout wv tax dept legendary frog flash movies anne coulter canada video bedroom themes site satellite key amneville horror movie diodoquin 10 mark scubapro jamaican foods horse stall mats food carts safety cartoons dog breads ah64 videos 531 but can from say trackback electronics workbench iraqi resistance video clips phone card to india uk rear entry sex video andi free movie pink action favorite movie bubba crosby petersen tom just luck movie poster ice speed skating video just like a pill music video lollywood movie nude latina pussy.jpg pilonidal dimple jack johnson video downloads arm9 usb video asimo robot video correction dept illinois inmate informal beach wedding gowns costume gothic halloween kid antivert amerika rammstein video linkin park chester cancer live sex video feeds mooney airplane company inc. eve online movies lorazepam pvc heaters intercourse videos audition movie new keyboard combo review best toilet lingerie videos password erna sully ginger bath fixtures i like the way you move video girl intervideo dvd copy crack groovehouse mp3 dumb criminal video wilhelm grimm latest sandra bullock movie first anniversary idea yoko kumada torrent joy in the morning movie mosquito ringtone inventions alexander graham bell invented download mp3 50 cent ingigo movie smock apron side effects of crohns disease sportsmans guide catalog end of the line belly bra ipod video clip revia naltrexone asian chat room anorexia movies domain ice age movie preview orlando, florida arts directory movie open jim carey movie quotes www distributed automation canopen impulse paintball video live video code amy carlson senior population teaching uncle toms cabin adobe video collection pro academic jeuxvideo.com iraq gunship video 67 driver jaton pro video strategic planning software jeremy camp videos audition for sex video the snowy owl inn down on the corner custom gunsmiths golf discounts torres gemelas indian porn movie eyemovies atthemovies aircraft crash video clips ti 83 free ware extreme movie manager serial beach gay hunk group sex eo video key generator cat flea revolution audio video system charlotte nc insomniac lyric elf fight movie snowball transitions words and phrases clip flower tucci siemens free unlocking top kannada movies free download mondas amateur free movie porn video american bandstand clip video lamson session angel boris video american hick idol taylor video andrea gioco s video l subramaniam east meets west http ggw games atrium movie theater venomous snakes fucking hardcore orgy audie murphy movie bear photos edward scissorhands movie review dankoff solar pump lighters up music video code houston business journal john man movie quiet wayne url boom truck stanozolol rack hosting budget car insurance woman katie price movie download a practical guide to need assessment loans missouri home builders association 3 prong electrical online quilting fabric store ichat video ports capitol blue wwoofer nz install crown molding video spice modelling fluid power resignation letter template lavar arrington videos k700i video files voip consultant atl gross movie pimping all over the world vestidos novia i am sam movie poster april clip little movie a famous movie star of the 1920s health food store korean movie reviews restaurant new york valentines aquarium stands environmentalism faith future greener our planet religious armored group economical heating source web site ada compliance hot ass picture alien singing i will survive video sierra trading post coupon code jamaica dancehall video amateur free movie video voyeur adhd medication natural snake enclosures image extractor download events corporate solex carburetor kit lair lair the movie capitol federal www milli piyango gov indalex egyptian sex == Examples of pub_content usage ==

A simple NOVEL publication has a NOVEL content entry. When you display the publication, there's no need to show the contents, as a Novel obviously contains a Novel. When you edit the pub though, the NOVEL content record is shown as you might want to put a page number on it, for instance. Here are the relevant bits of the relevant records, we have one entry in each table.

pubs                        pub_content                     titles
pub_id: 183625              pubc_id: 739717                 title_id: 459
pub_ctype: NOVEL            pub_id: 183625                  title_ttype: NOVEL
pub_tag: DTHBSTVXTX1978     title ID: 459                   title_title: Deathbeast
pub_title: Deathbeast


Of course, a NOVEL Title doesn't have to be in a NOVEL publication. What if it's part of an Omnibus? You obviously want a link from the NOVEL title to the OMNIBUS publication. And a link for each other NOVEL to the same OMNIBUS publication. But an Omnibus isn't just the sum of its contents, so there's an OMNIBUS title record as well in the same pub. Again, this doesn't need to be shown when you display the publication, but we DO want to display the NOVEL contents. This time though, the OMNIBUS record is hidden when you edit the pub - there's nothing you really need to do to it. (Well, you could set a length for it, which is the way we record how many entries, or which entries from a series, make up the omnibus. But we do that on the Title itself instead.)

pubs                        pub_content                     titles
pub_id: 174441              pubc_id: 673891                 title_id: 503331
pub_ctype: OMNIBUS          pub_id: 174441                  title_ttype: OMNIBUS
pub_tag: DDFNNLKHNL2000     title_id: 503331                title_title: Dead Funny
pub_title: Dead Funny

                            pubc_id: 673901                 title_id: 1926
                            pub_id: 174441                  title_ttype: NOVEL
                            title_id: 1926                  title_title: Flying Dutch

                            pubc_id: 673911                 title_id: 8769
                            pub_id: 174441                  title_ttype: NOVEL
                            title_id: 8769                  title_title: Faust Among Equals


There's actually another content record for this pub, a COVERART record. This stays hidden when you edit the pub, because it's maintained automatically when the Artist field is used.

                            pubc_id: 673881                 title_id: 503321
                            pub_id: 174441                  title_ttype: COVERART
                            title_id: 503321                title_title: Cover: Dead Funny

COLLECTION and ANTHOLOGY pubs (and even NOVELS) also have content title types such as SHORTFICTION and ESSAY and INTERIORART and POEM that show up on the pub display and while editing, they're pretty harmless so long as you understand that you're not working on the entry in this pub alone, you're working on ALL entries of that title in ANY publication. INTERVIEW and REVIEW types have their own sections while editing, but you may need to change one of the other content types to one of these if it was mis-entered at first. Those require an extra field to be entered though (the Author moves to Interviewer/Reviewer but you still have to add Book Author/interviewee), so you'll want to do two passes of edits.

It's the Special record used to link the title and pub that is dangerous to change: if one of these becomes visible while editing, try and keep the pub type and entry type matched: NOVEL to NOVEL, COLLECTION to COLLECTION, ANTHOLOGY to ANTHOLOGY, OMNIBUS to OMNIBUS. Sometimes when correcting a publication type, one of these special records isn't hidden away any more and looks as though it could be usefully changed to a normal content record: e.g. if a NOVEL called "XYZ" is actually a collection with a Short Story called "XYZ" in it, it may be tempting to change the XYZ NOVEL record to the SHORTFICTION entry that's required. DON'T! The NOVEL record should change to COLLECTION to keep the link working, and a SHORTFICTION for "XYZ" the short story is added separately.

The problems that start when you lose the link record that matches a pub and title may not be obvious immediately, but if you find pubs where the hyper-link to the title record isn't present, or get warnings about title record mismatches, or you get warnings when Cloning or trying to Remove Titles from a pub, stop and check. Ask for help if needed.

NONGENRE and NONFICTION look as though they might be used for normal contents, but they're not intended that way: they're intended to be the ONE main record for a publication that's of little interest to us as it's not SF - this is why we have troubles if we try and enter Non-Genre Short-fiction in a Non-Genre Publication for instance. Interesting Non-Fiction pieces in a publication should be of type ESSAY - one big NONFICTION record would be used to class the whole pub as NONFICTION, and not worth going into a lot of detail about in ISFDB.

SERIAL shouldn't give you a problem if you're working on books, it's intended for magazines (although it has been used within books to group episodes of a story that aren't consecutive in the book). But if you're working on magazines, then you will come across EDITOR and COVERART too - but I'll leave explaining those to a Magazine mod.

I hope this helps! BLongley 09:37, 21 Oct 2007 (CDT)

Things to do with pub_content in MySQL

As you can see from above, there may be a number of content records for even the simplest pub, so let's start with a simple case: NO content records for a title. Here's some SQL to find them:

select t.title_id, t.title_title from titles t 
where not exists (select 1 from pub_content pc 
                  where pc.title_id = t.title_id)
and t.title_parent = 0
LIMIT 100

You'll want that "LIMIT" on the end as there are quite a few of them.

So what's wrong with these?

  • There can be titles we are sure exist, but we don't have details of any publication yet: you could go search one out at an internet bookshop and create a publication, if you like. First editions are best as they tend to confirm the date on the title.
  • Maybe the title record shouldn't be there: if someone deleted some pub that turned out to be an RPG dice set, the title wouldn't go automatically, it has to be deleted in a second submission. Maybe someone forgot that second submission?

Simple, eh? Well, I kept it simple deliberately, by restricting it to non-variant titles. Let's take out the "t.title_parent = 0"

select t.title_id, t.title_title, t.title_parent from titles t 
where not exists (select 1 from pub_content pc 
                  where pc.title_id = t.title_id)
LIMIT 100

Look at the title_parent: if it's not zero then this is a Variant title. (This is why the way to remove an incorrect variant link is to set the parent to zero, rather than blank.) In which case:

  • The "missing" publication(s) might be stored under the parent instead, and need to be moved back, or
  • We're just missing the publication(s) for THIS variation of the title (feel free to go find one to enter), or
  • There never WILL be an entry under this variation.

Why is the last OK? Well, consider Iain M. Banks and Iain Banks. They're the same person, using the world's least-confusing pseudonym. Any given book of his is published under one name or the other, depending on whether it's SF or not. However, we keep ONE canonical author record for him, and so we need all his books to have an entry for "Iain M. Banks", even when that publication will never be published under that name, only as by "Iain Banks". So one variant will have pubs, the other won't: it's just to put all the titles under one name, and the software will figure out the "as by" for us. This is why the simple case above is actually less simple than two cases: again, it might be fine to have an empty title if all the publications go under a variant title of the one you're looking at.

If this is confusing you, just try it out. You can search for the t.title_title in ISFDB itself, with the usual title search: if you want to search by the t.title_parent, then you can put that number into a URL and search that way, e.g.

http://www.isfdb.org/cgi-bin/title.cgi?887

or use some more SQL:

select * from titles t where t.title_id = 887

There's one other over-simplification I've made here you may have already noticed. What happens when there's a variant title of a variant title? Well, that's when people start getting headaches, so that's worth saving for a different topic.

Let's try it from the other side

How about, instead of titles with no contents, pubs with no contents?

select p.pub_id, p.pub_tag, p.pub_title, p.pub_ctype from pubs p 
where not exists (select 1 from pub_content pc 
                  where pc.pub_id = p.pub_id)
LIMIT 100

(Again, you may want a LIMIT on this, there's a few hundred.)

If you plug the resulting pub_title information into a publication search (last of the Advanced search options), you may well think everything looks OK, it finds the publication alright. You can even click on the Title and find a fairly normal-looking display. (Can you spot the missing bit though?) Try it in the Advanced or Normal title searches and you won't necessarily find ANY records though. Search for that author and you won't necessarily find that title. If you do, you won't find that pub under it.

What's happening here then? Well, without a pub_content record linking the pub to the title, you don't get the title link appearing when you look at the pub. The Author's titles still show up, but this publication won't appear under them. How to fix? Simple! Once you've found the publication (remember, only the advanced pub search will work) you'll either find the orphan record, or the orphan record and a good record to go with it. For instance, at the moment I can see

pub_id	pub_tag	        pub_title	                pub_ctype	
5643	BBBLSNDTHSA2004	Bubbles and the Secret Admirer	NOVEL	

and searching for "Bubbles and the Secret Admirer" shows:

5642 	Bubbles and the Secret Admirer 	E. S. Mooney 	2004 	48 	BBBLSNDTHS2004 	tp 	NOVEL 	0-439-49177-0 	$3.99 	Scholastic
5643 	Bubbles and the Secret Admirer 	E. S. Mooney 	2004 	48 	BBBLSNDTHSA2004 	tp 	NOVEL 	0-439-49177-0 	$3.99 	Scholastic

Record 5643 can be deleted as record 5642 is the good version.

However, I also see:

pub_id	pub_tag	        pub_title	pub_ctype	
5641	BRTRBTSTP2004	Brute Orbits Tp	NOVEL	

And searching for "Brute Orbits" (as I guessed the "Tp" was an error) finds:

Record 	Title 	Authors 	Year 	Pages 	Tag 	Binding 	Type 	ISBN 	Price 	Publisher
5639 	Brute Orbits 	George Zebrowski 	1998 	222 	BRUTEORBIT1998 	hc 	NOVEL 	0-06-105026-1 	$23.00 	HarperPrism
5640 	Brute Orbits 	George Zebrowski 	1999 	? 	BRTRBTSTP1999 	tp 	NOVEL 	0-06-105380-5 	$15.00 	Eos
225585 	Brute Orbits 	George Zebrowski 	1999 	336 	BRTRBTSTJD1999 	pb 	NOVEL 	0-06-105807-6 	$6.99 	 HarperPrism
5641 	Brute Orbits Tp 	George Zebrowski 	2004 	? 	BRTRBTSTP2004 	tp 	NOVEL 	0-06-105380-5 	$15.00 	Eos

We don't have a 2004 trade paperback edition, so we probably want to rescue this 5641 stray. You can get to edit this publication directly via the "record" link, or via the title link and "Edit this pub". Remember all the "Special" contents records I told you not to mess with? Well, this is a time where we DO want to mess with it, as it's broken. As there's no content at all, the software invites you to enter an ANTHOLOGY - we don't necessarily want that though, we want what the publication says. (Most seem to be NOVELs though.) Fortunately there's enough info there - enter a Content record with the right title, author, type and date and submit. Pick the date from the earliest GOOD record, or from the pub, it won't matter - we're going to have to merge titles after approval anyway. You should probably make sure the title matches up, so that it's easy to search for the titles to BE merged.

You may find a complete stray, with no other good record equivalent: you can fix it this way so other editors will come across it naturally, or research the pub and delete it if it's completely wrong.

How does this happen? I don't know. If you find new examples being created, let us know. I personally suspect that the ISFDB-1 to ISFDB-2 conversion created such entries (as there's often a good pub entry with a pub_id 1 less than the pub_id of the bad pub entry) , in which case this article will become obsolete when we've fixed them all. BLongley 15:08, 21 Oct 2007 (CDT)

From too few to too many

OK, we've looked at pubs with not enough (i.e. zero) contents, and titles with not enough (i.e. zero) contents, what about when there's too MANY contents? I'm not talking about books with a lot of SHORTFICTION or ESSAYs in them, those are common: they're probably an ANTHOLOGY or COLLECTION. And a book about or by an artist may have a lot of INTERIORART. It's the Special, linking, content records that might be a worry. I mentioned that a simple case is a NOVEL containing a NOVEL: and we all know that a book containing two or more NOVELs is called an OMNIBUS, isn't it? So let's go find some Omnibuses that haven't been called that.

select p.pub_id, p.pub_tag, p.pub_title, p.pub_ctype 
, COUNT(*)
from pubs p, titles t, pub_content pc
where pc.pub_id = p.pub_id
and pc.title_id = t.title_id
and t.title_ttype = 'NOVEL'
and p.pub_ctype != 'OMNIBUS'
GROUP BY p.pub_id,p.pub_tag, p.pub_title, p.pub_ctype 
HAVING COUNT(*) > 1
LIMIT 100

Oh dear - it seems that sometimes we don't call a book with two NOVELs an OMNIBUS, we might call it an "Ace Double" instead:

pub_id	pub_tag	        pub_title	                        pub_ctype	COUNT(*)	
1591	CRSSTNVFE1958	Across Time / Invaders From Earth	NOVEL	        2	
1769	GNSTRCTTTH1972	Against Arcturus / Time Thieves	        NOVEL	        2	
1998	LNFMRTMC1956	Alien From Arcturus / Atom Curtain	NOVEL	        2	

One for a Standards discussion maybe. I don't own many, and none of those, so I'm opting out of that for now. I can't ignore these though: record 4545 comes up:

pub_id	pub_tag	        pub_title	pub_ctype	COUNT(*)	
4545	BIPOHL1982	BiPohl	        NOVEL	        2	

It's a title I might have considered buying, and Advanced searching for "BiPohl" publications shows these:

Record 	Title 	Authors 	Year 	Pages 	Tag 	Binding 	Type 	ISBN 	Price 	Publisher
4545 	BiPohl 	Frederik Pohl 	1982 	313 	BIPOHL1982 	pb 	NOVEL 	0-345-30247-8 	$2.75 	Ballantine Del Rey
4546 	BiPohl 	Frederik Pohl 	1987 	? 	BPHL1987 	tp 	OMNIBUS 	0-345-35005-7 	$3.50 	Ballantine
136061 	BiPohl 	Frederik Pohl 	1982 	314 	BPHLLHKQVN1982 	pb 	OMNIBUS 	0-345-30247-8 	$2.75 	Ballantine

It turns out 136061 has been verified, and contains two novels I already own - just the sort of information I wanted! Saves me buying a book I don't need. Looking at 4545 makes me think it's a Duplicate, and can be deleted.

Here's another book I own a version of:

pub_id	pub_tag	        pub_title	pub_ctype	COUNT(*)	
13811	FRSTLNSMN1982	First Lensman	NOVEL	        2	

Oh dear, when I try and edit that I see it's got TWO identical NOVEL entries. Never mind, I can "Remove Titles From This Pub" can't I? No. ISFDB hides the "correct entry" for me: unfortunately both are correct, we just don't need TWO of them.

Blank out one of them? Doesn't work.

How about if I change the title type to something different like ANTHOLOGY? Well, that shows up the two NOVELS for removal in "Remove Titles From This Pub", let's try removing one. There's a big yellow "WARNING: Unable to locate the title reference for this publication" message though... oh well, it's a screwed-up pub anyway, let's try it - Wey-hey, it worked! OK, now I need to change the title back to NOVEL.

I'll do a few more whilst I'm at it.

pub_id	pub_tag	        pub_title	pub_ctype	COUNT(*)	
22863	MRTHNHMN601953	More Than Human	NOVEL	        2	
22864	MRTHNHMN1953	More Than Human	NOVEL	        2	

Oh no! I suggested we remove ONE title, it says I want to remove BOTH! REJECT, REJECT, REJECT! Or maybe not. So long as I put the title BACK afterwards it's OK. Phew, that worked. Oh wait, it's considered a new title - merge them both and we're back to normal. This is definitely NOT for the faint-hearted! Far better to leave it alone and call for help, I think. And it's arguable about whether it's an anthology anyway, it seems. Maybe it's a novel with some extra short-fiction and essays? TWO copies of the same novel in one pub was obviously wrong, but unless I've got all the data about that novel saved in case I need to put it back, I'm not going to touch such again for a while. So much more to learn...

Back to a simple table

The last example caused too much thinking, so let's go look at another simple table that may be of use: Verification. Hopefully if you've got to this stage, you've been verifying the publications you actually own. Primary Verification where you've still got the book is reference_id 1. If you want to mourn books you didn't keep, the "Primary (Transient)" is reference_id 12. Note that this does NOT match the reference_id in the reference table!

Here's how I find what I verified:

select p.pub_id, p.pub_title, v.ver_time
from pubs p, verification v
where v.pub_id = p.pub_id
and v.reference_id = 1
and v.user_id = 2781
ORDER by 2

That's alphabetical by title, you may want to ORDER BY 3 instead if you're trying to find all the early verifications you did that you think aren't quite good enough by your current standards. ;-)

Of course, that's just me bragging about MY verifications as it stands - you need to put your own user_id in, I'm 2781 and you're NOT. YOU are... well, we can't find that out from SQL, the backups hide all the personally identifiable information. (Phew!) You'll need to go look at your own Wiki preferences and read the first line, "Your internal ID number is XXXX". I bet you haven't looked at THAT page for a while, maybe there's something else you'd like to update while you're there?

"Bill, you haven't put the author in there, how do you tell your Starburst by Pohl from your Starburst by Bester?" Well, of course, I've memorised the pub_id for everything I still own... ;-) Nah, just kidding. The reason is that a lot of my books aren't by a single author, or are by a variant author, and tonight I just want a simple example. It'll get complex enough soon enough, you can be sure of that. Just try the simple things for now. BLongley 16:03, 23 Oct 2007 (CDT)

Why the Publisher Search doesn't work

You may, for instance, have decided to have a look for all the Ace Doubles I pointed out earlier. And the Advanced Search does offer you the opportunity of searching for publications where Term 1 is 'Ace Double' and the search-type is 'Publisher'. This gives a nasty-looking set of Python error messages - don't worry, you haven't broken anything! Some of the error says:

select pubs.* from pubs where pubs.pub_publisher... '�e Double%' order by pubs.pub_title limit 100"

- this is a shortened version of the SQL it's trying - and the explanation is

"Unknown column 'pubs.pub_publisher' in 'where clause'"

Pretty self-explanatory really, as there is indeed NO pubs.pub_publisher column in the pubs table. So what SQL should be being executed? Well, the publishers seem to have been normalised into their own table, publishers, which is quite a simple one:

desc publishers;
Field          Type            Null    Key
publisher_id   int(11)         NO      PRI
publisher_name varchar(64)     YES		
note_id        int(11)         YES

We can search for 'Ace Double' in here:

select * from publishers 
where publisher_name like '�e Double%'
publisher_id   publisher_name   note_id	
381            Ace Double		

and if you look at the pubs table, sure enough there's a publisher_id column there we can search by:

select * from pubs p 
where p.publisher_id = 381
LIMIT 100 

Bingo! Lots and lots of Ace Doubles. Of course, you can find most of them just by searching for titles of ' / ' in ISFDB itself, but SQL can be a bit more generic, or more specific - ' / ' finds some NON-Ace Doubles for instance. Combine the two queries and use something like this to search for publications by the Publisher of your choice: replace "Bill" with the publisher you want.

select pu.publisher_name, p.* 
from pubs p, publishers pu 
where p.publisher_id = pu.publisher_id 
and pu.publisher_name like '%Bill%'
order by p.pub_title
LIMIT 100

This seems to be a good example of what the database USED to be like - where there once was a pubs.pub_publisher column? - and what it may well become: that publishers.note_id column hasn't been used yet.

"And Not an Omnibus...."

There's another Python problem if you try that in Advanced Search. Say you've tackled all the Ace Doubles, and now want to look at everything else that has ' / ' in the title, but ISN'T an Omnibus. Well, it's easy to search for ' / ' and Ttype of 'NOVEL' for instance, although the search won't recognise the spaces around the slash. But trying to search for ' / ' and NOT Ttype of 'OMNIBUS' doesn't work:

ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the
right syntax to use near 'ANDNOT titles.title_ttype='OMNIBUS' order by titles.title_title limit 100' at line 1")
args = (1064, "You have an error in your SQL syntax; check the ... order by titles.title_title limit 100' at line 1")

That seems to suggest that ISFDB is using "ANDNOT" rather than "AND NOT". Dead easy to correct if we run the SQL ourselves though:

select t.* from titles t
where t.title_title like '% / %'
AND NOT t.title_ttype = 'OMNIBUS'

OK, that shows there are plenty of other types to exclude. You may want to try something like

select t.* from titles t
where t.title_title like '% / %'
and not t.title_ttype = 'OMNIBUS'
and not t.title_ttype = 'COVERART'
and not t.title_ttype = 'INTERIORART'
and not t.title_ttype = 'ESSAY'
and not t.title_ttype = 'POEM'
and not t.title_ttype = 'EDITOR'

Or if we remember "!=" is slightly less typing:

select t.* from titles t
where t.title_title like '% / %'
and t.title_ttype != 'OMNIBUS'
and t.title_ttype != 'COVERART'
and t.title_ttype != 'INTERIORART'
and t.title_ttype != 'ESSAY'
and t.title_ttype != 'POEM'
and t.title_ttype != 'EDITOR'

Or even better, remember "NOT IN" and use:

select t.* from titles t
where t.title_title like '% / %'
and t.title_ttype NOT IN ('OMNIBUS', 'COVERART', 'INTERIORART', 'ESSAY', 'POEM', 'EDITOR') 

You could also use "IN" rather than "NOT IN" and list the other types instead - title_ttype is fixed to certain values, namely 'ANTHOLOGY', 'BACKCOVERART', 'COLLECTION', 'COVERART', 'INTERIORART', 'EDITOR', 'ESSAY', 'INTERVIEW', 'NOVEL', 'NONFICTION', 'NONGENRE', 'OMNIBUS', 'POEM', 'REVIEW', 'SERIAL', 'SHORTFICTION', 'CHAPTERBOOK'.

Lots of options, but all quite simple, and all working around a simple problem.

Are you LOOKING for trouble?

Hopefully by now you can spot what this SQL is trying to do.

select p.pub_title, pc.pub_id, t.title_ttype, count(*)
from pub_content pc, titles t, pubs p
where pc.title_id = t.title_id
and pc.pub_id = p.pub_id
and t.title_ttype IN ('ANTHOLOGY', 'COLLECTION')
and p.pub_ctype != 'OMNIBUS'
group by pc.pub_id, t.title_ttype
having count(*) > 1

It's OK to have an Anthology or a Collection as part of a bigger book, if the book is an Omnibus. You'd have contents for the Antholog(y/ies) and Collection(s) AND contents for all the shortfiction and essays and such too. That's fine. But we don't want collections of collections or anthologies of anthologies. And some of these problem publications have the SAME title in them twice (who ignored the big Yellow Warning messages about merging, eh?).

But these are not simply classifiable from the above information alone, you're going to have to investigate, and make some pretty dangerous edits in the meantime too.

DO NOT TRY THIS IF YOU DO NOT KNOW HOW TO PUT THINGS BACK TO AT LEAST NO MORE THAN THE SAME SORT OF PROBLEM AS THEY HAD BEFORE!

OK, now I've warned you, let's have a look at a few:

A Star Above and Other Stories	1190	COLLECTION	2	

Two collections within one collection? Not that ISFDB will show you that. Changing the Pub type to NOVEL showed up the two collections though. One (with some Internet research despite the NESFA site being unavailable) seems clearly bogus, so "Remove Titles from this pub" got rid of that one. The other is right(ish) - it's "A Star Above It and Other Stories". So that got retitled, and although I don't want to put all the contents in (I don't own it, can't "Look Inside" on Amazon or suchlike, and it postdates the catalogue at tamu.edu) I've at least left the suspected contents in notes for someone to sort out later. It IS a collection though, so the pub type got changed back.

Anasazi	2564	COLLECTION	2	

Changing the Pub type to NOVEL showed up the two collections again. Unfortunately they were both the same one, so when I "Removed Titles from this pub" BOTH went, and I had to put one back. Fortunately Contento had details of the contents of this edition, so they now have page numbers. Unfortunately there is a second printing too, so I needed to merge the Collection titles again afterwards. (Yes, changing to NOVEL is usually a temporary measure only, this needed to go back to "COLLECTION" status.)

Bending the Landscape: Science Fiction	3999	ANTHOLOGY	2	

This was a simpler one. Changing the Pub type to NOVEL showed up the two Anthologies, and one was called an Introduction - clearly an 'ESSAY' mis-classified. So I fixed that entry, changed the pub type back to 'ANTHOLOGY' and it seems OK now.

Note that the usual resolution is to change the publication back TO the type you changed it FROM. If you've ignored the Big Warnings and got out of your depth, this is the usual thing to try even if you haven't fixed anything.

DO please ask for help if you think you've made things WORSE.

Best from Fantasy and Science Fiction: 14th Series	4076	ANTHOLOGY	2	
Best from Fantasy and Science Fiction: 22nd Series	4083	ANTHOLOGY	2	

Well, these ones are easy - ISBN-10: 9997374851 - ISBN-10: 9997376463 - just zap them. There are GOOD records for those titles around still, we can do without this rubbish. (Yes, I did check if there was more information about them under those ISBNs, but only Amazon admits they exist and Amazon is WRONG.)

Beyond the Galactic Rim / The Ship From Outside	4374	COLLECTION	3	

That looks familiar... oh yes, already fixed under the Ace Double initiative. Ignore. Here's an interesting pair though:

Blood