As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I brought 31 queries down to 3 for a certain page in my application by using a single join (provided by Django's ORM). Up until that very moment I thought of SQL optimization as something I didn't need to worry about. I instantly realized that there are probably so many areas that run slow which could use some SQL tomFOOlery (SQL FOO is for professionals).
Now I'm looking for a piece of open source software that will allow me to quickly create databases, and tables with a GUI, so I can quickly add data and experiment with queries. Is Access good for this (aside from not being free or open source)? Or, does Access use it's own SQL syntax?
Oracle XE is free.
MySQL is free. For MySQL i use MySQL Workbench which is pretty nice.
If you want to practise SQL, I guess any database/tool would do. But learning how to optimize for one database doesn't translate into knowing how to optimize for another. I'd say go with the database you are currently working with.
There is a Firefox add-on for SQLite Database. This is a very small add-on and once done, it allows you to create database, the tables and the data visually. Pretty simple one at that.
SQL Server is an obvious choice for Windows. You can download Express Edition for free but if you want a development tool then the Developer Edition is much better value. Developer Edition typically costs around $50 - much cheaper than Access.
SQuirreL SQL is a nice and free software that supports many databases.
I'm not sure if you can create tables visually, but from my experience, it's faster to just write the DDL and then execute it since it's a one time job.
As for data generation, I've found http://www.generatedata.com/ to be a nice online site where you can generate dummy data.
No one mentioned SQLExpress. You can use SQL management studio, and it's free. Good enough for practicing. You can create databases visually and write stored procedures etc. It also integrates with Visual Studio express.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have a bunch of C code accessing database (Oracle, DB2 and Sybase) through Embedded SQL : the base code is the same, but with three different precompilers, three sort of executables are built, one for each database/platform.
I works perfectly fine, but we need now migrate to a solution using ODBC access.
The problem is : what tools / api can be used ? A direct way seems to write a custom precompiler (or modify an existent) to wrap all SQL and host variables calls to calls on an ODBC connection.
Can somebody recommend tools for that task or api to keep it simple ?
Or is it a simpler way, another approach ?
Thank you
As is usual for such situations, there are likely no off shelf answers; people's codebases always have a number of surprise in them, and the combination prevents a COTs tool from ever being economical for individual situations.
What you want is a program transformation system (PTS), with a C front end, that can be customized to parse embedded SQL. Such tools can apply source-to-source rewrite rules ("if you see this pattern, then replace it by that pattern") to solve the problem.
These tools require some pretty technical effort to configure. In your case, you'd have to adjust a C front end to handle embedded SQL; that's typically not in C parsers. (How is it that you can process this stuff in its current form?) You'll have trouble with the C preprocessor, because people do abusive things with it that really violate a parsers nested-structures-view of the universe. Then you'll have to write and test the rules.
This effort is a sunk cost to be traded against the effort of doing the work by hand or some more ad hoc scripting (e.g., Perl) that partially does the job leaving you to clean it up. Our experience is that it is not worth the trouble below 100K SLOC, and that you have no chance of manual/ad hoc remediation above 1M SLOC, and in between your mileage will vary.
At these intermediate sizes, you can agonize over the tradeoffs; that costs energy and time, too. Sometimes its just better to bite the bullet and do it any way you can an clean it up.
Our DMS Software Reengineering Toolkit is one of these PTS. It has a customizable C parser and preprocessor, precisely to help deal with these configuration troubles. The other PTSs mentioned in the Wikipedia article, do not, I beleive, have any serious C parser associated with them. (I'm the guy behind DMS).
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am enthusiastic to enter the world of Databases through SQL, but I don't know if there's prerequisites of any significance and I only know C# and Java.
Besides these, what tools do I need? I have Visual Studio 2008 and SQL Server Management Studio. What else do I need? Is it necessary to download a server OS?
Definitely install one of the free databases (Oracle Express, SQL Server Express). I have used both of those. You might also want to check out this free tutorial. It will help you learn SQL syntax.
I recommend you to try SQL Server Express, it is the easiest server to work with if you are developing with C#. If you would like to learn SQL using Java almost any data base would be good.
A data base server it's a software like any other, you will have to communicate with it through your own program, making a connection, throwing SQL commands and interpreting its results. If you only wanted to learn SQL you also could install a client for the chosen data base server and learn through it, after that you could try to connect your program to this data base. In this case SQLite would work pretty good for you.
Visual Studio 2008 and SQL Server Express are sufficient to learn the basics of a Relational Database Management System (RDBMS.) You can learn T-SQL (SQL Server's ANSI-SQL dialect,) schema design, Object-Relational Mapping, and more. SQL Express runs on Windows XP, Vista and Windows 7.
Oracle also provides an Express version, and there are other free options such as MySQL and SQLite.
You don't need a special server OS. SQL Server will run just fine on your development machine if you are just using it to learn. You'll want to make sure that SQL Server is installed in addition to Management Studio.
You might also want to try either MySQL and PostgreSQL. They're both free, much easier to install than SQL Server, and run on more platforms.
To start, I would look at the W3 tutorial here: http://www.w3schools.com/sql/default.asp .
I used MySQL , also get the Workbench and WAMP(or LAMP). Then start building! It's good to do something you would use.
SQL Server will run on your development system, and SQL Server Management Studio 2008 is a good tool to work with in SQL 2008.
If you want to connect through your network though, you'll need to configure the Network Area Surface to accept TCP Clients connections.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
As a C# developer that uses MS SQL Server heavily I'd prefer to use what I know; however, for a small project the licensing costs are prohibitive and so I'm looking at using a free open source solution such as MySQL. Which of the free RDBMS solutions are the best in terms of stability, performance, features and ease of use for someone familiar with MS SQL Server?
RDBMS I'm considering so far are (in alphabetical order):
Firebird
Ingres
Lucid
MySQL
PostgreSQL
I would recommend PostgreSQL over MySQL. I think it's more robust. But it's got more of an Oracle flavor, in my opinion.
UPDATE:
All the suggestions provided to date are relational in nature. There are other alternatives, such as object databases. There's a whole "no SQL" movement out crying in the wilderness for non-relational alternatives. They might be worth a look as well.
If SQL Server Express is an option, it might be the best choice for you. If not, I'd pick up MySQL or PostgreSQL from your list, they both are good choices. However, MySQL has IMO more user-friendly admin tools (see MySQL GUI Tools) that you may like if you aren't familiar with the command line.
If you are interested by a comparison between MySQL and PostgreSQL, check MySQL vs PostgreSQL from WikiVS, the open comparison website.
Just an idea ...
Sybase offer a free version of their enterprise product 'ASE' - may be worth a look. It's somewhat hobbled - can only use up to 2G of memory and 5G total of data on disk. Depends just how 'small' your project will be. Given the shared parentage of SQL Server and ASE, it might be worth a look.
If your experience is with SQL Server, have you considered SQL Server Compact? This is a free, in-process RDBMS compatible with SQL Server that you can link to your app. Performance and features are excellent for applications that do not require multiuser access, and it does not requre an admin install.
MySQL?
There's no reason to use MySQL over PostgreSQL. Although MySQL seems to have addressed some of the product's worst flaws, they general attitude towards RDBMS' theory makes me very wary of them. And there's certainly lots of things still going against them:
Awful, terrible documentation
The fun game of choosing table engines so that you get the functionality you need
Modifying your data without warnings! Silently dropping data! Silently ignoring constraints!
... and you can go on... The only plus I see towards MySQL is the builtin replication.
There's also SQL Server free editions, no?
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
As a programmer I would like to get a strong hold on writing queries. In my college years I've read a few sql books and rest I've just learned working as a programmer for last couple of years. But as those queries were work related...they weren't that 'hard' or complex.
what would you guys suggest ? Is there a good advanced sql book that would teach and then test the knowledge by giving some questions?
Thanks!
IMHO SQL skill, more than any other programming skill, requires mentoring.
There are three primary reasons.
It's quite possible (often easy) to write a SQL statement that gives you the right answer. So developers often end up telling themselves "Hey, it works, (and all in one statement,) I'm done." Usually not so, and the only efficient way to take the next step is to have your work reviewed and get suggestions (and reasons for the suggestions).
Skills aren't nearly as transferrable from "regular" programming as you might expect. Principles like decomposition, subroutines, etc. are usually blind alleys.
Real SQL skill requires just as much testing skill. You can only truly evaluate SQL execution by knowing your SQL query analysis tools inside out, and using them without fail on almost every query.
So the answer to your question is: get as much help as you can, early and often. And don't be reluctant to ask "Why".
I have always felt that SQL was something you had to learn by doing. I found my self on a project that forced me to write SQL not stop for several weeks to analyze every aspect of a fairly large database. In many isntances I wrote many SQLs that all resulted in the same results but went about getting them in different ways. Using Sql Server Management Studio's execution path tool I was able to review the query options and improve each and finally pick the "best" for the situation. If you can find a reason or purpose to write a bunch of SQL I beleive that will be the best catalyst you can have for truely learning the art of milking data from the DB.
set theory
database theory, esp. the rules of normalization
learn how to read a query execution plan
I've found reading the Ask Tom site has helped me to understand what you can do with advanced SQL. It is Oracle specific, but bitingly sarcastic and horrific!
Ask Tom
Also, talk to your database administrators (if you have any) they have plenty of experience you can make use of.
I find the easiest is wondering if you can find a better or easier way and the looking for that way (like on MySQL website) or asking questions (like on SO). These 2 ways have been how I have learnt the majority of SQL. But this was only after getting a base knowledge. I also found that the more complciated the database becomes, the more you learn, even if it's by trial and error.
It's amazing how the scientific method carries over to many different fields. When in doubt, use the scientific method.
Ask a Question (How do I get good at sql?)
Do Background Research (Research the topic)
Construct a Hypothesis (If I research and practice a lot of different methods, test them, and ask for advice from peers, then I will be good at sql!)
Test Your Hypothesis by Doing an Experiment (Do it and see if it works!)
Analyze Your Data and Draw a Conclusion
(Did it work, and what happened)
Communicate Your Results
(Tell us how you got good so we can get good too)
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
We are using PowerDesigner at work for database modelling. But there is a hell of a price tag on that piece of software. And frankly, all I use is physical diagrams for MS SQL, which is about 1% of what PD knows.
Are there any good alternatives? I know about Visio and MS SQL Diagrams, but looking for other options.
Power*Architect is the way to go. It's free, open source, and does a really great job helping you build your ERDs. Plus, it works on Windows, Linux, and OSX.
Open System Architect: www.codebydesign.com - it does job for me perfect
Check out Sparx Enterprise Architect also.
I just use SQL Server using the diagrams folder. The designer is pretty simple to use, and can be used to generate tables fairly quickly. Considering it's free with the software, I don't see the issue.
SourceForge.net Druid project
Has a templating engine to produce DDL or what ever you like.
Has the ability to have multiple diagrams in one model.
Only does physical data model.
It is free and has source available.
It is a java based tool so it will run on Unix or Windows.
How about MagicDraw? It is a very powerfull tool, but I think it as expensive as PowerDesigner, not sure.
You might want to look at https://www.xcase.com/demo.php. It's not free, but it's quite a bit cheaper than PowerDesigner, as far as I can tell. I've used earlier versions, but lately I've had easy access to Visio, so have continued with that instead of investing in xCase.
The version of Visio that comes with VS Enterprise Architect has a forward-engineer feature that will generate SQL. There is also a type library for the modelling engine, but (on older versions at least) it won't extract certain items such as comments. However, the generated SQL has the comments in a fairly simple structure that does facilitate parsing the generated SQL.
You can get older versions of VS enterprise architect on E-bay for not very much money (I think mine cost about £250).
One caveat for reverse-engineers is that all pre-VS2005 visio DB modelling engines will not play nicely with the SQL Server 2005 native client. You need to either script out the database and re-load it on a SQL2000 server (dealing with SQL2005 specific features such as schemas is left as an exercise for the reader) or get a more recent version.
Well there's another alternative. Use it for more than just making tables! Exploit it, get your money's worth. You've already paid for it, you could drop the maintenance and just use it as-is. Anyways, something to ponder.