database - Naming PK and FK -


i have login form student app, since create tbl_user (for login) , tbl_teacher (for biodata) , tbl_student (for biodata). tbl_user have columns (username (pk), password, role, status). tbl_teacher have columns (bio_teacher_id (pk), teacher_id (fk), name, address, etc). tbl_student have columns (bio_student_id (pk), student_number (fk), name, address, etc). explanation : login, teacher use "teacher_id" username, student use "student_number" username. question : can suggest me ebook/ journal/ supporting document explain can use different naming fk pk of parent table ? lot

all database systems know of allow fk have different name pk point to. i'm not aware of statement says because very, few people ever imagined not case.

a simple test try create fk relation columns have different names , see whether words or not. say, don't know of dbms won't - if find 1 i'd interested in knowing!


Popular posts from this blog