ORACLE SQL Hello I need help with the following questions: Write a command to ch
ID: 3716837 • Letter: O
Question
ORACLE SQL
Hello I need help with the following questions:
Write a command to change the structure of a table by adding a check, default, or unique constraint. Based on this schema:
Figure 1 Four Tables of the Club Blog Schema club member tag_member_w_interest (PK member_username username password interest id proifleinfo interest 1PK member username first name last_name interest id interest tag mi street city state zipcode dob Figure 2 Three More Tables of the Club Blog Schema blog post PK post id post title post_content create _datetime status member_username post comment post prop 1PK comment id comment content create_datetime member username post id prop id prop type create_ datetime member username postidExplanation / Answer
In the tag_member_w_interest table
member_username is the primary key for the table.
In the blog_post , post_comment and post_prop
member_username is used in the table.So this can be referenced as the foreign key.
ALTER TABLE blog_post
ADD FOREIGN KEY (member_username) REFERENCES tag_member_w_interest(member_username);
ALTER TABLE post_comment
ADD FOREIGN KEY (member_username) REFERENCES tag_member_w_interest(member_username);
ALTER TABLE post_prop
ADD FOREIGN KEY (member_username) REFERENCES tag_member_w_interest(member_username);
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.