Berkeley CSUA MOTD:Entry 37118
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2024/11/23 [General] UID:1000 Activity:popular
11/23   

2005/4/8-10 [Computer/SW/Database] UID:37118 Activity:moderate
4/8     Anyone reccomend a good mysql programming tutorial that goes
        beyond the basic select statements ? I would like to be able
        to do a distinct on specific column and then do a count of all
        the rows that have the corresponding values. thanks  --ramberg
        \_ select t.col, count(*) from tble t group by t.col;
           \_ thanks. --ramberg
        \_ MySQL by Paul DuBois (I have the 1st edition).
           \_ Is it the Paul duBois that once worked at Geoworks?
              \_ no, our pld is different.  -tom
                 \_ My main memory of pld is of him napping on keyboards
              \_ I don't know.  I knew a Paul Canavese at Geoworks, but not
                 Paul DuBois.
                 \- It may be the same Paul DuBois who wrote the ORA
                    csh/tcsh book. --psb
                    \_ Are you the Partha Banerjee in the ORA csh/tcsh book?
        \_ You might want to check out O'Reilly's SQL in a Nutshell book.
           It's not MySQL specific, but it manages to cover SQL extensively,
           and documents how the dialects vary for MySQL, Postgres, Oracale,
           and several others. -dans
           \_ I checked out the Mysql book  via orielly's safari.  I
              did not see mentioned  anything in the way of looping
              variables or being able to programmtically specify tables
              e.g. database a has a table column  that  gives you the table
              name. Is there a way to search through all of the tables in a
              db or is this something people normally program ?  I am trying
              to figure what I can do on the mysql command line and what I
              need to go into perl dbi/dbd to do.
              \_ [nb Formatting fixed] So what you're talking about is table
                  metadata.  I know mysql has commands like describe table you
                  can use to see the schema for a table, look through the
                  mysql docs on mysql.  They're really well written, thorough,
                  and up to date.  I suspect you can get at the table metadata
                  via the DBI, but don't know how as I have not written
                  anything where I needed to do so.  I'm curious though, what
                  kind of app are you writing where you don't know database
                  schema at development time?  Frequently querying table
                  metadata in your program logic seems like an odd way of
                  doing things to me (I may be wrong here, I'm certainly no
                  database guru. -dans
8       Harvesting Illegals
        http://www.frontpagemag.com/Articles/ReadArticle.asp?ID=17649
2024/11/23 [General] UID:1000 Activity:popular
11/23   

You may also be interested in these entries...
2011/12/29-2012/2/6 [Computer/SW/Database] UID:54274 Activity:nil
12/29   Is it worthwhile to use ext4 on VMs? Is Journaling necessary on VMs?
         \_ what about DBs?  I read somewhere ext3 was better for DB voumes (mysql)
	...
2009/9/23-10/5 [Computer/SW/Database] UID:53392 Activity:nil
9/23    I never took CS188, is there a good book that's an intro to formal
        database theory, normalization, etc.?  I've got experience with SQL
        (MySQL & MSSQL), and understand tables, etc.
        \_ You mean CS186?
           \_ Oops, yah.  188 is AI or something?
              \_ That's right.
	...
2008/4/29-5/5 [Computer/SW/Languages/Perl, Computer/SW/Languages/Python] UID:49852 Activity:moderate
4/29    Scaling your web app in the real world:
        http://teddziuba.com/2008/04/im-going-to-scale-my-foot-up-y.html
        \_ This article is crap.  While yes, 99.9% of all websites don't
           need any serious scalability plans, if any of them become worth
           anything they will need to scale.  If you write a web application
           without careing about scalability you are writing a webapp that can
	...
2006/4/6-7 [Computer/SW/Database] UID:42713 Activity:kinda low
4/6     mysql expert, I've created a db with mixed innodb and isam tables.
        The isam tables have *.MYD and *.MYI (data and index). However the
        innodb tables only have a small *.FRM file. Copying isam tables
        works (when your db is shutdown) but it's not true with innodb.
        Where is the actual data and index located for innodb and how
        do you copy them? Thanks.
	...
2006/3/25-26 [Computer/SW/OS/FreeBSD] UID:42421 Activity:very high
3/24    Wow!  FreeBSD sure is stable!  After seeing soda's amazing uptime
        record, I sure want to go replace my Linux boxes with FreeBSD!
        Please do not delete this, or burn down Linus' house because I have
        blasphemed the holy FreeBSD.  I'd love to see a genuine discussion with
        examples from both sides comparing the stability of *modern* FreeBSD
        and Linux machines running on x86 hardware. -dans
	...
2006/2/16-17 [Computer/SW/Languages/Web] UID:41887 Activity:nil
2/16    In PHP, If I loop $result=mysql_query("...SQL here..."); with
        a lot of results, while reusing the variable
        $result without ever using mysql_free_result($result),
        would that make the memory space blow up? Like:
        while (1) {
          $result=mysql_query("...SQL HERE...");
	...
2005/7/22-25 [Computer/SW/Database] UID:38784 Activity:nil
7/22    I never took a formal DB theory class, excuse me for asking SQL
        questions. When I create a table, I can choose PRIMARY KEY to be
        based on a single or n-tuple column. When I do that, are indices
        created automatically? Second question is, if the indices are
        created for n-tuple, does that mean all the column have fast
        index, or they are all based on previous columns? For example, if
	...
2005/7/22-25 [Computer/SW/Database, Computer/SW/Languages/Misc] UID:38783 Activity:kinda low
7/22    When I do SELECT AVG(col) FROM table, where col is integer, it takes
        2 minutes and returns a float type. I'm suspecting part of the
        problem is that it's doing floating point add? How do I make it
        faster? Thanks.
        \_ How many rows it is querying over?
           \_ about ~2,000,000
	...
2004/11/22-23 [Computer/SW/OS/OsX] UID:35021 Activity:low
11/22   What's a good database program for Mac OSX? I just found out they
        don't make MS Access for macs. I did a quick search and found a
        Filemaker. Can anyone recommend any others? Thanks.
        \_ what's your need?  FileMaker is fine (better than Access) for
           personal/home use.  -tom
        \_ MySQL?  as above, what do you need it for?  I also like
	...
2004/9/23-24 [Computer/SW/Database] UID:33727 Activity:kinda low
9/23    SQL/MySQL question:  If I create a DB with a field that's a
        varchar(256), will I be wasting a lot of disk if the data is typically
        only 5-10 chars long?
        \_ No.  It's not 1981 anymore.
           \_ I just wanted to be sure I wasn't setting up something in a
              horribly inefficient way.
	...
Cache (3780 bytes)
www.frontpagemag.com/Articles/ReadArticle.asp?ID=17649
com | April 8, 2005 More than 1,500 of our soldiers in Iraq have given their lives to ensure Americas safety. An emergency military spending bill to keep their comra des supplied with bullets and gasoline passed the House of Representativ es last month with the addition of several important domestic security m easures, including national standards for state drivers licenses. The Senate will debate the bill next week, and is considering an addition of its own: amnesty for illegal aliens. Ted Kennedy to relentlessly push the AgJobs bill (the Ag ricultural Job Opportunity, Benefits, and Security Act, currently S 359 ), which would grant amnesty to most illegal alien farmworkers, and thei r families (plus admit many, many more through a harmful temporary worke r program). Estimates are that as many as three million illegals could t ake advantage of this amnesty. Craig has said he intends to offer his amnesty as an amendment when the military spending bill is considered next week on the Senate floor. His hope is that if his amnesty is added to the Senate version of the bi ll it will be too difficult for pro-borders Republicans in the House to kill it when the two bodies meet to reconcile the different versions of the bill. Theres so much wrong with this its hard to know where to start. Firstly, regardless of the merits of bill, its simply irresponsible to hold up an emergency spending measure for an extensive debate on something as mome ntous as an illegal alien amnesty and equally irresponsible to pass such an amnesty without extensive debate. And theres little merit to the Craig-Kennedy amnesty anyway. Supporters o f the bill tell the soothing fairytale that this measure will help solve the illegal immigration problem, but this is a fairy tale weve heard be fore. Congress passed a one-time-only amnesty in 1986, and it supercharg ed illegal immigration, giving us an illegal population that is now twic e as large as before the amnesty. There was a farmworker component of that 1986 amnesty, too, which turned out to be possibly the most fraud-ridden government program in history. The story of that earlier amnesty would make you laugh if you werent cry ing. claiming to have harvested purple cotton, or dug cherries out of the ground, or picked watermelons from trees. But the political pressure to grant amnesty to as many peop le as possible was so intense, that only a handful of applications were rejected. In the end, the number of farmworkers legalized exceeded the t otal number of actual farmworkers in the whole country. We would be guaranteed more of the same this time, because the Craig-Kenn edy amnesty has even fewer safeguards than the 1986 amnesty. And this isnt just an abstract matter of following the rules. Mahmoud The Red Abouhalima, an Egyptian illegal alien cabbie in New York. It was only after he got his green card in the 1986 amnesty that he had the ability to travel to Afghanistan for terrorist training and then return to help plan the first World Trade Center attack, for w hich he is serving life in prison. Do we really want to find out what ki nds of bad guys the next amnesty will legalize, enabling them to work an d travel freely, preying on our society? And, last but not least, the Craig-Kennedy amnesty would cost the Treasur y billions. a net cost to the federal government alone of $10 billion per year. Whe n they get amnesty, their incomes (and thus tax payments) go up a little , but their use of government services balloons, because they are now el igible. Our estimate is that amnesty for all illegals would nearly tripl e the cost to Washington, to $29 billion per year. The same measure that would enable our soldiers t o defend the borders of a newly free Iraq would also undermine our own b orders.