[Novalug] more questions about mysql
Bonnie Dalzell
bdalzell@qis.net
Wed Feb 16 11:41:08 EST 2011
does anyone have time to answer soem beginner questions about mysql?
I am accesing my database via a perl program I am writing
if you delete a record does mysql reuse that record id number? does it
leave it to be reused or can one set it to permantly ignore the
record id number?
can the number of choices if a record cell is designated as enum, be added
to later on?
it took me a whole day to determine that there is no simple way to do a
"if record where name matches "something" does not exist, add new
record, else update record"
command
if a command line perl program sends an inquiry to the db for a non
existant record you get an error back not just a no record report. this
does not stop the program but it makes the command line messy and hard
to read.
it turns out that the most difficult part of my dog database so far has
been making an add new record section that can screen to be sure that one
does not produce a duplicate record for a dog. this is because the sources
of information on new dogs are variously incomplete. some lack the
registration numbers for the dogs, some lack dates of birth and of
course there is the problem that the dog's names can have minor
differences in spelling yet refer to the same dog:
Sally's Black Tornado in one catalog with an AKC reg number while he is
Sallys Black-Tornado in another catalog with only his date of birth,
etc.
Ultimately a human needs to make a judgement as to wether it is a
different animal with the same or similar name but setting up the new dog
entry to make it easier to determine this is the tricky part of this
part of my project.
but i found a site that told you how to do it provided you have your
column that you use to search for the record on set as a unique key
column.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Bonnie Dalzell, MA
mail:5100 Hydes Rd PO Box 60, Hydes,MD,USA 21082-0060|EMAIL:bdalzell@qis.net
Freelance anatomist, vertebrate paleontologist, writer, illustrator, dog
breeder, computer nerd & iconoclast... Borzoi info at www.borzois.com.
HOME www.batw.net ART bdalzellart.batw.net BUSINESS www.boardingatwedge.com
More information about the Novalug
mailing list