Re: design question

From: Tobin Harris <comedyharris_at_hotmail.com>
Date: Mon, 20 Jan 2003 15:15:32 -0000
Message-ID: <b0h3qk$nmsc4$1_at_ID-135366.news.dfncis.de>


You could create a table to contain those properties common to both student and lecturer, which would include username and password. This is called supertyping/subtyping - where Student and Lecturer tables would subtype the Person table. Personally, I haven't got used to working with super/subtype tables, and in practice I would create a union view for this instead (anyone feel free to correct me if you feel this is a bad idea).

So, I might have two tables - Lecturers and Students. In your case I would then probably create a Logins view, which might look something like...

create view Logins as

    select username, login
    from Students
    union
    select username, login
    from Lecturers

HTH Tobin

"Ian Kelly" <kellizer(nospam)_at_hotmail.com> wrote in message news:1pxW9.618$lP6.66_at_newsfep3-gui.server.ntli.net...
> Hi
> I have a design question and wondering how the best way to model it
> relationally.
>
> You have a system which check's to see if a user can access it from 2
> tables, say student and lecturer.
>
> Is there a way to combine the access (Log-in) information in one table
> without replicating data that is stored in the student/lecturer tables?
>
> Is there a name to this problem?
>
> Regards Ian
>
>
Received on Mon Jan 20 2003 - 16:15:32 CET

Original text of this message