How to give support for PostgreSQL in my application - database

I am going to give support for PostgreSQL in my application. Can anyone suggest what are the things need to be considered ?
Whether it is open source software ?
what is version need to install ?
How PostgreSQL is different from SQL server/SQL CE/My SQL
About connection string ?
Please suggest me with this... Any help would be appreciated.. :)

Try https://www.postgresql.org/; that should cover a lot of questions you have asked.
PostgreSQL is Open Source; they claim to be "The world's most advanced open source database". It's release under the term of the PostgreSQL License.
You should always go with the latest version (9.5.x if you are looking for a GA version; 9.6.x if you are ok with going with Beta) unless you have a specific need to stay with a lower version
There are numerous differences in architecture, storage and syntax areas. But PostgreSQL is a database server just like SQL Server, SQL CE or MySQL, and at the minimum executes SQL statements for you. You will need to Google 'Postgres vs MySQL' or 'Postgres vs SQL Server' or similar. You will find a lot of material to read upon (example: this)
Are you looking for a JDBC connection string? If no, then what's your programming language? If it's Java, the JDBC URL looks like this: jdbc:postgresql://host[:port]/database

Related

Database Migration with the flyway or dbup(.net library/dbup extension) with PostgreSQL

First of all, I am sorry because it might be a stupid question but after a day research I am confused and I have a very less time to decide.
We are using TFS as a CI tool and as an SCM. And Postgresql for DB.
Planning to Automate DB with Postgresql and TFS.
Please suggest a tool for this that I can go forward with running my SQL files on specific DB as I want.
Can anyone please tell me if I use DbUp Migration Extension of TFS is it supporting Postgresql? As this link shows it only works with Microsoft SQL Server or Microsoft SQL Azure and then another Document says DbUp supports a number of different databases including Postgresql.
also, Does Flyway have support for c# and TFS ?
Most popular tools to do what you want is Liquibase and Flyway.
As I know there is only one significant difference: Flyway - plain SQL based, Liquibase - provides abstraction level based on XML, JSON or YAML as well as plain SQL. You can use abstractions (provided by Liquibase) to increase portability of your scripts.

flyway supported database

We have seen flyway framework for database migration. We are very keen to implement same in one of our project. We use Sybase database in our project however we did not find Sybase as a supported database in flyway documentation.
Could you please let us know if it does work for Sybase or will Sybase support will come in future.
Quoting the documentation :
If your database is not on this list, please raise an issue and we'll see what we can do to support it.
On one hand Flyway only executes SQL statements. On the other hand it needs to be database dialect-aware (statement delimiters, comments) to split SQL statements correctly. I guess it is not a big issue to support Sybase, but looks like it is not supported yet.
If you raise an issue, make sure to post a link to it here.
I know that this question was asked long time ago, however, i could say that right know Flyway support's Sybase, as you could see on documentation
Right now most common Sybase version is 15.70 which is supported by Flyway 5.X community edition and Flyway 6.X enterprise edition.

Trying to deploy an Entity Framework Code First application without much luck? Best Deployment strategy?

Despite a few hiccups and a few workarounds, my MVC based Entity Framework (Code First) application is now complete and ready for deployment.
I originally tried developing through SQL Express, however, I had non stop problems with the Code First approach as I asked about here which made it completely unworkable.
So, in the end, I developed it following the majority of guidelines and used SQL Compact Edition. This has been absolutely brilliant for development - but - now it has come to deployment and I am stuck.
I have seen some people saying about generating the Schema from the .SDF file, however, there are differences and restrictions in Compact edition such as nvarchar being limited to a length of 4000, and I need max in my application.
So basically, what can I do?
In addition - but not essential - , I am going to be moving on to the next project shortly, It will involve heavy usage of items needing to be stored in a database that are longer than 4000 characters. Are there any better strategies now for development / Is it possible to use Code First with SQL Server Express or SQL Full (I have MSDN and willing to install/use anything that will help).
Here are my unofficial recommendations:
SQL CE is not a viable option for most production applications that are based on MVC (although I have used it in production services in rare cases).
I would try to avoid switching databases between development and production - i.e., don't test on SQL CE and deploy to SQL Express or something else.
I have never tried to open an MDF inside of Visual Studio - maybe I'm misunderstanding what you're saying here, but in general I'd recommend using the SQL Server-specific tools to manage databases: http://www.microsoft.com/download/en/search.aspx?q=sql+server+management+studio+express.
Regarding the other post, I would generally discourage using the AttachDBFilename portion of connection strings unless you need it for a specific purpose.
It sounds like you may want to review the available database initialization strategies: http://blog.oneunicorn.com/2011/03/31/configuring-database-initializers-in-a-config-file/.
There are lots of walkthroughs on our blog and the MVC MSDN site - if those don't work for you feel free to reach out to us from our blog and provide feedback on what we can do better!
Our blog: http://blogs.msdn.com/b/adonet/
MVC walkthroughs: http://www.asp.net/mvc/tutorials/getting-started-with-mvc3-part4-cs
On the one hand regarding deployment/migration you might want to take a look at http://exportsqlce.codeplex.com
On the other hand I've been checking Microsoft SQL Server Compact 4.0 Books Online and in principle there is no known issues with data types, although the limitation you mentioned for nvarchar is confirmed.
Finally in order to elaborate a strategy you might find interesting the Differences Between SQL Server Compact and SQL Server
You need to create a debug and a release specific web.config file:
In the release specific file you remove the connection string, so it creates a database for you.
In the debug specific file you keep the connection string.
However, I would suggest you to not use a connection string and use SQL Management Studio instead. Given that the Compact Edition does not support your requirement, this is a good time to switch...

FluentNHibernate SQL Server 2005/2008 Setup Tutorial

Does anybody know of any good tutorials that show how to configure FluentNhibernate for SQL Server 2005/2008. The ones I have found usually just use SQLite, but I would like to see one that specifically targets SQL Server 2005/2008.
I really liked the sample tutorial on the FluentNhibernate website (http://wiki.fluentnhibernate.org/Getting_started#Your_first_project), but it looks like most tutorials I have found seem to only deal with SQLite. It would be great to see a working tutorial that deals with the more common databases in real world applications like SQL Server 2005/2008, MySQL, etc
Thanks!
Tutorials use SQLite not because it's "quick & dirty" but because it's embedded, small, and free. Anyone can download System.Data.SQLite and start working in about 60 seconds, and later switch (or not) to another database with minimum impact. That's one of the major benefits of using an ORM.
Just in case, I want to clarify that SQLite is not a toy database, for many applications it's enough and even necessary since the characteristics I mentioned above aren't too common for a relational databse.
In the case of fluent-nhibernate, the only difference is that instead of:
Fluently.Configure()
.Database(
SQLiteConfiguration.Standard
.UsingFile("firstProject.db"))...
you'll have:
Fluently.Configure()
.Database(
MsSqlConfiguration.MsSql2005
.ConnectionString("a raw string"))...
Each database engine config has its own specific optional settings.
More information about configuring different databases in the fluent-nhibernate wiki.

Anybody using SQL Server Spatial in a production environment?

I'm looking for some spatial database features but can't upgrade to SQL Server 2008 at the moment. I've come across this open source mssqlspatial package which would provide most of the features I need however I'm hesitant to deploy it without knowing if it's production ready. I was wondering if anybody out there had deployed this package.
Thanks
Never heard of mssqlspatial, sorry. Have you considered PostGIS though? That'll give you an open source spatial database, and I believe it's quite well regarded. Never used it myself.
This isn't answer...just some additional info.
We just went to SQL Server 2008, but PostGIS would have been my first choice (wasn't my choice). As MarkJ says, it is well regarded.
You might want to checkout SharpmapV2. It's not a spatial database but you've got providers on just about everything including MsSqlSpatial:
http://sharpmapv2.googlecode.com/svn/trunk/SharpMap.Data.Providers/
And I'm seeing the same developers in both repositories (John Diss looks like a busy guy), so I think SharpMapv2 is more current:
http://mssqlspatial.codeplex.com/SourceControl/ListDownloadableCommits.aspx

Resources