in a relational database, can we have a table with

2019-02-22 11:15发布

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

4条回答
Lonely孤独者°
2楼-- · 2019-02-22 11:47

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

查看更多
叼着烟拽天下
3楼-- · 2019-02-22 12:01

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楼-- · 2019-02-22 12:06

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.

查看更多
等我变得足够好
5楼-- · 2019-02-22 12:11

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.

enter image description here

查看更多
登录 后发表回答