Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CREATE TABLE ` article ` ( ` id ` varchar ( 1 0 ) NOT NULL, ` volname ` varchar ( 1 0 0 )

CREATE TABLE `article`(
`id` varchar(10) NOT NULL,
`volname` varchar(100) DEFAULT NULL,
`volid` varchar(20) DEFAULT NULL,
`title` varchar(500) NOT NULL,
`bodyText` text NOT NULL,
`correspAut` varchar(200) DEFAULT NULL,
`submissionDate` date DEFAULT NULL,
`result` varchar(10) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `volname`(`volname`,`volid`),
KEY `correspAut`(`correspAut`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `articlekeywords`(
`email` varchar(200) NOT NULL,
`aid` varchar(10) NOT NULL,
PRIMARY KEY (`email`,`aid`),
KEY `aid`(`aid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `person`(
`email` varchar(200) NOT NULL,
`name` varchar(200) DEFAULT NULL,
`vname` varchar(100) NOT NULL,
`vid` varchar(20) NOT NULL,
`isAuthor` tinyint(1) DEFAULT NULL,
`isEditor` tinyint(1) DEFAULT NULL,
`isReviewer` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`email`,`vname`,`vid`),
KEY `vname`(`vname`,`vid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
ALTER TABLE `articlekeywords`
ADD CONSTRAINT `articlekeywords_ibfk_1` FOREIGN KEY (`keywid`) REFERENCES `keywords`(`keywid`),
ADD CONSTRAINT `articlekeywords_ibfk_2` FOREIGN KEY (`aid`) REFERENCES `article`(`id`);
i got error message for alter table on mysql workbench , how can i fix that

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions

Question

a. Did you express your anger verbally? Physically?

Answered: 1 week ago