Learning outcomesExplain the purpose of Object Relational Mappers
Objectives Introduction to ORMsIntroduction to .NET ORMsBenefits of ORMsSelecting a suitable .NET ORM
Introduction to ORMDeveloping software is a complicated task.We came a long way in software development now, we passed◦Assembler daysWe have now◦Interpreters ◦Higher level languages◦Tools and TechsWith all these new technologies we still face challenges in developmentOne of the Biggest challenge comes from Database.
Introduction to ORMUntil recently, the most efficient way to store data was in a relational databaseA relational database can store vast amounts of data in a structured way that allows for efficient storage, access, and searchMore recently, so called NoSQL solutions have been gaining production use on truly vast datasets with real-time and concurrent operational constraintsThink Facebook and Twitter and their use of Hadoop and Cassandra
Introduction to ORMIf you’ve decided to use Object Oriented Language to write your application in, then what will be the next steps?◦Process to gather requirements◦Creating a design (UI/ UX)◦Development (coding)◦TestingDuring the design phase what is your approach to access the data?◦Are you going to use stored-procedures for CURD?◦Are you going to create a custom data access layer using ADO.NET and COM+?◦Or may be get a widget to do all this?
Trouble with ObjectsFrom an OO standpoint, the problem with these persistence mechanisms is that their core abstractions are not objectsThey are tables with rows and columns (RDBMS)OrThey are (some variation on) key-value pairs (NoSQL)
Problems Conti…The OO world, on the other hand, has◦Classes, sub-classes, inheritance, associations◦Objects, atts, methods, polymorphismThese concepts do not easily map into the abstractions of persistence mechanisms◦Even the creation of serialization mechanisms is non-trivial with the work that has to go in to traversing and reconstituting an object graph