SQL Question...
Re: SQL Question...
Oh Cygwin, how I hate thee. I was really happy when the whole "VM" thing took off, so I could easily have a proper Linux box in my Windows environment.
Just to finish up a thought for the OP:
Using mysqldump is a fantastic way to learn a lot about how to correctly model a database. If you're working on a tutorial with a sample database, it can be very educational to see exactly how the tables are constructed.
From the command line, the first example dumps out your entire MySQL database -- all db/table/index creation SQL, and INSERT statements for all of the data (a quick way to learn how to properly construct an INSERT statement for a particular table). If you just want a single database, use the second variant. The third line will recreate the database(s) from your file on another system. It's also a good quick n' dirty way to backup your database periodically.
mysqldump -uroot -p --all-databases > outputfile.sql
or
mysqldump -uroot -p --databases <dbname> > outputfile.sql
mysql -uroot -p < outputfile.sql
Just to finish up a thought for the OP:
Using mysqldump is a fantastic way to learn a lot about how to correctly model a database. If you're working on a tutorial with a sample database, it can be very educational to see exactly how the tables are constructed.
From the command line, the first example dumps out your entire MySQL database -- all db/table/index creation SQL, and INSERT statements for all of the data (a quick way to learn how to properly construct an INSERT statement for a particular table). If you just want a single database, use the second variant. The third line will recreate the database(s) from your file on another system. It's also a good quick n' dirty way to backup your database periodically.
mysqldump -uroot -p --all-databases > outputfile.sql
or
mysqldump -uroot -p --databases <dbname> > outputfile.sql
mysql -uroot -p < outputfile.sql
MFOS Ultimate Expand-o-tron Build Log: http://www.electro-music.com/forum/view ... 797#308797
MFOS Mini-Controller Build Log [FINISHED!]: http://www.electro-music.com/forum/view ... hp?t=42968
MFOS Mini-Controller Build Log [FINISHED!]: http://www.electro-music.com/forum/view ... hp?t=42968
Re: SQL Question...
Cygwin i've had other... issues... with that shell of despair.
thanks for added info Angstrom.
loydb - you're awesome! i can't thank you enough for the points of reference and instructions.
i was having my doubts about the info i was going to get from starting this thread. i am pleased at how helpful you have all been. i am most grateful to you all for taking the time... if any of you are every near Berkeley or Oakland... make sure to send a PM. the first drink is definitely on me.
thanks for added info Angstrom.
loydb - you're awesome! i can't thank you enough for the points of reference and instructions.
i was having my doubts about the info i was going to get from starting this thread. i am pleased at how helpful you have all been. i am most grateful to you all for taking the time... if any of you are every near Berkeley or Oakland... make sure to send a PM. the first drink is definitely on me.
-
- Posts: 142
- Joined: Thu Jul 13, 2006 7:07 am
- Location: DK - 1659
Re: SQL Question...
One of the better tools for mysql, when you get more into it, is this: workbench
Good visual editor, reverse Engineering, etc. Etc.
Especialy handy if you work with a framework that doesnt generate the schema for you
Good visual editor, reverse Engineering, etc. Etc.
Especialy handy if you work with a framework that doesnt generate the schema for you
-
- Posts: 1715
- Joined: Fri May 27, 2011 8:52 am
- Location: South London
- Contact:
Re: SQL Question...
trouble is with mysql is that not many people use it in industrial strength applications and it doesn't support a lot of the features that sql server and Oracle have.
Since both Oracle and Sql server have express editions which are free for non-commercial use why bother with mysql unless you are going to build a project from it?
Since both Oracle and Sql server have express editions which are free for non-commercial use why bother with mysql unless you are going to build a project from it?
-
- Posts: 1715
- Joined: Fri May 27, 2011 8:52 am
- Location: South London
- Contact:
Re: SQL Question...
yeah Cygwin sucks - I prefer to use the dos window
why could Microsoft never make a decent shell?
UNIX has about 50 - even Bourne shell is better than command prompt
BASH is my fave - going all misty eyed thinking about it - so long since I used UNIX in anger - a lost age of innocence and proper computing....
why could Microsoft never make a decent shell?
UNIX has about 50 - even Bourne shell is better than command prompt
BASH is my fave - going all misty eyed thinking about it - so long since I used UNIX in anger - a lost age of innocence and proper computing....
Re: SQL Question...
You mean, like Facebook?ian_halsall wrote:trouble is with mysql is that not many people use it in industrial strength applications
The Fortune 50 (not 500, 50) that I work for is almost exclusively a MySQL shop. Unless you *know* that the company you work at (or want to work at) is an Oracle shop (financial services, in particular, are attracted to Oracle because of its amazing robustness), a deep knowledge of MySQL will serve you well, and 90% of the knowledge you gain will be applicable to Oracle anyway.
MFOS Ultimate Expand-o-tron Build Log: http://www.electro-music.com/forum/view ... 797#308797
MFOS Mini-Controller Build Log [FINISHED!]: http://www.electro-music.com/forum/view ... hp?t=42968
MFOS Mini-Controller Build Log [FINISHED!]: http://www.electro-music.com/forum/view ... hp?t=42968
-
- Posts: 142
- Joined: Thu Jul 13, 2006 7:07 am
- Location: DK - 1659
Re: SQL Question...
and wikipedia, google, youtube! & flikr
Re: SQL Question...
must... find... reason... to... leave... tundra...H20nly wrote:Cygwin i've had other... issues... with that shell of despair.
thanks for added info Angstrom.
loydb - you're awesome! i can't thank you enough for the points of reference and instructions.
i was having my doubts about the info i was going to get from starting this thread. i am pleased at how helpful you have all been. i am most grateful to you all for taking the time... if any of you are every near Berkeley or Oakland... make sure to send a PM. the first drink is definitely on me.
Tim Tilberg - Duluth, MN | SoundCloud - Arsenal
2011 13" MBP w/8GB ram | Live 9 Suite, Reason 6.5, FXPansion DCAM/Etch/Maul, Izotope Ozone 5
2011 13" MBP w/8GB ram | Live 9 Suite, Reason 6.5, FXPansion DCAM/Etch/Maul, Izotope Ozone 5
Re: SQL Question...
I can understand Loydb's point and it's valid, to learn the complete system makes sense.loydb wrote:You mean, like Facebook?ian_halsall wrote:trouble is with mysql is that not many people use it in industrial strength applications
The Fortune 50 (not 500, 50) that I work for is almost exclusively a MySQL shop. Unless you *know* that the company you work at (or want to work at) is an Oracle shop (financial services, in particular, are attracted to Oracle because of its amazing robustness), a deep knowledge of MySQL will serve you well, and 90% of the knowledge you gain will be applicable to Oracle anyway.
Although on a personal / day-to-day working level I've never been troubled by the limitations of mySQL.
So for learning completeness, yes SQL. For actual work on jobs, most people find themselves operating within some variant or other. Foe example : Many applications use SQLite for their internal data, such as DAW browsers
Re: SQL Question...
If you ever intend to do any Android Apps then learn sqlite. It's a standard part of the framework.
"The banjo is the perfect instrument for the antisocial."
(Allow me to plug my guitar scale visualiser thingy - www.fretlearner.com)
(Allow me to plug my guitar scale visualiser thingy - www.fretlearner.com)
-
- Posts: 1715
- Joined: Fri May 27, 2011 8:52 am
- Location: South London
- Contact:
Re: SQL Question...
I work in London in finance - nobody uses mysql here - nobody - everyone uses Sybase, Sql server or Oracle.
The core sql language is pretty much the same across all vendors being some descendant of ansi 92 but there are differences - significant in the case of triggers and stored procedures (does mysql even have these?) - so best to pitch your learning to the market you intend to work in.
If you're going to work at Google (whoever they are) then learn mysql.
And BTW - mysql is only free for non-commercial use.
The core sql language is pretty much the same across all vendors being some descendant of ansi 92 but there are differences - significant in the case of triggers and stored procedures (does mysql even have these?) - so best to pitch your learning to the market you intend to work in.
If you're going to work at Google (whoever they are) then learn mysql.
And BTW - mysql is only free for non-commercial use.
Re: SQL Question...
no, that's a reduction or misunderstanding of the GPL.ian_halsall wrote: And BTW - mysql is only free for non-commercial use.
http://www.xaprb.com/blog/2009/02/17/wh ... l-license/
So making a commercial website which uses mySQL as a backbone does not require a commercial license.Here are some things the GPL allows:
The GPL allows you to run a for-profit business on MySQL.
The GPL allows you to modify the MySQL source code in any way you want.
The GPL allows you to sell MySQL.
The GPL allows you to redistribute MySQL.
The GPL allows you to redistribute your modifications of MySQL.
And you don’t have to ask anyone’s permission or pay anyone for the right to do this. Are you shocked? You shouldn’t be.
The above come with some restrictions, but those restrictions are (broadly speaking) only to prevent you from making the software less Free. So, for example, if you sell or redistribute, you have to do it under the GPL too. You cannot strip the GPL or encumber part of the software and then pass on a less-Free version of the software to others.
Here are some things the GPL does not require:
The GPL doesn’t require you to redistribute your modifications to MySQL.
The GPL doesn’t require you to GPL-license any software that merely connects to MySQL.
The GPL doesn’t require you to GPL-license all the software in your company.
So if you have to buy a commercial license for things the GPL doesn’t permit, what are those? Here are a couple of scenarios I can think of.
You need a commercial license if you want to modify MySQL and redistribute the result as non-Free software.
You need a commercial license if you want to embed MySQL within your non-Free program. Note that embed is not the same as “make a connection to.”
I have been making commercial sites on mySQL since about y2k
Re: SQL Question...
stored procedures are inherently evil. Application logic all jumbled up with the data model... evil!
"The banjo is the perfect instrument for the antisocial."
(Allow me to plug my guitar scale visualiser thingy - www.fretlearner.com)
(Allow me to plug my guitar scale visualiser thingy - www.fretlearner.com)
-
- Posts: 142
- Joined: Thu Jul 13, 2006 7:07 am
- Location: DK - 1659
Re: SQL Question...
I belive both are supported since version 5ian_halsall wrote: triggers and stored procedures (does mysql even have these?)
-
- Posts: 1715
- Joined: Fri May 27, 2011 8:52 am
- Location: South London
- Contact:
Re: SQL Question...
perhaps the best argument for using sql server is that you can build windows desktop applications in a few minutes using the free sql express.
with super tight binding into dot net it makes application development a breeze
after all - you can't actually do anything purely with sql
not quite as good as sql server but Oracle has odp.net which I use every day
with super tight binding into dot net it makes application development a breeze
after all - you can't actually do anything purely with sql
not quite as good as sql server but Oracle has odp.net which I use every day