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 to design a Java Application, which has database connectivity as well. I am unable to decide which database should i use? "PostgreSQL" or "SQL Server 2008". I want to know which has better compatibility with Java language? Also which one is more easy to use and implement?
This is a very subjective question and one that will likely be closed, but for what its worth, this is my opinion:
Both database servers are compatible with Java using JDBC and several ORM's such as Hibernate.
Instead of Java compatibility what you need to consider is:
Your resources (financially and computationally)
Your familiarity with one DBMS over another
SQL Server tends to be a bit of a hog for installation. For management tools your looking at SSMS, which can be a bit of a beast, but is very good at what it does.
PostgreSQL is lighter on the installation front. The PgAdmin III tool is very effective at what it does, and is, in my opinion, easier to use.
SQL Server's free editions have database limitations. It's paid versions do not, but they are expensive. PostgreSQL does not have any limitations for database size, and it's open source.
Both DBMS's have a vibrant community and help is readily available.
Hope this helps.
--Edit--
As a starting point for databases, each database server will be as easy as any other to learn on; although the tools that the server provides may temper the learning curve some.
Should I have to go back to square one and relearn everything again, heres what I would do:
Pick PostgreSQL. I would chose PostgreSQL to learn on as it is fully ACID compliant, has little tolerance for syntax errors, and provides exactly what you ask for in the result sets.
I would learn the command line utilities first, followed by PgAdmin III as it would give me the best possible exposure to the database, without holding my hand.
Read the documentation found on PostgreSQL.com and supplement questions with Stack Overflow, and dba.stackoverflow.com
DON'T PANIC. Learning a DBMS is a tall order, one that I have yet to complete. There are times when it is frustrating and hard. It will be easy to want to quit. Don't. Hang in there and keep trying, the rewards are worth it.
The PostgreSQL community is great, and the answers I have gotten, and seen on other posts here on SO are top notch. For some samples, check out any answer by a_horse_with_no_name and Erwin Brandstetter, I guarantee you will learn something.
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 9 years ago.
I have a sort of unusual question, and I know it is a very controversial, but here it comes.
I have developed a few JSF applications in the past but these all limit the amount of users that can be servred about 5-6. This was partly because of a license based policy. I performed some tests with 20+ users and Selenium, and the applications went really slow. The problem was probably originating from the server's performance but still, I can't help to ask the following question:
Can a JSF application support a large number of users? My bet would be that the framework should allow it, however I can't think of any commercial website that uses JSF and can support thousands of users at a time. (If you could show me some that would be great!)
I ask this, because I have been asked to develop a larger system, and I would love to use JSF because I love it very much, however the recent performance tests gave me doubts. The lead programmer said it is only the server machine's perfomance that is the issue, but in that case, what kind of machine can support thousands of users logged in at the same time? The lead programmer is not the best of it's kind, that is why I want to hear a second opinion from SOF if you dont mind.
If there is any framework more suitable for extreme use please let me know which one it is, the only real constraint I have is that it should be Java based on the server side.
Again my apologies for the unconstructive question.
these all limit the amount of users that can be servred about 5-6
Not sure what the app's load or design are, but that sounds unbelievably low. JSF should be able to handle many 100s of users if designed right or even 1000s with the right infrastructure. JSF code runs with servlets and facelets - the framework is standard code on top of these, that has been optimized over time and gets JIT optimised at runtime.
E.g. With IBM Websphere Portal Server and Oracle Portal, the standard way to build customer portals and apps is via JSF. And they're used in massive installations.
Sounds like your past app(s) have some problem. I don't think you can blame that performance on JSF.
If you want an extreme number of connection is Java you might consider http://netty.io/ It is designed to support and has been tested for 100,000+ connections.
I suspect the bottleneck is not the number of connections you have but how efficient you serve up pages i.e. you JSF is particularly slow. If you optimise that I suspect you can handle more connections.
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 starting a new java web-project with Cassandra as the database. The team is very well-experienced with RDBMS/JPA/Hibernate/Spring but very new to the world of NoSQL. We want to start the development with as simple setup as possible.
Hector seems to be the most preferred and popular choice for connecting to Cassandra. But, Netflix has recently offered Astyanax, which has its origins in Hector.
Can anyone who has used both these technologies share their experiences? I am looking for easy setup, good documentation and simple/clean usage.
Suggestions about other api's are also welcome.
I've tried both and Astyanax is way easier. The API actually makes sense and reflects what your are actually doing. Both Hector or direct Thrift usually results hard to decipher code.
There are some issues yet to be solved in Astyanax (a.o. getColumnByName), but I've decided to build my project using it.
Oh, I used the snapshot version (manually build, since it was not in any maven repo) because of some outdated references.
FWIW, I've only been working with Cassandra for about 2 weeks now, but I'm already successfully writing to Cassandra with Astyanax, using composite columns, etc.
I am also not a Java programmer either, so my point is that it seems pretty robust and easy to use.
I started using Hector, which I think is excellent, but then moved to Astyanax. Astyanax is an abstraction over Hector, and is much simpler to use IMHO. I experienced a minor bug on Hector, to do with keeping a connection alive, which was magically solved once I'd switched to Astyanax.
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'm relatively new to Java and using DBs with it, and I need help deciding which embedded RDBMS to use with a simple J2SE system. My criteria and concerns are: performance, low system requirements, reliability, easy of use/develop/deploy/maintain/backup/recovery.
1) Before I was deciding between Firebird and SQLite, but then I've just met H2, HSQLDB and Apache Derby, and now I don't know which one to choose. Any of them would fit for me, but I need to explain why I choose one of them.
I believe I should use one of the native Java ones, since they can run inside the same JVM (which might use less resources). Which one do you suggest and why?
2) I also would like help on finding backup/recovery/maintenance manuals, tools and commands for H2, HSQLDB and Apache Derby, since I was not able to find this information on their website (not because the documentation is bad, most likely I'm a bad seeker)
P.S: this might be a good source for others with the same problem, but be careful because the information is not fully up to date: http://database-management-systems.findthebest.com/compare/6-13-15-16-53/Apache-Derby-vs-Firebird-vs-HSQLDB-vs-H2-vs-SQLite
H2 was written fairly specifically to be faster than HSQL and Derby. Its author has run some benchmarks which, although they are rather old now, indicate that this goal was attained. According to those benchmarks, H2 is a bit faster than HSQL, and H2 and HSQL are much faster than Derby.
I don't know anything about management tools for any of these databases. Since they're embedded, they store their data in local files; it should therefore be easy to handle backup and restore by backing up and restoring their files.
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 an idea for a smartphone application.the idea involves communicating with a web server in a specific protocol that I wish to design. what is the best architecture for the web server that fits this scenario, If I want to use DB pesistance, client server communication, and it should be in a language I'm farmiliar with, such as Java or c++?
I'm sorry if it's a noob question, I never dealt with this kind of development (I'm a RT embedded engineer)
thanks a lot.
I would pick a technology that is easy to deploy and manage. I'm not a C++ guy, but I think Java fits the bill. There are a number of easy ways to deploy java these days:
Google App Engine: http://code.google.com/appengine/
Heroku: http://devcenter.heroku.com/articles/java
Amazon ec2 beanstalk: http://aws.amazon.com/elasticbeanstalk/
Each of these will provision the servers and databases for you. Google, and I think Heroku, have free plans for getting started.
-Dave
I think your question is too broad.
I would go for what I'm most confident with, Unix server with Java and MySQL, but since you intend to create the protocol, anything would do, like Windows with SQL Server and IIS and .Net 4...
The fundamental idea is, since you intend to create the protocol, what you interface with is irrelevant. If you were going to use SOAP on a WinPhone, it would make sense to go for a .Net platform, whatever people might say about compatibility and SOAP. Similarly, Android would be better interfaced with Axis and Java, imho. The iPhone anyway requires third party tools or hand-coding of XML, so anything goes.
As it is, your initial idea is right: go for what you master best, because the field has enough learning requirements as it is that you don't need more hurdles :D
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.
Has anybody out there got any real world experience with the H2 database? I'm interested in:
performance
stability
bugs
We use H2 as the storage engine for a very large RCP/Eclipse-based design tool. The tool itself has been in use for over 2 years now on some data-heavy projects so we've stressed H2 pretty thoroughly.
We did a fairly in-depth analysis of other Java embeddable db engines and chose H2. Overall I think we're pretty happy with it. We've had very few stability issues, but, as zvikico says, the development team is VERY responsive.
While the performance is good, sometimes you need to do some optimizations by hand. If you're used to working with enterprise-level databases that do a lot of this optimization for you, it may be a bit of a change. I'd recommend using the EXPLAIN command if you encounter a slow query to see what it's doing. Very often you can switch around the JOIN statements to force it to use indices more efficiently.
So, in short, thumbs up from me!
I'm using it as the base of nWire, which is an Eclipse plugin for Java code exploration. It is working in embedded mode as part of the Java process, not as a server.
Overall, it is very stable. I'm working with H2 for a long time now: I encountered some bugs in the early days, but that hasn't happened in some time now. The response of the developer has been great, too.
Regarding performance: it is very good. You can see the tests on the site. I didn't get a chance to compare it to other tools, but I'm very happy with it. In recent versions, it does tend to take a bit more time to open large databases, but that issue seems to be resolved, too.
Some other strong points:
Very simple distribution: just one JAR.
The embedded web console is very useful for quick access to the database. It proved to be a valuable development tool.
Responsive community support, especially from the development team.
I'm using H2 in some pretty heavy server applications with several millions of records. H2's performance is just phenomenal. As always, you need to think through your use of indices though. I was a long time user of MySQL before and have used several enterprise-class databases, but H2 is just smaller, faster and easier to use than the traditional heavyweights. It's also become our database of choice at Tynamo.org