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

- 11,426
- 6
- 39
- 70

- 89
- 1
- 1
- 4
-
1How would you create the first table if every table had to be related to another table? – Barmar Jan 11 '14 at 18:17
-
1Your database would still be relational but would not be normalized. Whether that is good or bad depends. – Dan Bracuk Jan 11 '14 at 19:11
-
You don't mean "relation", you mean "relationship". And you are (mis)using that word just like some design methods & products.to mean *foreign key*. As do mispresentations of Entity-Relationship Modeling, where "Relationship" means *application relationship*. Eg *X* loves *Y*. Tables are relations. Relations (base table values and query results) represent application relationships. Any two tables can be JOINed, and the meaning of the result is the AND of the meanings of the arguments. Similarly for all other relational algebra operators. – philipxy Oct 27 '15 at 09:34
-
What do you mean by "relation"? – philipxy Oct 14 '21 at 17:15
5 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.

- 612
- 1
- 9
- 20
-
But in the Relational Model "relation" means both a relationship/association & a table representing one & in the Entity-Relationship Model "relationship" similarly means association. They don't use "relation"/"relationship" for FK. And even in pseudo-ER methods that call themselves ER that use "relationship" for FK they don't use "relation" for that. – philipxy Oct 14 '21 at 17:15
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.

- 5,957
- 6
- 28
- 47
Your question belies a larger problem with your understanding of databases.
A relation is a set of tuples (a relation can be thought of as a table). A tuple can be thought of as a row.
Relationship in English means connectedness and has nothing to do with relation from relational databases.
Both relation and relationship share word roots, but in database theory, these words/concepts do not have anything to do with each other.
The root of the word relation in database theory comes from math (see function vs relation).

- 7,762
- 6
- 40
- 70
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.

- 399
- 1
- 5
- 25