Beginner using MYSQL Workbench - mysql

Good day everyone and thank you in advance.
I'm studying database design and we started with SQL basics, specifically relational operators. Next, we will be doing proper-ish, basic python + SQL.
In order to learn the work, I figured the best would be to use a SQL program to help me visualize the relational operators' effects on a database. First I used SQL Fiddle, which seemed okay, but the next morning all my work was gone, and it seems they are having technical problems. So I switched to MYSQL Workbench, easily created all the tables, but now I can't seem to run a simple script. More specifically, I do not know how to. The only examples available on the web are outdated, and or I lack the knowledge to properly search for the answers.
I know it's a dumb, low-level question, but I would really appreciate it if I can just figure this out and run basic scripts on the database.
Screenshot: https://i.stack.imgur.com/Sh3Qf.png

Related

mySQL tutorial for writing SQL statements and DB scripts

Thanks in advance.
Is there a tutorial (preferablly free) out there that'll walk me through how to write mySQL statements?
I'm not interested in learning about installing and configuring mySQL since this is something handled by experts and I wouldn't have permissions to do this anyway.
Specifically, what I'm looking for is a tutorial that utilizes a database (Sakila perhaps?) that actually teaches how to write mySQL commands, AND that has questions for me to answer (via written SQL statements) with the accompanying correct results so I can verify my work. I was hoping for at least a beginning and intermediate mySQL tutorial. But without the correct answers / results, I can't possibly know if the SQL statements I'm writing are correct results or not.
I haven't really seen many tutorials that focus strictly on learning SQL statements and writing scripts, and I've seen none that have a thorough Q&A (with results) section.
If I have to pay for a tutorial, that's fine. I just want to find one that focuses on learning to write SQL statements and scripts and that stays away from configuring and administering type learning.
Any help you can provide is greatly appreciated.
KJ
I started out with an oreilly online course.
I know its not a tutorial, but if you are prepared to pay, its the better choice
For what you get its not that expensive and you'll come out of it with a very strong base.
If you are looking for strictly database:
Database Administration Certificate
Or a mix with a programming language (gives better insight to usage)
PHP/SQL Programming Certificate
Also I found a really nice site with a lot of common and useful sql queries that you can use to learn some neat tricks
Common MySQL Queries
I hope this helps you and good luck

SQL databases beginner [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Hi I am interested in learning SQL databases something I should have done a long time ago but I kept avoiding it for some reason.I realized that there are diferent versions of SQL(MySQL , SQL-Server etc.)and now I am prety confused on witch one to learn.I would like to start learning SQL from w3school but to be honest I dont really know what to use for writing SELECT , DELETE statements and more importantly how to run it.I know that in order to create databases you need tables and I used Microsoft Acces for that but after creating the tables I don't know what to do next.I should mention that there are 2 reasons why I wana learn SQL:
1.For using it with PHP web development
2.I have a course at coledge in witch we study C# and I need to be able to learn how to create SQL databases so I can connect to them
Can you tell me what are the diferences beetween MySQL and SQL-Server?
What should I use for creating and manipulating databases?
And what resources or book could you recomend for learning SQL ?
Thanx in advance and sorry if my statements are vague I have never had anything to do with databases before
Both MySQL and Micorosoft SQL Server are so called Relational Database Management Systems (RDBMS). Data is structured in tables of rows and columns, and relations are made between the tables. MySQL is an open source solution, while SQL Server is not. There is however a free edition of Sql Server available called "Sql Server Express". You manage it through the software "Management Console", which I think is included in the download. http://www.microsoft.com/express
Both uses the SQL-language to interact with the stored data, they do have some differences though. SQL Server uses a variant called "T-SQL" while MySQL uses "SQL/PSM". The basics are however the same.
Good luck!
First, check out RDBMS in Wikipedia for a comparison of DBs. Things change regularly, but this can give you a good idea.
Second, you can use PHP w/ MSSQL.
Third, you can use C# with MySQL, but in Visual Studio, it is very easy to use MSSQL and much more feature support.
As a student you can download all of the MS products you need from Dreamspark plus you can get a free subscription to PluralSight which is online video tutorials from beginner to advanced use of MS products.
PHP is fun and I've had more success using MySQL with PHP, but if you will have a class learning C# and MSSQL, you might as well start learning there.
since you use PHP, the best way you start is Mysql.
Check http://www.apachefriends.org/pt_br/xampp.html
With XAMPP you can run your php apps and user PHP mysqladmin to learn more bout SQL syntax.
Good Luck

How to integrate Visual FoxPro w/ MySQL for eCommerce website?

I'm working on an eCommerce website for a small merchant. This merchant uses Opera (which is based on Visual FoxPro) to manage his in-store inventory, and would like the online store inventory to reflect the in-store inventory.
I'm guessing that my first step is to set up a way to regularly transfer the information from the VFP database to a MySQL database on the website's server. Is there an established process for this? Am I even approaching this problem from the right angle? I've heard a lot about ODBC, but am unsure as to how to implement it or if it's what I'm looking for in this situation.
If it wasn't obvious by this point, I'm in over my head here, and would appreciate any and all advice you may have, including links to articles or tutorials that can help improve my general understanding of all the moving parts here.
Thanks much.
Co-worker developed synchronization process between VFP and MSSQL2008. WCF service which took input directly from VFP.
On other project - as far as i remember, when we tried ODBC .NET data adapter, it had problems with encodings and foreign languages. That's why we used COM+, serialization for communication with .NET.
But it seems to me you are using PHP (eCommerce=>Drupal=>PHP) so you are in completely different situation.
In your case, i would start with checking out if Opera (i guess it's this Opera) provides built-in export and eCommerce provides built-in import. Mostly because it might be tedious work to sync data manually from 2 apps coded by someone else. Then i would research if i/o can be joined and automated (something like scheduled task on win environment). Unfortunately, can't help much more because i'm unfamiliar with those tools, products and technologies.
Anyway - it seems to me like quite hard and dirty task and i wish you good luck. :)
Depend on what is that you are using to implement the website.. in general it is pretty easy with ODBC (In Java , I did it using the jdbc-odbc bridge)

Is there a MySQL tool that generates SQL queries for you?

Is there any software for Windows that allows you to setup your tables and then tell the software what you want to SELECT given the conditions and it will tell you the SQL query that you need? Thanks.
Probably you'll find software that will do this for you in a GUI, but eventually you will be required to write the queries yourself, unless you're developing something really trivial.
A GUI tool for SELECT statements is a too-high level of abstraction for most scenarios, and you would have to face the "Law of Leaky Abstractions" eventually.
Visualization tools are quite handy for defining the database schema, and there are some very good tools for that. However queries remain quite tricky to visualize, in my opinion. I think you'll be able to mentally visualize queries, given enough practice. Nevertheless, I'm quite sure you will be able to get started doing SQL queries within a few days, even non-trivial ones.
In addition, you can use Stackoverflow if you require assistance with complicated queries. I'm quite sure that the community here will suggest better SQL than any GUI tool!
These sound like they will do what you want:
SQL Maestro
dbForge Query Builder for MySQL
Having said that, I do agree with the other answers here - learning to manually write SQL will give you a lot more control. I highly recommend the (free) MySQL Workbench for that.
The people at sqlmanager.net build some tools to deal with databases, but I agree with Daniel: if you have very complex queries to work with, it's probably more work telling the tool what to do that creating the queries manually - especially as you'll have to verify what the tool did, so if you can do that, you could have done it by hand in the first place :)
As said before by daniel vassallo, you should learn how to create those sql queries "by hand". where i work we use a program that does exactly this (it's used by accountants only) and it creates horrible sql select statements and we have constantly whining accountants that think that the problem is allways on the server side even when we show them that those queries get them the wrong data... it's a never ending circle :(
Use HeidiSQL to manage your database, and keep an eye on what's going on in the SQL log. You'll soon pick it up.

Teach an M.B.A. the intricacies of Microsoft SQL Server (and how's it different from MySQL?) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
I haven't had to interact w/MSSQL much in my development career, though I've spent many an hour working with MySQL.
An M.B.A. friend of mine is starting a job where she needs to gain functional knowledge of MSSQL Server, and I'd really like to help.
What are the differences between MSSQL and MySQL?
How would you recommend a non-technical person go about learning the ups and downs of MSSQL Server?
[update] Previous database design skills are naught. I've given her to short and long on what a database does from a high-level.
I'd love to say, "you can't". But that would be untrue (or at least mean).
If she has any background with database design at all, then this is merely a new RDBMS.
If she's never done database design, the place to start is not so much with MS SQL, but with how databases work, in my opinion.
Database Design for Mere Mortals is a good place to start. From there I'd move to an MS SQL -specific book, such as Microsoft SQL Server Unleashed.
Download the free SQL Express and start using it. Microsoft also has several video tutorials that would be helpful. They start pretty much from the beginning with "What is a database" and move to more advanced topics.
From the perspective of the database user, the backend is generally irrelevant if they understand some basic concepts.
First and most important concept for the non-technical user is GIGO (Garbage in Garbage out). Bad data is useless data. Check everything you enter into a database for correctness. You really don't want the customer's product to be mailed to San Diego, VA instead of CA.
Then next most important thing is to really understand your user interface and how it works. I've spent a lot of time fixing up junk because users didn't know what they were supposed to put in fields in databases (it would have helped if the developers had not allowed non-email type data to be entered into the email field, but you can't send an email to 757-111-6789). It is never a good idea to put the wrong kind of data into a field because you don't have another place to put it. As a user, you may have no idea what the database is going to use that data for and wrong data can completely stop a process or break something really important. If you don't know what to put in a field, then ask. Don't put junk into a field just because it is required. (Hint, it is required for a reason, that usually means this is data critical to the operation of the database, do not fake this information.)
Now if this person is doing reporting, then the critical concepts become understanding boolean algebra and a very strong undertanding of joins. If you have these two concepts down pat, you have 80-90% of what you need to query a database.
The specifics of the database supported also become important. You need to understand what is stored in what tables (or what views to use) and how they relate to each other. Coming into a new job, I would sit down with the developers if possible and get an overview of the design and whatI would need to know to get the data. I would review existing report queries to see how the data is currently being retrieved and use that to ask questions if I don't understand what the person did. Even a database expert will need to spend some time doing this when faced with a new database, so there is no reason to be shy in asking these questions when you are new.
Final thing is to learn how to report a problem to the developers. Problems that are not reported don't get fixed! Problems that are not reproducable because the user didn't provide screen shots and a context for what she was doing when the error occurred, don't get fixed either. New data fields that are needed as business requirements change, don't get added to the database until the developers know about them (Please ask for a Notes field if you need it instead of entering junk data into a field like email that you personally are not using for instance). New business requirements often require a lot of work in the backend to change how things work, it isn't as simple as adding a field on a form. Please be aware of that too when you make requests.
I learned from Robert Vieira's Professional SQL Server 2000 Programming -- well written and comprehensive. I am pretty sure the 2005 version is very similar, just updated. Despite the 'professional' label, I found it a great intro (I had practically no database experience at the time).
Also I second Erikk's comment. Download SQL Express and PLAY!