OData with a plain SQL (odbc) data source - sql

I have an oracle data source that i would like to expose using odata.
The reason i need to use odata is that there are many parameters and it is hard to write a query for each combination.
How can i connect my oracle database to odata to achieve this given that the database is version 10.2g which as i have read does not support Entity framework.
Thanks

One of the solutions is using NHibernate, and here is a sample: http://aspnet.codeplex.com/SourceControl/latest#Samples/WebApi/OData/v4/NHibernateQueryableSample/.

Related

Connection -MongoDB & SQL Server

I need to create a connection between ##MongoDB## and ##SQL Server## where I want to replicate a subset of my Database from SQL Server into MongoDB. Can anyone suggest for feasibility of the same and how ?
Right now I am using symmetricDS for the replication but unable to...
Please suggest if symmetricDS is able to serve for this purpose.
Here is how you target MongoDB:
http://www.symmetricds.org/doc/3.8/html/user-guide.html#_mongodb
If you need more flexibility than straight table to table mapping, then you would write your own data loader using the MongoDatabaseWriter as a pattern.
https://github.com/JumpMind/symmetric-ds/tree/0c5cc1c24b42a64405f4b79c3cb6b594a35467f2/symmetric-client/src/main/java/org/jumpmind/symmetric/io
Got an easy way around for the Data Exchange from SQL to MongoDB using:
SQLtoMongo C# Tool
KNIME Analytics Platform (way easy to implement - Opensource)
But still looking for something with triggers to easily replicate the things.

how to get data from table if table stored in database which is in server in ios.

i need some help.
I am trying to fetch data which is in table format in SQL Database and my Database is in server.So can anybody tell me a procedure how to do this in efficient way.
Thank you
Generally the most common approach is encapsulate the database by an REST API (see http://en.wikipedia.org/wiki/Representational_state_transfer).
However, you could look for an SQL Connection SDK provided by the manufacturer of your SQL Server. There is also an ODBC SDK for iOS you can take a look at.

custom ADO.NET data provider with NHibernate

I am writing an application that connect to ESRI's File Geodatabase, which is a proprietary database.
I found a custom ADO.NET data provider for this File Geodatabase.
I like to access this database with NHibernate.
Can I use this ADO.NET data provider with NHibernate without writing any customization code for NHibernate?
is there a driver that deal with generic ado.net provider?
so far what I found, they told me to implement IDriver, and IDialect in order to acheive that.
And in case I have to write my own implementation, is there any document that describe how to do that?
There is a GenericDialect (not quite full-featured, as few things are less standard than SQL), but you need to implement a driver so NH can connect to the db.
You can take any of the simpler drivers in https://github.com/nhibernate/nhibernate-core/tree/master/src/NHibernate/Driver as a starting point.

Data provider class for sql database

I need to write a data provider class to pull data from a sql database for use in a webpage that will display a bing map. Does anyone have a link they could provide with a tutorial on how to do this?
I have very little experience using a db to provide dynamic data for a web page so any help is appreciated. The Database is a sql Azure databse.
You need to research Data Access in .NET and ORM technologies for .NET. This question deals with similar concepts.
Simple Data Access Layer
Note: There is nothing "special" you need to do to apply the standard .NET data technologies to Azure SQL.

ADO.NET Data Services & Oracle - RESTful WCF w/ Oracle

I'm looking into WCF and woud like to created my framework in a RESTful way. I've just started looking into ADO.NET Data Services, but it seems it only supports SQL Server, is this correct? Can you run in against Oracle?
ADO.net Data Services and WCF both feed off a model. You can provide restful access to your data using a proper model layer that accommodates Oracle driver. Things might not work out of the box. In WCF you can use an Oracle friendly mapper like NHibernate and expose your datacontracts in a restful way. For Astoria you might need to hunt for a EF provider for Oracle db. But its possible.
EDIT: It seems ADO.net Entity Framework is already Oracle friendly ! You have no problems going pure WCF or Astoria way
Please see the following question for a more up-to-date and thorough answer.
Is it possible to expose data from Oracle using OData?
ADO.NET Data Services relies on the ADO.NET Entity Framework, and that definitely also supports Oracle. WCF in itself is totally database-agnostic - no limitations here. I don't see why you shouldn't be able to use ADO.NET Data Services with an Oracle backend.
Marc
Here's a link on how to do so -
http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/dotnet/EntityFrameworkWCF/WCFEntityFramework.htm
You'll actually need to install ODAC for EF, which is currently in beta:
http://www.oracle.com/technetwork/topics/dotnet/downloads/oracleefbeta-302521.html
It works fine for me in VS, but not in IIS, which is the issue I'm facing.
HTH