Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a way to signify links that also change over time and will not be the same? #121

Open
G2G2G2G opened this issue Sep 25, 2022 · 0 comments
Open

Comments

@G2G2G2G
Copy link

G2G2G2G commented Sep 25, 2022

Not sure if there's a term for this at all, it's pretty common situation where certain items are copied from other columns of a database and can never be used for an "INNER JOIN" type of query because they are subject to change, unlike keys and such.

I'll do an example here, I think the simplest is a payment system where you copy the hours but they change over time

user table
id primary key integer
name text
hourly numeric
table clockhours 
id serial primary key, 
userid integer, 
hourly numeric

do the userid here is also the user.id.. which is a normal link. The user table's ID user.id never changes.. and the userid of the clockhours always links to that user.
These are things you use in INNER JOINS or any type of join regularly because they always match up..

Now HOURLY is a different case, because that changes when people get raises in their pay right?
So I'd still like to link the tables together in both of those:

In your AML language it's

fk user.id -> clockhours.userid 
fk user.hourly -> clockhours.hourly

However I'd like a different type of line to signify that it is a value copied into it during the initial table INSERT but they "aren't the same" and the main one it's copied from is subject to change

I was thinking something like

fk user.id -> clockhours.userid 
fk user.hourly -x> clockhours.hourly

or something
and on the page itself it'd maybe have a broken line or some type of icon on it? not sure

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant