I am very new to postgresql. I don't plan to study it fully in-depth right now as I have other priority topics to finish. But now I need to know some basics of postgresql for the perfect completion of a personal project.
I need to save a file location in a column in a table in postgresql.
- What should be the type that I should keep for the table while I am creating the table?
- How to retrieve the file name?
- I have to store a number that's 10 digits long? Is it gonna be okay if I give the type as int.
CREATE TABLE "Test" (
"test_id" uuid,
"user_id" int,
"test_name" text,
"saved_location" Type,
PRIMARY KEY ("test_id")
);
I want to give user_id as FK, but no idea how to do it. I would have studied SQL in detail and did this, but I am on a tight schedule on another course. Please help me. I am using python. Thanks in advance.