Normal Topic Opinions on relational vs. natural linking (Read 440 times)
charliebrown
Junior Member
Members
**
Offline


Beware...novice at large

Posts: 97
Location: Sacramento, CA
Joined: Apr 19th, 2006
Opinions on relational vs. natural linking
Oct 21st, 2007 at 7:04pm
Print Post Print Post  
My problem on exporting/importing has been orphan records all along...I hadn't realized that there were many repairs entered in our Q&A database that were not items on our inventory....nothing to link to in the parent, so these "kids" are wandering aimlessly about.  I had tons of fun exporting, importing and even designing my application from the ground up again...testing a few things and trying different design, navigation and layout element schemes.  The more I work with Sesame, as with anything, the more familiar I become and the easier it is to spot my goof-ups.

I have two versions of our application saved-thanks to Ben and Ray and, of course Hammer-many thanks btw  Smiley-one relationally linked, one naturally linked.  It's a matter of whether we can do without those orphans or put them on our inventory to make things right.  I'll discuss that with the boss on Monday...he's not too keen on us keeping track of inventory items for other departments since we have no control over them.  I can see his point for reasons I won't give here.

Running my app-naturally linked with the orphan records out of play (gone) is noticeably faster-relationally linked runs fine and doesn't take as long to search as it did when files were stored on another computer.

After going through my export/import problems, I learned a few things about how records had been kept over the years here.  Repairs were done on items that were NOT on our inventory...no linking to the parent as a result; items transferred to other locations and serial numbers not acurately entered (a digit off here and there)...I plan on rectifying that problem with (I think) pick lists from inventory to make sure the serial number enetered into repair records is RIGHT  Roll Eyes...glutton for punishment here.

Another thing that hit me is that we routinely transfer equipment to different sites.  That's fine when working with the parent, but repair records exist for the location these items were assigned to PRIOR to being moved to new locations.  When they move and come back to us for repair, the new location is entered in the repair database.

For example, let's say I have 25 floor burnishers on inventory, one is assigned to Timothy Leary High School in our parent database, the others are assigned to different locations.  It cost $900 when it was purchased.  We've repaired it 12 times and have each repair entered in our child database.  The operator has been abusing this machine (buffing the asphalt parking lot at 2 AM),  so my boss decides to transfer it to someone who wants it and will care for it properly.  We re-assign it to Utopia Middle School.

After a few years we have 6 more repair records enetered for this machine listed under "Utopia Middle School".  We would have to run our search based on the serial number to get an accurate result for all repairs done to this machine at both locations.  If our search for repairs is inaccurate (we only get a result for repairs done since it was at Utopia Middle School), we would be looking at only $300 in repairs and not counting the $700 in repairs while it was assigned to it's former location.

We scrap and replace equipment occasionally, based on the amount of money we have invested in repairs and how cost effective it is to continue to repair, parts availabilty, etc., so we do need to track each and every repair as accurately as possible.  Add to that the repairs we do for equipment that is NOT on our inventory and we can easily get a few orphans lining up through the years...it's one of those things that happens when working with flat databases for a decade or so and then switching to a true relational database program.  Makes me really appraciate good record keeping practices after finding things that should have been done properly from the beginning   Embarrassed ...of course, that's one reason I like this place so much.  People have a nak for wanting to do things right.

  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2492
Joined: Aug 20th, 2003
Re: Opinions on relational vs. natural linking
Reply #1 - Oct 22nd, 2007 at 8:01pm
Print Post Print Post  
Hello Charlie,

What you could do is have two elements. One named something like "Total Repairs at this Location" and another named "Total Repairs at all Locations". The first one would be populated by the same code you have now and the second would be populated by some programming using @XLookupAll() to get all the repair records for that Item and adding them up.

Then if you wanted to you could also program a button that when clicked would print a report of all the repair records for the item.

You'd have the speed of natural and the ability to display everything for that serial number at the click of a button.

-Ray

Quote:
(buffing the asphalt parking lot at 2 AM)


Out of curiosity, Just how often does this happen?
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
charliebrown
Junior Member
Members
**
Offline


Beware...novice at large

Posts: 97
Location: Sacramento, CA
Joined: Apr 19th, 2006
Re: Opinions on relational vs. natural linking
Reply #2 - Oct 23rd, 2007 at 12:04am
Print Post Print Post  
Quote:
Hello Charlie,

What you could do is have two elements. One named something like "Total Repairs at this Location" and another named "Total Repairs at all Locations". The first one would be populated by the same code you have now and the second would be populated by some programming using @XLookupAll() to get all the repair records for that Item and adding them up.

Then if you wanted to you could also program a button that when clicked would print a report of all the repair records for the item.

You'd have the speed of natural and the ability to display everything for that serial number at the click of a button.

-Ray

Quote:
(buffing the asphalt parking lot at 2 AM)


Out of curiosity, Just how often does this happen?



I've only been around there for 25 years...it's my understanding that this practice has diminished since the late 1960s  Roll Eyes  There were also sightings of enormous triangular shaped spacecraft thought to be of extraterrestrial origin during that time period (1967 - 1979 or so).  Those that witnessed the flying objects and reported them now say, "I didn't see any UFOs...and I didn't see the small gray people with the big black eyes that put this little metal thing in the back of my neck either...so quit asking me about it!"

I really like your idea on the programming Ray!  Thanks.  I'll work it up during the week (if I can get some sleep at night...those unexpected trips to the mother ship throw my schedule off...I think it's Tuesday, when it's really Thursday...) Undecided
  
Back to top
 
IP Logged