Skip to content

Majd hussein w2 database#17

Open
Majoodeh wants to merge 2 commits intoHackYourAssignment:mainfrom
Majoodeh:MAJD_HUSSEIN-w2=-database
Open

Majd hussein w2 database#17
Majoodeh wants to merge 2 commits intoHackYourAssignment:mainfrom
Majoodeh:MAJD_HUSSEIN-w2=-database

Conversation

@Majoodeh
Copy link
Copy Markdown

No description provided.

@bnhoogendijk bnhoogendijk self-assigned this Dec 1, 2025
Copy link
Copy Markdown

@bnhoogendijk bnhoogendijk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing to add! Perfect job! 🚀


const updateAuthorTable = ` ALTER TABLE author(
ADD CONSTRAINT mentor INT,
FOREIGN KEY (mentor) REFERENCES author(author_id));`;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work on the foreign key!

Comment on lines +13 to +18
const authorsPapers = ` CREATE TABLE authors_papers(
author_id INT NOT NULL,
paper_id INT NOT NULL,
PRIMARY KEY (author_id, paper_id),
FOREIGN KEY (author_id) REFERENCES authorsTable(author_id),
FOREIGN KEY (paper_id) REFERENCES research_Papers(paper_id)`;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice implementation of the many to many

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants