AnswerBun.com

Leaving out foreign key when creating a postgresql table

Database Administrators Asked by Gandalf on January 2, 2022

I have been using mysql for the past number of years and i have always wondered? Lets say you have several tables and the tables are so interconnected, in an normal schema, you would have foreign keys all over.

What I do when i have to reference another table is to store the id of the table i am referencing and not indicate that its a foreign key.

Must you indicate in a table schema that a field is a foreign key so that you use JOIN keyword later on in my queries or can i still use joins if I understand which columns are foreign keys, they are just not indicated as such?

Add your own answers!

Related Questions

Postgres not using index in citext column

1  Asked on December 31, 2021 by daniel1791

     

How are database views executed?

1  Asked on December 31, 2021 by user2417731

     

Results are varying with same query

1  Asked on December 31, 2021 by humberto-herrara

     

Privilege to select only user’s own tuple only in mysql

2  Asked on December 28, 2021 by ju-ju

 

Testing a Hive array for IS NULL says not null

1  Asked on December 28, 2021 by philhibbs

     

Unable to grant privileges with admin account

0  Asked on December 28, 2021 by prdufresne

       

Is my connection using SSL or not?

0  Asked on December 28, 2021 by iggt

     

mongodump: fact.bson: input/output error

1  Asked on December 26, 2021 by irfi

     

Ask a Question

Get help from others!

© 2023 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP