I'm not sure if the title of the thread is relevant but I think it explains my problem... This is going to be loooooong...
Basically, I am working on altering/improving an existing database but have been asked to change something which I think requires a whole restructuring of the database (to be honest, the relationships and tables seem a bit weird/needless to me). I've never tried altering the structure of a database before so have a whole host of questions I need help with!
Anyway, the database relationships are structured as follows:
1. There is a table called Person which contains each clients information (contact details, referral info, case status and so on).
This table is massive and has a lot of fields and a lot of tables linked to it (more on that in a second).
2. There is a second table called Appointments which holds information on first appointments and subsequent appointments (date, outcome and comments for both).
This table seems like it should be split into two tables as the fields are repeated in the table and it looks a bit odd.
3. There is a third table called Interventions with various information which I think looks okay.
4. Finally, there are lots of different tables which seem to have been created to fill combo box selections in forms - for example there is a table called Gender (which is just a numbered list of gender types), one called Title (which contains different titles such as Mr, Mrs etc), one called Yes/No(!!!) and so on.
The majority of these are all linked to the Person table (which has TitleID, GenderID etc) so when the linked combo boxes are chosen on forms, they update the Person table. It seems like a bit of a long-winded way and I was wondering if there was a simpler solution. Couldn't I use Field/Value Lists instead or something?
That's the first question. My next question is slightly more complicated and will need some explaining:
If a client disengages from the service and then, under a year later, re-engages with the service, this will not count as a new entry (so they'll keep their client ID number) into the system but if they disengage from the service and then, over a year later, re-engages with the service, it will count as a new entry (new client ID number) being added to the system (it's a bit silly but it's the way it works, apparently).
Anyway, the database is currently incapable of doing this at the moment and clients re-engaging with the service under a year are being added as re-entries (which is obviously not what is wanted). I'm pretty sure this is because there are only one set of fields for each client (I was thinking something to do with the Person table containing most of the information and splitting it up would make things easier to edit/modify but am probably wrong!)
I've been trying to come up with ways to solve this without disturbing what is already there (partly through inexperience) but thought it best to ask advice of some experts rather than going at it and breaking something.
I'm aware this is probably not enough information but this post is already too long so if you require me to post any of the information I've discussed then let me know and I'll try and provide it!
(To be fair, I think it might be easier to just post the database for people to look at but I don't know how to remove the data it contains and how to replace it with dummy data or whatever... pointers?!)
Thanks in advance guys and apologies if this isn't clear enough!
Basically, I am working on altering/improving an existing database but have been asked to change something which I think requires a whole restructuring of the database (to be honest, the relationships and tables seem a bit weird/needless to me). I've never tried altering the structure of a database before so have a whole host of questions I need help with!
Anyway, the database relationships are structured as follows:
1. There is a table called Person which contains each clients information (contact details, referral info, case status and so on).
This table is massive and has a lot of fields and a lot of tables linked to it (more on that in a second).
2. There is a second table called Appointments which holds information on first appointments and subsequent appointments (date, outcome and comments for both).
This table seems like it should be split into two tables as the fields are repeated in the table and it looks a bit odd.
3. There is a third table called Interventions with various information which I think looks okay.
4. Finally, there are lots of different tables which seem to have been created to fill combo box selections in forms - for example there is a table called Gender (which is just a numbered list of gender types), one called Title (which contains different titles such as Mr, Mrs etc), one called Yes/No(!!!) and so on.
The majority of these are all linked to the Person table (which has TitleID, GenderID etc) so when the linked combo boxes are chosen on forms, they update the Person table. It seems like a bit of a long-winded way and I was wondering if there was a simpler solution. Couldn't I use Field/Value Lists instead or something?
That's the first question. My next question is slightly more complicated and will need some explaining:
If a client disengages from the service and then, under a year later, re-engages with the service, this will not count as a new entry (so they'll keep their client ID number) into the system but if they disengage from the service and then, over a year later, re-engages with the service, it will count as a new entry (new client ID number) being added to the system (it's a bit silly but it's the way it works, apparently).
Anyway, the database is currently incapable of doing this at the moment and clients re-engaging with the service under a year are being added as re-entries (which is obviously not what is wanted). I'm pretty sure this is because there are only one set of fields for each client (I was thinking something to do with the Person table containing most of the information and splitting it up would make things easier to edit/modify but am probably wrong!)
I've been trying to come up with ways to solve this without disturbing what is already there (partly through inexperience) but thought it best to ask advice of some experts rather than going at it and breaking something.
I'm aware this is probably not enough information but this post is already too long so if you require me to post any of the information I've discussed then let me know and I'll try and provide it!
(To be fair, I think it might be easier to just post the database for people to look at but I don't know how to remove the data it contains and how to replace it with dummy data or whatever... pointers?!)
Thanks in advance guys and apologies if this isn't clear enough!
Comment