IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Accès aux données Discussion :

[ORM] C# 2.0 / SQL 2000


Sujet :

Accès aux données

  1. #1
    Membre du Club
    Inscrit en
    Septembre 2006
    Messages
    107
    Détails du profil
    Informations personnelles :
    Âge : 39

    Informations forums :
    Inscription : Septembre 2006
    Messages : 107
    Points : 48
    Points
    48
    Par défaut [ORM] C# 2.0 / SQL 2000
    Bonjour,

    Dans le cadre de mon mémoire de fin d'études au CNAM je dois réaliser un outil d'ORM avec comme contraintes :
    - L’exécution de la couche d'accès au données sur du .Net 2.0 (ASP.NET)
    - Le lien doit fonctionner avec le SGBD SQL SERVER 2000 et supérieur.
    Ce qui m'interdit l'utilisation de Linq.

    L'outil en lui-même sera développé sous VS2010 en C# 4.0.


    Je suis en train de faire un peu l'état de l'art en termes de techniques d'ORM, si vous avez des suggestions en termes de bibliographie ou en termes d'architecture applicative, elles seront le bienvenue.

  2. #2
    Membre expert Avatar de iberserk
    Homme Profil pro
    Architecte de base de données
    Inscrit en
    Novembre 2004
    Messages
    1 795
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Architecte de base de données
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Novembre 2004
    Messages : 1 795
    Points : 3 173
    Points
    3 173
    Par défaut
    Pour faire un ORM "à la main" je partirais personnelement sur l'exemple "simple" (et non simpliste...) d'IBATIS
    Prendre conscience, c'est transformer le voile qui recouvre la lumière en miroir.
    MCTS Database Development
    MCTS Database Administration

  3. #3
    Membre chevronné
    Profil pro
    Inscrit en
    Février 2005
    Messages
    1 273
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2005
    Messages : 1 273
    Points : 2 202
    Points
    2 202
    Par défaut
    Non IBatis est un mapper et pas un ORM.

    Un excellent référence Française sur le sujet (et compatible .Net 2.0)
    Evaluant EUSS

    C'est en plus une très belle conception IMHO.

  4. #4
    Membre expert Avatar de iberserk
    Homme Profil pro
    Architecte de base de données
    Inscrit en
    Novembre 2004
    Messages
    1 795
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Architecte de base de données
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Novembre 2004
    Messages : 1 795
    Points : 3 173
    Points
    3 173
    Par défaut
    Non IBatis est un mapper et pas un ORM
    Un mapper objet relationnel... aussi appelé... ORM

    http://www.webonweboff.com/tips/asp/orm_ibatis.aspx


    Ce n'est pas parce qu'il ne génère pas automatiquement ls requètes pour les petits développeurs que ce n'est pas un ORM
    Prendre conscience, c'est transformer le voile qui recouvre la lumière en miroir.
    MCTS Database Development
    MCTS Database Administration

  5. #5
    Membre chevronné
    Profil pro
    Inscrit en
    Février 2005
    Messages
    1 273
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2005
    Messages : 1 273
    Points : 2 202
    Points
    2 202
    Par défaut
    Autant aller à la source pour dire ça ....

    The MyBatis data mapper framework makes it easier to use a relational database with object-oriented applications. MyBatis couples objects with stored procedures or SQL statements using a XML descriptor. Simplicity is the biggest advantage of the MyBatis data mapper over object relational mapping tools.
    La différence fondamentale est que IBatis ne fait pas "abstraction" de la base, il spécifie un mapping d'un resultat SQL dans un modlée objet.

    Quand à spécifier du SQL, la plupart des ORM existant permettent de spécifier le SQL dans le mapping ou d'utiliser du SQL en direct.

    Pour la différence conceptuelle, autant regarder Fowler :
    Data Mapper
    A layer of Mappers (473) that moves data between objects and a database while keeping them independent of each other and the mapper itself.

    Et on peut aussi lire directement la doc d'IBatis :
    2.4. Is iBATIS the best choice for my project?
    iBATIS is a Data Mapping tool. Its role is to map the columns of a database query (including a stored procedure) to the properties of an object. If your application is based on business objects (including Maps or IDictionary objects), then iBATIS can be a good choice. iBATIS is an even better choice when your application is layered, so that that the business layer is distinct from the user-interface layer.

    Under these circumstances, another good choice would be an Object/Relational Mapping tool (OR/M tool), like NHibernate. Other products in this category are Apache ObjectRelationalBridge and Gentle.NET. An OR/M tool generates all or most of the SQL for you, either beforehand or at runtime. These products are called OR/M tools because they try to map an object graph to a relational schema.

    iBATIS is not an OR/M tool. iBATIS helps you map objects to stored procedures or SQL statements. The underlying schema is irrelevant. An OR/M tool is great if you can map your objects to tables. But they are not so great if your objects are stored as a relational view rather than as a table. If you can write a statement or procedure that exposes the columns for your object, regardless of how they are stored, iBATIS can do the rest.

    So, how do you decide whether to OR/M or to DataMap? As always, the best advice is to implement a representative part of your project using either approach, and then decide. But, in general, OR/M is a good thing when you

    Have complete control over your database implementation

    Do not have a Database Administrator or SQL guru on the team

    Need to model the problem domain outside the database as an object graph.

    Likewise, the best time to use a Data Mapper, like iBATIS, is when:

    You do not have complete control over the database implementation, or want to continue to access a legacy database as it is being refactored.

    You have database administrators or SQL gurus on the team.

    The database is being used to model the problem domain, and the application's primary role is to help the client use the database model.

    In the end, you have to decide what's best for your project. If a OR/M tool works better for you, that's great! If your next project has different needs, then we hope you give iBATIS another look. If iBATIS works for you now: Excellent! Join the iBATIS user mailing list if you have any questions.

Discussions similaires

  1. [SQL 2000] commande Last ???
    Par BilTCD dans le forum Langage SQL
    Réponses: 11
    Dernier message: 06/01/2011, 15h56
  2. [JDBC]Eclispe java et sql 2000
    Par vijeo dans le forum Eclipse Java
    Réponses: 2
    Dernier message: 27/10/2005, 11h31
  3. Backup SQL 2000 en SQL7
    Par nbl dans le forum Administration
    Réponses: 8
    Dernier message: 25/08/2005, 12h26
  4. [CR 8.5] - SQL 2000 - Certains champs invisibles ????
    Par caviar dans le forum SAP Crystal Reports
    Réponses: 1
    Dernier message: 07/02/2005, 13h41
  5. SQL 2000 - Liste + taille des tables et index
    Par Fox dans le forum MS SQL Server
    Réponses: 2
    Dernier message: 12/03/2004, 15h59

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo