Hi,
I am really confused with the structure that I like to create. I like to create phonebook for teachers and students.
For students I structured like this
DROP TABLE IF EXISTS `jaidev2_mce`.`st_phone_book`;
CREATE TABLE `jaidev2_mce`.`st_phone_book` (
`stphonebook_id` int(10) unsigned NOT NULL auto_increment,
`reg_id` int(10) unsigned NOT NULL,
`teltype` varchar(45) NOT NULL,
`telno` varchar(45) NOT NULL,
PRIMARY KEY (`stphonebook_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
This is gud if I have only students as reg_id is student's id.
But what If I like to add teachers phonebook in this structure too.
Should I create new phonebook table for teachers as I have too add teacherid in existing table which I think will violate the rules of db.
Thanks in advance.
Jay Khatri