Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

when a new entry is submitted to my database, the foreign key isn't updating. Unsure of what to change. My create code is CREATE TABLE

when a new entry is submitted to my database, the foreign key isn't updating. Unsure of what to change. My create code is CREATE TABLE `customer_table` ( `customer_ID` int NOT NULL AUTO_INCREMENT, `first_name` varchar(255) DEFAULT NULL, `last_name` varchar(255) DEFAULT NULL, `address` varchar(255) DEFAULT NULL, `city` varchar(255) DEFAULT NULL, `state` varchar(255) DEFAULT NULL, `Zipcode` int DEFAULT NULL, `telephone_number` varchar(13) DEFAULT NULL, PRIMARY KEY (`customer_ID`) ); CREATE TABLE `order_table` ( `order_ID` int NOT NULL AUTO_INCREMENT, `soup_type` varchar(255) DEFAULT NULL, `soup_quantity` int DEFAULT NULL, `delivery` varchar(255) DEFAULT NULL, `customer_ID` int DEFAULT NULL, PRIMARY KEY (`order_ID`), KEY `fk_customer_ID` (`customer_ID`), FOREIGN KEY (customer_ID) REFERENCES customer_table(customer_ID) ON UPDATE CASCADE ON DELETE CASCADE );

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

JDBC Database Programming With J2ee

Authors: Art Taylor

1st Edition

0130453234, 978-0130453235

More Books

Students also viewed these Databases questions

Question

How do you calculate the net present value of a cash flow stream?

Answered: 1 week ago

Question

What is the best conclusion for Xbar Chart? UCL A X B C B A LCL

Answered: 1 week ago

Question

4. What advice would you give to Carol Sullivan-Diaz?

Answered: 1 week ago