Menu

#27 add character set and collation information

open
5
2006-11-21
2006-10-11
jdanilson
No

Currently debugging some issues with character set and
collation sequence in mySql. It would be very cool to
have the database default information appear on the
table summary page (perhaps under the db version
information) and where a table differs from the
standard, shown beside the table name, and where a
column has been explicity changed to match neither the
table nor db default on the column entry. Nice to
have. Definitly not a show stopper.

Discussion

  • John Currier

    John Currier - 2006-11-21
    • assigned_to: nobody --> johncurrier
     
  • John Currier

    John Currier - 2006-11-21

    Logged In: YES
    user_id=1264584
    Originator: NO

    It's an interesting idea, but it doesn't look like character set information is available from java.sql.DatabaseMetaData. That means that it'd require three custom SQL queries for every database type (database, table and column). I'm just not sure if it'd be worth the pain.

    John

     
  • Nobody/Anonymous

    Logged In: NO

    Totally understand. Wonder if I should raise this as an issue in the java or mysql forum to get the java thingy fixed? Like I said, this is definitly not a showstopper. btw, our dev teams love your product. I've automated a sweep of all dev, qa, and prod instances every night to build the schemaspy pages. No more calling me to ask if such and such a column is varchar or int and if it even exists. We love it too! Close this but tell me if I should bug mysql or java?

     
  • John Currier

    John Currier - 2006-11-21

    Logged In: YES
    user_id=1264584
    Originator: NO

    Evidently the designers of DatabaseMetaData didn't think that character set information was appropriate for some reason or another. I seriously doubt if you'd be able to get them to add it to the spec since *every* database vendor would have to update their drivers to match. There'd have to be an incredible justification for that to happen. We might be able to come up with some reasonable SQL to extract it, but it'd definitely have to be written specifically for each type of database.

    Thanks for the kudos! We actually had DBAs at the company that I was working for when this thing evolved into something useful and they loved it for those same reasons. We had ERwin ER diagrams plastered all over the walls, but with so many customers (each with a different version of the schema) it was impossible to know which one to look at. It kind of comes from the concept of "don't trust what the comments say...look at the code". Of course I say that as I'm writing the OOD and code docs for the framework that I'm writing for a space surveillance system....ugh...not fun. The code's *really* cool, but not the doc phase.

    John

     

Log in to post a comment.