in

The ORM Foundation

Get the facts!

I think I slipped bad data in the Sample Population Editor UI

Last post 09-03-2009 15:18 by Matthew Curland. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 09-02-2009 12:06

    I think I slipped bad data in the Sample Population Editor UI

    I went through the NORMA labs 1 and 2 and I was playing with creating Sample Data.  Wow, that's cool.  I was not quite paying attention to the entry process and somehow created a "?" City associated to a CityName record.  I'm getting the error "FactType instance "? has <CityName>" in model <the Cinema ORM> has a partial population."  If I click on the error, it highlist the "CityHasCityName" fact type and the binary fact type symbol has a red exclamation point on it.  I haven't invested a lot of time in figuring out what I did, but I'm guessing I messed up the underlying data storage.  Do you know how I should clear this bad record?  I'm fine with wiping out the data and starting over, if that will clear the stored info.  Something tells me there's an XML structure holding this stuff that I would have to get at to clean this up, or maybe not.  Any assistance would be appreciated.

     Great product -- what powerful potential!  I'm working on convincing the team I'm on to use this in our SDLC. 

  • 09-02-2009 16:13 In reply to

    Re: I think I slipped bad data in the Sample Population Editor UI

    Answer

    Okay, I was feeling bold while showing this to my boss and we started hacking the XML of the ORM file.  We zapped the error stuff and zapped the fact type instance and Voila, it fixed the error.  If there is a way to fix this in the UI, please let me know.

  • 09-03-2009 5:40 In reply to

    Re: I think I slipped bad data in the Sample Population Editor UI

    Sacrigen:
     Great product -- what powerful potential!  I'm working on convincing the team I'm on to use this in our SDLC.

    That's goood news.

    I have been working on the "SDLC" aspect of ORM for about 20 years during which time I have encountered (and overcome) many "objections".

    I'd be pleased to help you to "convince the team".

    What do you see as the "barriers to acceptance" by your colleagues?

    Ken 

    Filed under:
  • 09-03-2009 12:31 In reply to

    Re: I think I slipped bad data in the Sample Population Editor UI

    I’m working on a team that is writing SDLC policy and recommending a process for the IT services of the agency (I’m a state gov employee).  We are anticipating moving towards agile development and ORM sure seems to support that process.  As part of that agile methodology, I envision a process where a System or Business Analyst can leave a requirements meeting with a system stakeholder with an ORM diagram that represents a plan that could actually be handed off to a developer to prototype a baseline database and a tester that could start working on a plan for test cases.  I can’t help but have the pipe dream where I think of ORM as the basis that could evolve into some kind of “enterprise application wizard” that would even generate simple data entry interfaces for a scripted database schema: “here’s your ORM, requirements list, database script and data entry interface solution in X language.  You demo in three days.”  Talk about rapid deployment!                                                                                         Here’s what I got from the Demo I did yesterday.  The syntax was rather overwhelming at first glance – fact types and entities and constraints zipping all over the place.  I used the movie theater design labs as samples and did the data population to show off that feature.  I also extended that the verbalization could feed directly to requirements listing for development/testing documentation.  Others talked about this as just another tool that has promised to do these things.  So, the track record of things like UML, ER, etc. spook most of the team into thinking this tool will have a tough time delivering on the promise of saving effort.                                                                                Technically, I was concerned with how to design auditing tools and universal type tables.  Also, I was not sure about the way ORM worked with clouded components – web services, existing enterprise tools like CRM or pulling information from BizTalk, or other “assumed” entities that may have structures outside the scope of the existing process.  Of course, getting the big brown book would probably start to answer those kinds of questions.  I’ve been following ORM since I learned of it in the MCSD training I took a couple years ago.  Terry Halpin’s thesis papers still sit in a pile on my desk from when I tried to monkey with the Visio 2002 ORM diagram tool.  ORM has come a long way since then!  The NORMA incarnation has re-invigorated my interest in the “tool”.                                                                                   The biggest plus of the process to convince the team of ORM’s viability is the idea of the reverse engineering process.  If I create an ORM from the reverse engineering process and then show that the ORM lets the team look at the entity relationships and challenge the design, then we could start trusting this “tool” as a better way to get from concept to prototype.  We have a project I did that with after the meeting and the ORM showed a flaw in the design the DB designer didn’t see until the verbalization described a scenario that violated a business rule.  I just smiled.  We didn’t know quite how to express the correct design in the ORM, but they plan to fix the database and I’ll re-run it and compare the differences.                                                                                                                         I hope this feedback helps.  If you have any suggestions on learning ORM, the role it plays in modern SDLC and partners I may want to talk to, feel free to let me know.  Thanks for the tools and thanks for the reply!
  • 09-03-2009 15:18 In reply to

    Re: I think I slipped bad data in the Sample Population Editor UI

    Answer

    The XML file is certainly available, and most bogus changes you make that do not break schema compliance (open the Error List with the XML editor open to see any problems) will be cleaned up during the load process. Loading does a full validation of the model so that subsequent changes can be based on a fully compliant state. Deleting the orm:ModelErrors section will never hurt as this will be regenerated on load if the model does have errors.

    I think I've tracked down what you did here, and it is definitely a bug in the tool. Here's what I believe happened:

    1. You added an instance to CityName, which has an implied mandatory constraint on the 'City has CityName' role because this is the only role played by CityName.
    2. The implied mandatory means that each CityName instance must participate in the FactType. This puts a 'population mandatory' error on the CityName role.
    3. City has CityName is part of the preferred identification scheme for City, which means that the FactType populations are implied by the City population. Therefore, we do not store the FactType populations. You'll see this in the UI because the Sample Population editor shows as read only.
    4. (Here's the bug). Activating the error via {double-click on the role, select in the context menu, double-click in the error list, click in the verbalization browser} invokes an error activation routine. The error activation routine should populate a new EntityInstance on city, but it isn't catching the implied FactType population state and is adding a fact instance instead of an entity instance.
    5. The automatic error activator has now added a fact instance that is not supposed to be there and is inaccessible through the UI.

    This is something I need to fix for the next release. The suspect code is the ORMSamplePopulationToolWindow.AutoCorrectMandatoryError routine in ORMModel\Shell\SamplePopulationToolWindow.cs if you're as curious about the code as about the XML.

    Although it is far from obvious, the easiest way to fix this in the tool is to toggle the IsPreferredIdentifier property on the external uniqueness constraint two times. The first toggle will leave City with no preferred identifier, the second toggle (back to true) will restore the preferred identifier and remove the unwanted fact instances.

    I'm glad you're excited about NORMA. Your comments on how you are currently using--and want to use the tool--are much appreciated.

    -Matt

Page 1 of 1 (5 items)
© 2008-2014 The ORM Foundation: A UK not-for-profit organisation -------------- Terms of Service