relation /struktur question !

admin

Administrator
Staff member
Hi,

i got the following "DB situation"

4 tables

auth
article
kattoart
kategorie

auth is a table of users
each user belongs to a so called customer
(1 to n)

article is a table of artikel
each artikel belongs to a customer (1 to n)

kategorie: each customer owens 1 to n kategories and each artikel of thes customer
belongs to at least 1 of his kategoeries

kattoart is the n/m articels to kategoerie

there are no further informations belonging
to the customer so he/it is only represented
by a customnr.

The question i got is: where do i have to place (in what tables)the customnr to fill in the following requierments:

it must be possible:
- to select all kategoerie of a customer with
having it's NR
- to select all artikels in a spec. kategoerie of a customer with
having the customernr and den kategoriekey
- to find a User with having the customernr and pass + login

At the moment i place the customernr in all
tables but kat2art.
But this seems a bit dirty to me especially in regard of redundancy and consistency.

BTW:DB is mysql
I am really looking forward to
hear your qualified opinion :)

bye,
Niko
 
Back
Top