Closed echen4628 closed 7 months ago
You're correct that PRIMARY KEY implies UNIQUE. What I was trying to say is that this means that all PRIMARY KEY constraints must also be removed. So for example, the first lines of the tweets
table should be changed from
CREATE TABLE tweets (
id_tweets BIGINT PRIMARY KEY,
id_users BIGINT,
to
CREATE TABLE tweets (
id_tweets BIGINT,
id_users BIGINT,
In the
normalized_batch_parallel
part of the assignment, we need to remove unique constraints from the other columns of the table. The instructions read:Looking at
services/pg_normalized_batch/schema.sql
, I don't see any other unique columns besidesurl
from theurls
table which I removed. To me, this means that the only unique constraints left are in the primary keys (likeid_users
orid_tweets
). I was under the impression that primary keys must be unique. Can someone give a hint on how to remove the unique constraints in the other columns?Perhaps, when
id_users
is mentioned in thetweets
table, I remove it from being a foreign key and also change its type toTEXT
. Any idea is helpful! Thanks.