Managing tables with same primary keys (Access 2010) -


i'm new access , trying convert poorly managed database better working version.

the biggest issue database contains several 'main' tables have same primary key. know that's not ideal in case, i'm not sure avoidable needs way privacy concerns + there's lot of different fields i'm not sure if we'd approach cap.

basically, database house records surgeries later research purposes. there 2 major primary keys. several tables (for instance, operativedata + complications) use 'surgery id' primary key. other tables (for instance, patientdemographic + medicalhistory) use 'patient id' primary key. there 9 such "main" tables in database.

i have 2 'major' issues i'm trying solve:

1) making sure things match across tables. if create query wanting integrate patients' medical history , complications.. need line up. need able update queries/forms don't want have access underlying tables.

2) want create easy way add record tables @ once. ideally, form can put in patient #, surgery # , other basic information. create entry on every table if none of other info populated yet. (one person inputs new patients database regularly may years before other info put in may not part of research project).

how can go solving these 2 issues?

my current attempt @ solution has "master table" setup. table has primary key of "surgery #" , foreign key of "patient #" (because surgery # unique given patient may have multiple surgeries). using table link, made relationship between of other tables. (each table same primary key linked eachother one-to-one , every table linked master table).

this helps things line when i'm doing queries i'm running lot of issues when trying update query (recordset not updateable, because it's one-to-many relationships?).. doesn't solve data entry problem. read using subform sounds need subform each of main tables?

hopefully i've laid out issues please let me know if have questions. can't upload database can try constructed database sample data if helps.

thank in advance or tips can provide!


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -