Andrew “"1 333328125 3%: ‘$315 $6615 6E 21' 383/335 Peters’ Sammamlsh’- WA (Us) 8,438,532, , B2 * 5/2013 Foxee Et Ea1

Andrew “"1 333328125 3%: ‘$315 $6615 6E 21' 383/335 Peters’ Sammamlsh’- WA (Us) 8,438,532, , B2 * 5/2013 Foxee Et Ea1

US008600925B2 (12) Ulllted States Patent (10) Patent N0.: US 8,600,925 B2 Vickers et a]. (45) Date of Patent: Dec. 3, 2013 (54) OBJECT-RELATIONAL MAPPED DATABASE 7,089,583 B2 8/2006 Mehra etal. INITIALIZATION 7,277,435 B2 * 10/2007 Keller ......................... .. 370/390 7,421,436 B2 9/2008 Salo et a1. (75) Inventors: Arthur John Cerdlc. Vlckers,. Redmond, 7,676,4937,657,505 B2 * 3/20102/2010 PiZJZOHe'lsber et ‘i1’ et al. .... .. 707/999.002 WA (US); Dlego Bernardo Vega, 7,734,659 B2 * 6/2010 Lori ............................ .. 707/802 Sammamish, WA (US); Rowan Miller, 7,788,275 B2 * 8/2010 Warren et a1. .. 707/763 Kirkland’ WA (Us); Andrew “"1 333328125 3%: ‘$315 $6615 6E 21' 383/335 Peters’ Sammamlsh’- WA (Us) 8,438,532, , B2 * 5/2013 FOXee et ea1. a ..................... .. 717/101 2009/0024652 A1 1/2009 Th t l. (73) Assignee: Microsoft Corporation, Redmond, WA 2010/0100427 A1 4/2010 M32331; :1‘ US ( ) OTHER PUBLICATIONS ( * ) Notice: Subjeqw any (gsglaimeé’. the germdof?gig “Productivity Improvements for the Entity Framework”, Retrieved Patent 15 exten e Or a Juste un er from <<http://blogs.msdn.com/b/efdesign/archive/2010/06/2 l/pro U'S'C' 15403) by 201 days‘ ductivity-improvements-for-the-entity-framework. (21) Appl NO _ 13/179 598 aspx?PageIndex:2>>, Jun. 21, 2010, 7 Pages. .. , (Continued) (22) Filed: Jul. 11, 2011 P rzmar' y Exammer ' * M'1c h ae l B H o l mes (65) Prior Publication Data (74) Attorney, Agent, or Firm * Ogilvie LaW Firm US 2012/0331013 A1 D .27 2012 e0 ’ (57) ABSTRACT Related US, Application Data A balance is provided betWeen automation of repetitive data _ _ _ _ _ base creation and con?guration efforts, on the one hand, and (63) E10 gtmuejnongl'gg? 10f apphcanon NO‘ 13/166’825’ ?exibility to depart from prior con?gurations, on the other e on 1111' ’ ' hand, to assist developers With aspects of database initializa (51) IntCl t1on.'AnPPl' a 1cat1on ' d oma1n1nc"ldd u es ata context mstances,' Got'sF 7/00 (2006 01) database connections, object models mapped by an object G06N 5/02 (200601) relational mapper, and database initialiZers. Upon the ?rst 52 U 5 Cl ' attempted runtime use of a particular database connectioni ( ) C ‘ 706/50 data context instance4obj ect model combination, a database I ......... .... ...... ... ...................................... .. initializer is invokad~ Initializers may Check to See if the (58) Fleld of Classl?catlon Search database exists, (re)generate a database and schema based on USPC .... ..' ............................................ 706/50 the Object model, determine Whether the database is compat_ See apphcanon ?le for Complete Search hlstory' ible With the current object model, delete the database and its (56) R f Ct d schema, seed data, modify database indexes, and/or migrate e erences 1 e an existing database, for example. A custom initialiZer can U.S. PATENT DOCUMENTS run developer-supplied code as desired to place the database in a knoWn state for use by the application. 6,487,457 B1 11/2002 Hull et al. 6,999,956 B2 2/2006 Mullins 20 Claims, 3 Drawing Sheets DEVICE, E.G., COMPUTER SYSTEM Q MEMORY / MEDIA m TOOLS Q, E.G., IDE m, OBJECT-RELATIONAL MAPPER @ DEVELOPER CODE Q, OBJECTS Q, DATABASE CONNECTION 1E, MODEL(S) m DATA CONTEXT E INSTANCE 1__0 PROCESSOR(S)m : DISPLAY1 CON FIGURED MEDIUM l INSTRUCTIONS m >- 100 NETWORK(S)‘ L DATA m PERIPHERAL(S) & US 8,600,925 B2 Page 2 (56) References Cited deX.j sp?topic:/com.ibm.websphere.ejbfep.multiplatform.doc/info/ ae/ae/welcinewinreleaseejbfp.html>>, Jun. 29, 2011 (Retrieved OTHER PUBLICATIONS Date), 5 Pages. “ADO.NET Entity FrameworkiWikipedia, the free encyclopedia”, Kraig Brockschmidt et al., “Microsoft Data Development Technolo Retrieved from <<http://en.wikipedia.org/wiki/ADO.NETiEntityi gies: Past, Present, and Future”, Retrieved from <<http://msdn. Framework>>, May 26, 2011, 10 Pages. microsoft.com/en-us/library/ee730343(d?3rinter).aspx>>, Sep. Arthur Vickers, “Code First: Inside DbConteXt Initialization”, 2010, 18 Pages. Retrieved from <<http://blog.oneunicorn.com/20ll/04/l5/code “Object and Relational Mapping (ORM) With Hibernate”, Retrieved ?rst-inside-dbconteXt-initialiZation/>>, Apr. 15, 2011, 5 Pages. from <<http://www.jboss.com/pdf/HibernateBrochure-03i07. “EF 41 Code First Walkthrough”, Retrieved from <<http://blogs. pdf>>, Jun. 29, 2011 (Retrieved Date), 4 Pages. msdn.com/b/adonet/archive/20 1 1/03/ l5/ef-4-l-code-?rst Jeff Prosise, “Supporting Database Cache Dependencies in ASP. walkthrough.aspX>>, Mar. 15, 2011, 8 Pages. NET”, Retrieved from <<http://msdn.microsoft.com/en-us/maga Martin Fowler, “FluentInterface”, Retrieved from <<http:// Zine/ccl88758(printer).aspX>>, Apr. 2003, 7 Pages. martinfowler.com/bliki/FluentInterface.html>>, Dec. 20, 2005, 3 “EF Feature CTP4 Releasedl”, Retrieved from <<http://blogs.msdn. Pages. com/b/adonet/archive/ZO10/07/ l4/ctp4announcement.aspX>>, Jul. “Object databaseiWikipedia, the free encyclopedia”, Retrieved 14, 2010, 5 Pages. from <<http://en.wikipedia.org/wiki/Objectidatabase>>, Jun. 16, José Blakeley et al, “Next-Generation Data Access: Making the Con ceptual Level Real”, Retrieved from <<http://msdn.microsoft.com/ 2011, 6 Pages. en-us/library/aa730866%28v:vs.80%29.aspX>>, Jun. 2006, 22 “Obj ect-relational mappingiWikipedia, the free encyclopedia’”, Pages. Retrieved from <<http://en.wikipedia.org/wiki/ Obj ect-relationali “FAQ :: Castle Project”, Retrieved from <<http://www.castleproject. mapping>>, Jun. 23, 2011, 3 Pages. org/activerecord/faq.html>>, Retrieved Jul. 9, 2011, 4 Pages. Edward Hieatt and Rob Mee, “Repository”, Retrieved from <<http:// “LLBLGen Pro overview”, Retrieved from <<http://www.llblgen. www.martinfowler.com/eaaCatalog/repository.html>>, Jul. 1, 2011 com/Pages/overview.aspX>>, Retrieved Jul. 9, 2011, 3 Pages. (retrieved data), 2 Pages. “List of object-relational mapping softwareiWikipedia, the free “Unit of Work”, Retrieved from <<http://www.martinfowler.com/ encyclopedia”, Retrieved from <<http://en.wikipedia.org/wiki/ eaaCatalog/unitOfVVork.html>>, Jul. 1, 2011 (retrieved data), 2 Listiofiobject-relationalimappingisoftware>>, Jul. 4, 2011, 5 Pages. Pages. “Persistence (computer science)iWikipedia, the free encyclope Scott Guthrie, “Announcing Entity Framework Code-First (CTPS dia”, Retrieved from <<http://en.wikipedia.org/wiki/Persistencei release)iScottGu’s Blog”, Retrieved from <<http://weblogs.asp. (computeriscience)>>, May 9, 2011, 3 Pages. net/ scottgu/ archive/ 20 l 0/ l 2/ 0 8/ announcing-entity-framework “Using DbConteXt in EF 41 Part 5: Working with PropertyValues”, code-?rst-ctpS-release.aspX>>, Dec. 8, 2010, 40 Pages. Retrieved from <<http://blogs.msdn.com/b/adonet/archive/ 201 1/0 1/ Mario Aquino, “A Simple Data Access Layer using Hibernate”, 30/using-dbconteXt-in-ef-feature-ctpS -part-5-working-with-prop Retrieved from <<http://www.cnblogs.com/sunsonbaby/archive/ erty-values.aspX>>, Jan. 30, 2011, 9 Pages. 2004/12/3 l/84998.htm1>>, copyright date 2003, 14 Pages. “Using DbConteXt in EF 41 Part 6: Loading Related Entities”, “OpenAccess Features”, Retrieved from <<http://www.telerik.com/ Retrieved from <<http://blogs.msdn.com/b/adonet/archive/ 201 1/0 1/ products/orm/features.aspX>>, Jun. 29, 2011 (retrieved date), 13 3 l/using-dbconteXt-in-ef-feature-ctpS -part-6-loading-related-enti Pages. ties.aspX>>, Jan. 31,2011, 7 Pages. Jeremy Miller, “Design Patterns for Data Persistence”, Retrieved “When is Code First not code ?rst?”, Retrieved from <<http://blogs. from <<http://msdn.microsoft.com/en-us/magaZine/ msdn.com/b/ adonet/ archive/ 20 l l/ 03/ 07/when-is-code-?rst-not dd569757(printer).aspX>>, Jun. 29, 2011 (retrieved date), 8 Pages. code-?rst.aspX>>, Mar. 7, 2011, 4 Pages. “What is new in the Version 6.1 Feature Pack for EJB 3 .0”, Retrieved from <<http://publib.boulder.ibm.com/infocenter/wasinfo/v6rl/in * cited by examiner US. Patent Dec. 3, 2013 Sheet 1 of3 US 8,600,925 B2 DEVICE, E.G., COMPUTER SYSTEM E MEMORY/MEDIAm TOOLS Q, E.G., ‘DE m, DEVELOPER CODE OBJECT-RELATIONAL MAPPER 1 6 E, OBJECTS Q, DATABASE CONNECTION _2 MODEUS) M DATA OONTExT E INSTANOE U l _ _ _ _ _ _ _ _ _ _ __1 |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __l I ' I DATABASE 138 I PROCESSOR(S) m i DISPLAY Q :l : SCHEMA i—! i _ _ _ _ _ _ _ _ _ _ _ __. l____________________ i ‘ ‘ i CONFIGURED MEDIUM l USER(S) m INSTRUCTIONS L } 100 NETWORK(S)" m DATA m I, PER|PHERAL(S) m Fig. 1 STORAGE MEDIA l DATABASE INITIALIZATION MONITOR u, |NDEX(ES) m MONITOR CODE M SEED DATA m DATABASE INITIALIZER(S) m E.G., DEFAULT INITIALIZER m, EXISTING CUSTOM INITIALIZER & DATABASE E AND DATA E To WGRATE INITIALIZATION SETTING(S) m MODEL-HASH m, SCHEMA-HASH 2 Fig. 2 US. Patent Dec. 3, 2013 Sheet 2 of3 US 8,600,925 B2 / 300 A DETECT ?ATTEMPTED FIRST RUNTIME USE E V INVOKE @ DATABASE INITIALIZER V CHECK @ WHETHER DATABASE EXISTS V DETERMINE m NO DATABASE EXISTS V GENERATE Q COMPATIBLE DATABASE & SCHEMA V ASCERTAIN u DATABASE — MODEL COMPATIBILITY V SKIP m ASCERTAINING COMPATIBILITY V DELETE m DATABASE & SCHEMA V GENERATE 320 312 REPLACEMENT DATABASE FIND E THAT OBJECT MODEL HAS CHANGED V SEED @ DATA INTO DATABASE V MODIFY E INDEX OF DATABASE V MIGRATE @ DATABASE, RETAIN @ DATA V EXECUTE Q (CUSTOM) INITIALIZATION CODE CONFIGURE E STORAGE MEDIUM Fig. 3 US. Patent Dec. 3, 2013 Sheet 3 of3 US 8,600,925 B2 / 400 T OBTAIN @ DATA CONTEXT INSTANCE _, T‘ SPECIFY % DATABASE CONNECTION DEFINE M OBJECT MODEL OF APPLICATION & _} SUPPLY m CUSTOM DATABASE INITIALIZER _, Al IEMPT Q RUNTIME m USE OF CONNECTION _} ‘ VERIFY m DATABASE INITIALIZED g _, VERIFY m BASED ON INDEX MODIFICATION Q _} = VERIFY m BASED ON DATABASE MIGRATION Q _, T VERIFY m BASED ON DATA SEEDING RESULT % _, T‘ sELECT % INITIALIzATION SETTING ' OVERRIDE % DEFAULT INITIALIZER _, ' SUPPLEMENT @ DEFAULT INITIALIZER _, Fig.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    19 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us