Saturday, 15 January 2011

mysql - Writing the functional dependency -



mysql - Writing the functional dependency -

first module user module. administrators, students, lecturers or guests users benefit scheme , take part in module. administrator assign role pupil or lecturer each user. each role has different privileges lecturer can upload assignment , course of study materials, create online quiz , single upload file. users have info such user id, date of registration, date of latest logon, login account, password, first name, lastly name, , others details needed. pupil id , lecturer id cannot primary key. therefore, how suppose state assignment or quiz id functionally dependent on lecturer when assignment id , quiz id primary key? based on functional dependency, i'm not sure how suppose relate them functional dependency?

entity: user user(user id, pupil id, lecturer id, invitee id, course of study id, assignment id, quiz id, file upload, date of registration, date of latest logon, login account, password, first name, lastly name, e-mail, birthdate) functional dependency user id -> {student id, lecturer id, invitee id, date of registration, date of latest logon, login account, password, first name, lastly name, e-mail, birthdate} lecturer id -> {course id, assignment id, quiz id, file upload} total dependency user id, lecturer id -> {student id, invitee id, course of study id, assignment id, quiz id, file upload, date of registration, date of latest logon, login account, password, first name, lastly name, e-mail, birthdate}

first, functional dependency in form a->b means that, given 1 value a, can determine 1 , 1 value b. both , b represent sets of columns. (that's why they're written in uppercase letters.)

keys have nil how state functional dependency.

if "lecturer id" functionally determines "assignment id" fd "lecturer id"->"assignment id". if "lecturer id" functionally determines "quiz id", fd "lecturer id"->"quiz id".

if want write more compactly, can state 2 fds this.

"lecturer id"->{"assignment id", "quiz id"}

if assign letters l, a, , q, can state 2 fds this.

l->aq

braces omitted in notation, because knows they're supposed there.

i'm not sure you're trying @ lastly section. in it, section labelled "functional dependency" doesn't express dependencies; "full dependency" doesn't express total dependencies, might express partial dependencies; "partial dependencies" doesn't express partial dependencies; "transitive dependencies" doesn't express transitive dependencies.

mysql database functional-dependencies

No comments:

Post a Comment