#apache #archlinux #asterisk #centos #debian #gentoo #haskell #kde #kubuntu #lisp #math #mysql #perl #python #ruby-lang #rubyonrails #suse #ubuntu #vim #wikipedia 0 1 2 3 4 5 6 7 8 9 10 11 12 13 
Top Prev 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 Next

#mysql

<mishehu> class table inheritence? I've heard of class inheritence in c++, java, php, etc...
<mishehu> but a db table? ;-)
<RyanT5000> well i have a class hierarchy that i'm representing in a database
<RyanT5000> (i'm pretty sure it's not totally inefficient)
<RyanT5000> but the point is, i have two tables
<RyanT5000> both have an id, which is auto_increment in one and a foreign key to the first one in the other
<RyanT5000> then i have a view, which merges them
<RyanT5000> so, if i have a rule
<RyanT5000> that's ON INSERT TO
<RyanT5000> then how do i properly deal with the auto_increment?
<mishehu> RyanT5000: so that one table's row links to the other table's row you mean?
<RyanT5000> yeah
<Dewi> I'm trying to upgrade an instance on FC3 from 3.23 all the way up to 5.0
<Dewi> The upgrade instructions warn about changing character sets / collations, but I can't find any information about what character set or collations I am currently using
<Dewi> let alone what they would be after upgrade
<mishehu> RyanT5000: one possible way would be with selecting the last insert id
<mishehu> RyanT5000: but there might be a better way that I'm not thinking of right now.
<RyanT5000> alright
<mishehu> much to my dismay, i'm not the all-knowing mysql guru
<Dewi> So... what sort of objects are likely to change encoding/collation when I upgrade?
<mishehu> if I was I'd know a way to speed up this damn query that's been running for 2 hours now...
<CareBear\> mishehu : Which keys are used/needed depends on the query.
<Dewi> mishehu: hmm. Once they run that long, you have to wonder if they will ever (reasonably) terminate
<RyanT5000> how hard is it to reproduce auto_increment with triggers?
<RyanT5000> what's the deal with transactions? is a single update (i'm using execute in rails) generally atomic?
<RyanT5000> (i.e.: i have like 4 commands in a single string, which i'm executing with a single API call)
<CareBear\> mishehu : If the current task is not common, the keys may not be used in it, causing a massive performance penalty and lots of disk io.
<CareBear\> RyanT5000 : auto_increment is really nice, embrace it unless you need total portability.
<CareBear\> Ryan : What was the problem again?
<CareBear\> Ryan : Something about the views?
<RyanT5000> CareBear\: i'm using a view to do class table inheritance
<mishehu> CareBear\: http://www.pastebin.ca/363193
<RyanT5000> so i have like Agent -> User
<mishehu> auto_increment is something that should be standardized upon ;-)
<mishehu> CareBear\: that's got the schema and the query info.
<RyanT5000> and Agent has an auto_increment ID
<RyanT5000> and User has a foreign key that links to the auto_increment in Agent
<CareBear\> Agent is the sub or super?
<RyanT5000> then i have a view that combines them
<RyanT5000> superclass
<CareBear\> mt3 : Make sure you process $thisCategory and $thisPhoto so they can't be used for SQL injection.
<elaine> then run mysql_install_db
<elaine> and i put mysql.server in $HOME/mymysql
<T`> is it bad to not do something like Float(11,5) instead of Float(5)?
<T`> i can't get sqlalchemy to do the former, so thinking if i can just stick to the later.. float with 5 digit precision
<T`> it does let me store decimal(11,5).. not sure if i should use that or float though
<T`> anyone can suggest please?
<archivist> decimal for money
<T`> archivist, oh.. so if wnated to store 1.4244 or so..
<T`> can you tell me why? i'm trying to learn..

Previous Page  Next Page

Search ircarchive.info