I have hit the following roadblocks during development using .Net with DB2:
error 2019: Member Mapping specified is not valid. The type 'Edm.BooleanNullable=False,DefaultValue=' is not compatible with 'DB2.smallintNullable=False,DefaultValue='
This is a problem with IBM choosing not to have a Boolean type in DB2. I think it would be a good addition to the product. Microsoft's position seems to focus on the potential data loss that can result from trying to cast a number column with such a wide range of possible values (in the database) to a type which only allows 2 possible values (in the software) with the rest being totally erroneous. I happen to agree with Microsoft, but also realize that they're being somewhat rigid in the "enforcement" department. Nonetheless, DB2 could stand to profit from a natural boolean type. I discuss this in another thread: http://entityframework.codeplex.com/discussions/395969
No MigrationSqlGenerator found for provider 'IBM.Data.DB2'. Use the SetSqlGenerator method in the target migrations configuration class to register additional SQL generators.
This is an issue with IBM being behind in implementing the latest and greatest .Net features in Entity Framework 5. This is disappointing, because there's absolutely no hope in IBM resolving the issue before my project deadline, and developing workarounds is so time consuming. I'd rather abandon DB2 and gain back the time saved through using the EF5 scaffolding and schema migration tools. After all, that's why we use frameworks - to save the time usually spent on the "plumbing" code and repetitive tasks that don't truly add value. Application value is in business logic, and time-saving features for the end user, and that is where tooling vendors need to focus their efforts.
ERROR 42968 IBM SQL8002N An attempt to connect to a host failed due to a missing DB2 Connect product or invalid license. SQLState=42968
Seriously? IBM still thinks that folks who have purchased the iSeries server, (which is database software AND hardware AND operating system AND ongoing maintenance on the above), aren't first-class citizens in the DB2 community? I have 20 years of AS/400 experience, so I'm used to this attitude, but c'mon, it's 2013! Why not create an environment of total compatibility among your OWN products IBM? We already have enough trouble in this industry with lack of compatibility, let alone within one vendor's products. What exactly excludes an iSeries customer from using other DB2 software products like the DB2 .Net provider? The reason I wanted to use it was to possibly find within it sufficient support for the Microsoft Entity Framework, because the version that installs with iSeries Client Access is known not to support it at all...
Others in the system i world have the same remarks: http://www.itjungle.com/tfh/tfh060412-story03.html
Progress Software has taken several of these bulls by the horns, in developing their own .Net driver to replace IBM's. I didn't get a good feeling when I clicked the "how to buy" button on their website. Any vendor who is embarrassed about their price, and won't publish it, and need to make sure a salesman highly trained in negotiation tactics needs to explain the price to me, I quickly loose interest. http://www.datadirect.com/products/net/net-for-db2/index.html
So, that pretty much leaves me with Microsoft products. Obviously, IBM doesn't have a tool to replace the .Net framework, the Entity Framework, nor Visual Studio. I have few choices when developing a Windows app. However my choice of database vendor is always up for grabs on a new project. I usually pick IBM DB2. However, when I hit a roadblocks like these, I seriously consider switching to the Microsoft database server, so I no longer have to deal with this serious feature disparity. The pricing is certainly crystal clear, affordable, and I know I won't find feature disparity between SQL Server, Visual Studio, and the .Net Entity Framework.
This topic has been locked.
2 replies Latest Post - 2013-01-22T22:18:52Z by SystemAdmin
Pinned topic Entity Framework roadblocks
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-01-22T22:18:52Z at 2013-01-22T22:18:52Z by SystemAdmin
bpgross 110000C99H627 PostsACCEPTED ANSWER
Re: Entity Framework roadblocks2013-01-22T20:51:34Z in response to SystemAdminMatthew,
I'm afraid I am not in a position to get a new datatype added to DB2 - on any platform, or to change how software is licensed, but maybe I can help in a couple of areas.
It is my expectation that EF Booleans work with DB2 shorts under the covers. If this is not the case, I would like to understand the scenario in more detail.
In terms of driver compatibility - the drivers that come with the DB2 LUW and DB2 Connect products are the same, and support DB2 LUW, Informix, DB2 for z/OS and DB2 for IBM i. The last two servers require DB2 Connect licensing, but it is still one common driver. For the functionality that is common across those servers, this one set of drivers suffices - for example ANSI SQL. As we get more customers interested in using DB2 Connect with IBM i, we add more IBM i specific features - please have a look at our V10.1 FP2 release where we added support for IBM i system naming. I am always interested in server specific exploitations that we could enable that provide business value to our customers.
In terms of the EF, I have stated before that the scenario we are going after is database first. The set of enterprise customers we are dealing with has existing databases (or an existing database design process) and they need the ability to access that data from .NET / EF. This is not to discount the model first or code first scenarios, we just do not see the relative need being expressed from our customer base. Once again though, I am open for input and can bring forward cases to expand based on business value.
SystemAdmin 110000D4XK2826 PostsACCEPTED ANSWER
Re: Entity Framework roadblocks2013-01-22T22:18:52Z in response to bpgrossBrent, thanks for writing back. I appreciate that you are open to input, and that's exactly why I'm posting my experience. I would like to help IBM understand a bit about what I have experienced trying every which way to use IBM products, and really not coming up with a solution I found productive enough.
It is my opinion that IBM is capable of writing a full-featured DB2 .Net Provider without waiting for customer demand. The driver should implement every feature Microsoft adds to the framework, without exception, so the Microsoft tooling just works. If Microsoft decided to enhance the framework, chances are that yes, the IBM customer base does in fact have the demand. Hibernate for Java has both code first, and database first coding styles, and I don't know anyone who uses Hibernate to write new code using database first. Do you think the folks using Hibernate are not IBM customers?
Exactly how does IBM measure demand? I did a study on this once, and found that SMB market is so much larger than a small set of Fortune 500 companies... When I wrote the study, the number of firms with less than 1,000 employees made up almost half of the total payroll of the entire US economy, and in terms of number of firms, there were over 5 million firms in this group. There were only 8,643 firms left over in the 1,001+ category. Would IBM rather sell 5M copies of DB2, or just 8k? That's why for many products, "enterprise doesn't matter".
All of my customers are in the IBM customer base, and you've never heard of them. For that matter, new business isn't found among existing customers with existing databases that already run on IBM software. It's found by developers building new projects, and in the process, discovering tools that make them productive, which causes certain products to be selected above others. The product selection, by me, the developer, drives IBM revenue. My project is already sold and has a deadline. I came to IBM for the developer tools on the database side, and found a 33% implementation of the EF 4.
The customer has an iSeries, so I tried to leverage their existing system, but the drivers that come with iSeries are not the same, and don't have ANY EF support. They do not have DB2 Connect either, so I couldn't use the better IBM drivers. Then I tried DB2 for Linux, and ran into the rest of the issues. (Actually, I have several OLD copies of DB2 Connect, as IBM used to send me copies with every AS/400.)
The reason that EF Booleans no longer work as DB2 shorts is because EF5 has new features that don't support data loss during mapping. As an example, take a look at the entire System.Data.Entity.Migrations namespace. It's new for EF5. These classes do schema changes based on the model. IBM should participate in EF beta programs through MSDN so the .Net drivers stay on par with the EF version...
In new projects I don't use database first. In this particular case, I'm trying to persist a model that is based on an imported XML schema. All coding of classes specific to the XSD are generated by the web service tools, so code first is an excellent choice.