Gossamer Forum
Home : Products : DBMan : Customization :

Relational Database

Quote Reply
Relational Database
Hi, this is my first post so please excuse me if this is a repeat. Both databases contain a link field (ID#)

Dbase 1 contains unique records, whereas dbase 2 contains many records (names & phone #s basically).

I would simply like to be able to do the following:
(a) allow the user to press a button next to a dbase 1 record, and they can add/change/delete names from dbase 2
(or can I get the names to show-up under dbase 1 record?)

(b) allow the user to press another button to simply view the names from dbase 2 relating to dbase 1 ID#.

(c) Most users allowed to simply view names, owner of the record in dbase 1 will be allowed to edit names in dbase 2.

Thanks for any assistance. I really love this software and am learning every day, everyone in here seems to be very talented and I applaud you.

Quote Reply
Re: Relational Database In reply to
Flattery is good Smile.

Do you have a userid field on both files? You'll need this for related data. If you are using a counter as the key then you can't relate on that is it is not unique (you could have the same counter id on both files but not for related data).

Have you looked at the relational demo?

You can display related records (many side) below the main record (one side) and dependent on permissions view, change etc.

Have you downloaded the mod and notes yet? It will certainly do what you require.

Hth,
Rob

Quote Reply
Re: Relational Database In reply to
Hi!

> Do you have a userid field on both files? You'll need
> this for related data.
Yes.

> If you are using a counter as the key then you can't
> relate on that is it is not unique (you could have the
> same counter id on both files but not for related data).
No, I have unique values. I am not using the counter feature. The number is unique to a site.

>Have you looked at the relational demo?
Yes, but very confusing :)

>You can display related records (many side) below the
>main record (one side) and dependent on permissions view,
>change etc.
>Have you downloaded the mod and notes yet? It will
>certainly do what you require.

Perhaps I will look at this agin.

Quote Reply
Re: Relational Database In reply to
>No, I have unique values. I am not using the counter >feature. The number is unique to a site.

Ok - start to look at using the userid as the main related record key. A user logs on and only see's the data that is related to that userid. The mod will seem clearer if you get that concept going on your system. E.g. you have a one side record say "customer" - the userid is the key field for that. You have another record with a unique id that possibly increments each time you add a record, say "orders". The orders file also has a userid field. It is the link between the userid field on the customer and the userid on orders that allows DbMan to display related data. You can of course have many orders, that's why it's called a one-to-many relationship. Sorry if you know all this Smile.

Give it a try, happy to help where I can, been through the pain myself!!

Quote Reply
Re: Relational Database In reply to
I do know all that, but at least now I know we're on the same page :) Do you know if there is a sample or a site that is currently using this feature so I can see kind of how I can configure it? And does the mod show how to pull the records from each database? (I mean say [per your example] customer info at the top of the page, and a list of all the orders the customer has placed at the bottom of the page?) Thanks again.

Quote Reply
Re: Relational Database In reply to
JPDeni has a demo of the relational database that you can play with and check the functions.

You can also download a .zip file of the demo to use as a guide.

http://www.jpdeni.com/...ation/db.cgi?db=user

On the login page there is a link where you can pick up the files she used for the database.



Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: Relational Database In reply to
Jon,
All of the relational sites will do what you require. See JPD's demo as suggested above.
Rovb

Quote Reply
Re: Relational Database In reply to
Hi! I went to the webpage, and I tried to download the demo. The file is unavailable. Upon looking around the site, I received a page that read "I have just done one of the stupidest things in my life. I inadvertantly deleted every mod that I have made for DBMan. I don't know how I can get them back. If anyone has any of the files for the mods, please send them to me via the Email link below. "

Does anyone have this demo I can check out?

Thanks