I have four tables namely tblStudent, tblParent, tblEmployee and tblVisitor. tblUnwantedVisitor. Student, parent and employee is only a tblVisitor category and I decided to make their own table because the info differs from one another.

tblUnwantedVisitor should get the primary key from the three tables, which is the visitor ID, tblStudent visitor ID starts from 10000, tblEmployee from 20000 and tblEmployee from 30000.

I used foreign key from one to one table only, so I don't know if my approach for the database are wrong or foreign key for multiple tables, which is somehow unlikely, is necessary.

I mean tblStudent, tblParent, tblEmployee and tblUnwantedVisitor

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.