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

孤街醉人 提交于 2020-01-11 05:16:09

问题


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


回答1:


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.




回答2:


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




回答3:


Yes you can. Tables do not have to have any relation to each other. Relations can always be added through the use of foreign keys if you want to add them later.




回答4:


I'm creating a company management database and I have a "Company_Expenses" table that I just need for summery reports on the Company's revenues. I can't think of anything this table might need to be connected to so it's just on it's own for now.



来源:https://stackoverflow.com/questions/21066015/in-a-relational-database-can-we-have-a-table-without-any-relation-with-the-othe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!