Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

in a relational database, can we have a table without any relation with the other tables?

in a relational database, can we have a table without any relation with the other tables?

like image 310
Chni Avatar asked Dec 09 '22 10:12

Chni


2 Answers

Yes. The way relations are expressed are with foreign keys. If a table you generate has no Foreign keys, and no foreign keys in other tables point to this table, it has no relationships.

It can still be given a relationship later though so don't worry about shooting yourself in the foot.

like image 51
Alexander Avatar answered Jan 20 '23 07:01

Alexander


Of course. Even you can create a table without fields.

like image 26
carexcer Avatar answered Jan 20 '23 09:01

carexcer