NHibernate in Action Web Seminar at UMLChina By Pierre Henri Kuaté 2008/08/27

Slides:



Advertisements
Similar presentations
Introduction to NHibernate By Andrew Smith. The Basics Object Relation Mapper Maps POCOs to database tables Based on Java Hibernate. V stable Generates.
Advertisements

An Object/Relational Mapping tool Free and open source Simplifies storage of object data in a relational database Removes the need to write and maintain.
Query Methods (SQL). What is SQL A programming language for databases. SQL (structured Query Language) It allows you add, edit, delete and run queries.
Michael Pizzo Software Architect Data Programmability Microsoft Corporation.
NHibernate Object/Relational Persistence for.NET.
.NET Database Technologies: Open-Source Frameworks.
Caching the MDSPlus Data via Hibernate By Ajith M Jose Comp6703 Project Client: Raju Karia Supervisor: Dr. Henry Gardner (Development of “WebScope”)
Hibernate 1. Introduction ORM goal: Take advantage of the things SQL databases do well, without leaving the Java language of objects and classes. ORM.
Fast Track to ColdFusion 9. Getting Started with ColdFusion Understanding Dynamic Web Pages ColdFusion Benchmark Introducing the ColdFusion Language Introducing.
Object Relational Mapping. What does ORM do? Maps Object Model to Relational Model. Resolve impedance mismatch. Resolve mapping of scalar and non-scalar.
ORM Object-Relational Mapping 1. Object Persistence Persistence is the ability of an object to survive the lifecycle of the process, in which it resides.
ORM Technologies and Entity Framework (EF)
RIZWAN REHMAN, CCS, DU. Advantages of ORDBMSs  The main advantages of extending the relational data model come from reuse and sharing.  Reuse comes.
Session-01. Hibernate Framework ? Why we use Hibernate ?
A tour of new features introducing LINQ. Agenda of LINQ Presentation We have features for every step of the way LINQ Fundamentals Anonymous Functions/Lambda.
Data Persistence and Object-Relational Mapping Slides by James Brucker, used with his permission 1.
Hibernatification! Roadmap for Migrating from Plain Old SQL on JDBC to JPA on Hibernate Duke Banerjee Senior Developer, DrillingInfo.com.
Object and object-relational databases 1. Object databases vs. Object-relational databases Object databases Stores complex objects – Data + functions.
Entity Framework Code First End to End
Data Access Patterns Some of the problems with data access from OO programs: 1.Data source and OO program use different data modelling concepts 2.Decoupling.
CHAPTER 14 USING RELATIONAL DATABASES TO PROVIDE OBJECT PERSISTENCE (ONLINE) © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database.
Seminar on. Overview Hibernate. What is it? Hibernate. How does it work? Hibernate Tools.
Entity Framework Overview. Entity Framework A set of technologies in ADO.NET that support the development of data-oriented software applications A component.
Object/Relational Mapping with Hibernate Practical ORM.
Object Oriented Analysis and Design 1 Chapter 7 Database Design  UML Specification for Data Modeling  The Relational Data Model and Object Model  Persistence.
JDBC Java and Databases. RHS – SOC 2 JDBC JDBC – Java DataBase Connectivity An API (i.e. a set of classes and methods), for working with databases in.
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 14 Using Relational Databases to Provide Object Persistence (Overview) Modern Database.
Hibernate Persistence. What is Persistence Persist data to database or other storage.  In OO world, persistence means persist object to external storage.
Intoduction to NHibernate. Agenda Overview of NHibernate Models and Mappings Configuration Sessions and Transactions Queries.
Hibernate 3.0. What is Hibernate Hibernate is a free, open source Java package that makes it easy to work with relational databases. Hibernate makes it.
Java Data Persistence Using Hibernate Jack Gardner October 2004.
Object-Relational Mapping with Hibernate Brian Sam-Bodden Principal Partner Integrallis Software, LLC. August 1 - 5, 2005.
Entity Framework Code First – Beyond the Basics Sergey Barskiy, Magenic Microsoft MVP – Data Platform Principal Consultant.
Oct * Brad Tutterow. VS 2008.NET 3.5LINQ Entity Framework  The ADO.NET Entity Framework is part of Microsoft’s next generation of.NET technologies.
EntityFrame work and LINQ CH 14. linq LINQ enables you to query data from a wide variety of data sources, directly from your programming code. LINQ is.
A U.S. Department of Energy Office of Science Laboratory Operated by The University of Chicago Argonne National Laboratory Office of Science U.S. Department.
JPA / HIBERNATE CSCI 6370 Nilayan Bhattacharya Sanket Sable.
AUC Technologies LINQ (Language Integrated Query) LINQ Presented By : SHAIKH SHARYAR JAVED Software Engineer (Daedalus Software Inc.) Technology Teacher.
Intoduction to NHibernate. Agenda Overview of NHibernate Models and Mappings Configuration Sessions and Transactions Queries.
Fall CIS 764 Database Systems Engineering L18.2 : Object Relational Mapping … ….Object persistence.
Topic : Hibernate 1 Kaster Nurmukan. An ORM tool The problem fixed by ORM Advantage Hibernate Hibernate Basic –Hibernate sessionFactory –Hibernate Session.
All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research.
Topic : Hibernate 1 Kaster Nurmukan. An ORM tool Used in data layer of applications Implements JPA.
Introduction – ORM, Helloworld Application
JDBC Java and Databases. SWC – JDBC JDBC – Java DataBase Connectivity An API (i.e. a set of classes and methods), for working with databases in.
Sean Chambers.  ORM stands for Object Relational Mapper  Maps your POCO (plain old clr objects) to your relational model using XML config  Relieves.
Introduction to ORM Hibernate Hibernate vs JDBC. May 12, 2011 INTRODUCTION TO ORM ORM is a programming technique for converting data between relational.
ORM Basics Repository Pattern, Models, Entity Manager Ivan Yonkov Technical Trainer Software University
 Who I am  What is NHibernate? ◦ Object Relational Mapper ◦ A framework for building advanced frameworks ◦ Ported from Java ◦ A wide NHibernate ecosystem.
Faeez, Franz & Syamim.   Database – collection of persistent data  Database Management System (DBMS) – software system that supports creation, population,
CS422 Principles of Database Systems Object-Relational Mapping (ORM) Chengyu Sun California State University, Los Angeles.
CS520 Web Programming Object-Relational Mapping with Hibernate and JPA (I) Chengyu Sun California State University, Los Angeles.
CS 440 Database Management Systems Stored procedures & OR mapping 1.
Hibernate Online Training. Introduction to Hibernate Hibernate is a high-performance Object-Relational persistence and query service which takes care.
Submitted by: Moran Mishan. Instructed by: Osnat (Ossi) Mokryn, Dr.
Hibernate Java Persistence API. What is Persistence Persistence: The continued or prolonged existence of something. Most Applications Achieve Persistence.
Introduction to Database Programming with Python Gary Stewart
Fall CIS 764 Database Systems Engineering L11: Object Relational Mapping … (a) ORM, Object persistence (b) Pets sequence.
New Technology: Why, What ,How
Introduction to Entity framework
Introduction to Entity Framework
A very brief introduction
Entity Framework By: Casey Griffin.
ADO.NET Entity Framework
Databases and Information Management
Java Data Persistence Using Hibernate
Hibernate Bayu Priyambadha, S.Kom.
Entity Framework Core (EF Core)
Databases and Information Management
Developing and testing enterprise Java applications
Presentation transcript:

NHibernate in Action Web Seminar at UMLChina By Pierre Henri Kuaté 2008/08/27

Object/Relational Mapping (ORM) Persistence technique Allows Object-Oriented Programming Supports Relational Database Enables many positive design principles: ◦ Separation of concerns ◦ Domain Driven Development ◦ Test Driven Development

NHibernate ORM library implemented using.NET Port of the Java library called Hibernate Database-independent (almost) Provides most advanced features Free, open source and mature

Persistence Make data outlives the execution of the program that created it Commonly known as CRUD operations CRUD = Create, Retrieve, Update, Delete Manipulates entities in an object-oriented language Data persisted in tables of a relational database

Entity Object-oriented class (inheritance and polymorphism) Encapsulates fields using properties Use methods to implement business logic No constraint on the structure (DataSet is not an entity) Effective tools for software engineering

Table Set of data Contains columns and rows Supports the relational algebra Effective tools for data manipulation

Entities are best for modeling a business domain

Tables are best for efficient persistence

NHibernate Configuration Process Provide information: ◦ Database connection details ◦ Entities mapping Auto generate the database tables with one line of code Use a NHibernate session to access the database: using(ISession session = sessionFactory.OpenSession()) using(session.BeginTransaction()) { // Use NHibernate here session.Transaction.Commit(); } Mapping of entities to tables Using.NET attributes: [Class] public class Animal { [Id(Name="Id")] [Generator(1, Class="native")] public int Id { get; set; } [Property] public string Name { get; set; } }

Object/Relational Mapping brings the best of both worlds Save entities (Object-oriented; no SQL!) var eagle = new Animal(2, "Eagle", "2 paws", "2 wings"); nhibernateSession.Save(eagle); Load entities var eagle = nhibernateSession.Get (2); Using queries ◦ HQL: Hibernate Query Language ◦ QBC: Query by Criteria ◦ Linq for NHibernate (in beta)

Linq for NHibernate Language Integrated Query (LINQ) “Adds native data querying capabilities to.NET languages using a syntax reminiscent of SQL” var result = from lb in _session.Linq () where lb.Name.Contains("e") orderby lb.Name select lb; Potentially faster than hand-coded SQL commands due to caching, batching, lazy loading and other performance optimizations.

To Learn More NHibernate Website: NHibernate Resources: NHibernate in Action: NHibernate Forum: