Does anyone know a good reference to look into what Object Relational features are available in SQL Server (any version)? I found a really good summery for Oracle but all I can find for SQL Server is information about LINQ to SQL, which is good stuff, but I'm looking for more power in the database like defined types, nested tables, etc.
I know you can use CLR types in SQL Server, and that would be interesting to me too, I just am looking for a good place to read about all the OR features it has.
PS. I'm willing to purchase a book.
You should read Best Practices for Semantic Data Modeling for Performance and Scalability.
The SQL Server is not as object relational as one might expect - not that long ago I realized that it does not (even) support table inheritance.
Related
when using a specific database such as sql server,do we have to install and configure odbc?
and my other question is why cant thrift/avro/rest/protobuf be used with rdbms,they are services,why are they just used with nosql dbs?
I am reading professional nosql book,and there is a list of different nosql db access methods,and they are listed as nosql db access methods,but when I googled them I saw they are services for serializing datas and so on(each of them is for sth).
thanks in advance.
These are multiple questions here.
(1) No, SQL Server is accessed best via the SQL Native Client, ADO/MDAC/OLE-DB. Performance-wise ODBC is not recommended at all, although it still may be the most viable option in certain cases.
(2) Thrift is only an RPC-mechanism, which has nothing to do with DB in General. This is a completely different aspect. However, Thrift can of course be used, and in fact it is actually used by the NoSQL database Apache Cassandra
I'd recommend to first find out what kind of DB is most suitable for your use case: It may be a typical SQL database, or it may be a classical ISAM or even something like Cassandra, CouchDB or MongoDB. Once you know that, you'll surely find out how to conect with the DB of your choice - or just ask another question :-).
By looking at the default, raw relational db schema of TFS2010 of its underlying team project collection sql database it is not necessarily self-explanatory how things work there and I was wondering whether someone has a more process oriented explanation how all these tables are related to each other. It seems like only 3 or 4 actually do have fk relations and such, the other ones are logically connected and would require joins and that's the part I am interested in & want to understand. Does anyknow have or know a more detailed explanation what's going on there?
I would strongly recommend using the TFS cube for all reporting needs, microsoft does not recommend the use of relational database as this may impact performance. As a good start you can read up about the schema, enhancements, dimensions of the TFS 2010 cube on the msdn library http://msdn.microsoft.com/en-us/library/ff432837.aspx. Also this walkthrough is very helpful to get you started with reporting against the tfs cube http://msdn.microsoft.com/en-us/library/ff730837.aspx#bkmk_tfsdb
HTH.
Cheers, Tarun
I came across this question after searching for a ODBC or JDBC. To my surprise, since I am new to db4o I found there are tools to browse db4o, including a Netbeans and Eclipse plug in. However, when it comes to the question at hand, I only found one company, and the product is not being sold nor demoed (makes me think is not ready yet).
So, how do you transfer data? Is there a tool or script I have not found yet?
That's right. When it comes to db4o's dRS, in order to move your data to a relational database you need to define a Hibernate mapping. But it's definitely the way to go for this kind of migration if you don't want to do it all by yourself.
Best!
Data transfer between db4o and relational Databases (in both direction) can be easily done with db4o's tool: dRS - db4o Replication System (based on Hibernate).
BTW, db4o user forum might be very useful, you will get answers directly from core developers.
In my opinion, this comes down to the Object-relational impedance mismatch. Which is to say, except in very simple cases, there isn't necessarily a direct translation from a database row to an object. Your object model is fundamentally different than your database schema. Therefore, I would imagine that in most cases, you will have to come up with the mapping (and a migration application) yourself.
This goes generally for any relational database/object database, not just SQL Server and db4o.
Our client wants to support both SQL Server and Oracle in the next project. Our experience comes from .NET/SQL Server platform. We will hire an Oracle developer, but our concern is with the DataAccess code. Will NHibernate make the DB Engine transparent for us? I don't think so, but i would like to hear from developers who have faced similar situations.
I know this question is a little vague, because i don't have Oracle experience, so i don't know what issues we will find.
You can easily use NHibernate to make your application database-agnostic by following some basic practices:
Design your object model first.
Do not use any database-specific code. You need somebody with good C# experience, not an Oracle developer. Do not rely on stuff like triggers, stored procedures, etc.
Let NHibernate generate the DB schemas at least initially (you can tweak things like indexes later) It will choose the best available datatypes for each DB.
Use a DB-agnostic POID generator (hilo or guid) instead of sequences or identity.
Try to avoid using SQL. HQL and Linq work fine in 99% of the cases.
Avoid NH features that are not supported by all of your target DB (for example, Future, MultiCriteria, etc)
NHibernate has a great community. You can always ask your questions in http://groups.google.com/group/nhusers besides posting here.
There are three things to consider - the ISession object, the SQL queries that are generated and your plain-old-clr-objects that are mapped to tables.
NHiberante will generate the required SQL queries based upon the chosen database dialect. If you configure NHibernate to use the SQL Server dialect it will generate SQL server correct SQL statements. This can easily be configured dynamically at runtime based on configuration.
You also need to configure your session to connect to the right type of database. Again, various configuration methods can support dynamic ISession creation at runtime.
Your actual data objects which are mapped to tables should not need to change based on database choice. One of NHibernates strengths is flexibility it provides in supporting multiple databases via a (fairly) simply configuration change and some up-front architectural thought.
See http://codebetter.com/blogs/karlseguin/archive/2009/03/30/using-nhibernate-with-multiple-databases.aspx for some examples of how you might abstract the underlying database away from the creation and usage of NHibernate.
I'd like the ability to create a schema for multiple database types such as MySQL, SQL Server, and PostgreSQL. I know ORM tools such as Hibernate can do this, but I won't be using an ORM to access the database so would like a solution that doesn't depend on one. Are there any tools that can do this?
Edit:
I forgot to mention that this is a personal project so I'm looking for something either cheep or free.
Take a look at Erwin.
Edit: (Based on question update)
Yeah Erwin is not going to be cheap. I did a quick search and found Toad Data Modeler, which I haven't tried but may be worth looking into:
Entity relationship diagrams - both Physical and Logical modeling (incl. inheritance)
Support for various databases (Oracle,
MS SQL Server, MySQL, Sybase Ase,
PostgreSQL, DB2)
Generation of SQL (DDL) scripts
More...
SQL Power offer a FOSS modeling tool, SQL Architect. It can generate DDL for several flavours of database. It is still technically beta (current release is 0.9.1) but it should be fine for a personal project. Find out more.
I know you said u don't want an ORM but SubSonic 3's migrations might just do the trick for you. You don't have to use the ORM just have SubSonic build itself from your database and have it as a separate class library. Then change the provider say from MSSQL to MySQL and have it rebuild itself.
PowerDesigner is a far better choice than Erwin but it too is expensive.
It took me roughly 16 hours to install the demo of Erwin, lots of failed attempts, incomprehensible error messages, help phone number which were disconnected.
PD will give you 14 day free trial.