New to Memento but famlure with dBase structure

69 views
Skip to first unread message

Dave

unread,
Apr 23, 2026, 9:04:46 PM (5 days ago) Apr 23
to mementodatabase
So here goes, how do you go about linking tables. What I am needing to do is have a Customer table with all the basics, then have a separate table for work performed, which can happen multiple times. With my experience with say Access I can have sub tables and relationships between them. Is it possible with this program or do I need to look at another route.

I have need for both computer and tablet connectivity..

Thanks

David Gilmore

unread,
Apr 24, 2026, 10:56:10 AM (4 days ago) Apr 24
to mementodatabase
You link tables (libraries) using the "link" field type.

Just a simple example, utilizing a field (column) called "MyLink", declared as a link field:

var e = entry(); // Obtain my local entry
var r = libByName("RemoteLibraryName").find("Selection criteria");   // Note that find returns an array of found remote entries, even if the array is empty
if (r.length > -0) e.link("MyLink", r[0]);

Check out the Memento documentation on link type fields for details and more examples.

Bill Crews

unread,
Apr 24, 2026, 4:27:32 PM (4 days ago) Apr 24
to David Gilmore, mementodatabase
A couple of notes on David's response...

All good, but minor point, there are at least 2 Link field types. David is referring to Link to Entry, which is the structurally significant one. There is also a Link to File and maybe another one. These are sometimes useful but are not pivotable in the design of a Memento Database. 

Second, in Access and other relational DBMSes, you have primary keys and foreign keys. In Memento, you have forward links and back links. Long ago, Memento's showing of entries in the parent library that were linked to forwardly was substandard, so I got in the habit of using back links, which was often links from a child library to the parent library. Nowadays, I'm not sure there is any penalty in using forward links now, which is what I think most people do, though habits die hard, and I still use back links predominantly. Just try it how you think to do it and then consider whether using links back the other way might work better somehow.

Finally, I suggest thinking about what library you want to have open most of the time. I think of it as "living there". If you think of library data as being reference data (often parents are) or operational data, you probably want to live in an operational library, but it might be one that has children. For instance, in an inventory order entry scenario, I respect customers, products, and suppliers highly, but I tend to want to operate out of a note dynamic Orders library, which may be the parent of an Order Line Items library. I often choose to live in the Orders library, see line items via forward links but use back links to get to the reference libraries.

Your situation is much simpler. Just think about whether the customer data is relatively static and is reference data, and if so, you'll probably want to live in the library where the work is performed, which is likely more dynamic and operational. So, there's no absolute rule, but you might want to live in Work and back link to Customers. If so, link one-to-many from Work to Customers.

Good luck, I hope this helps.

-Bill


--
You received this message because you are subscribed to the Google Groups "mementodatabase" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mementodataba...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/mementodatabase/ba66e8ac-6c17-4cae-9cff-c80dde88e40fn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages