Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please answer the above two questions. Thanks 1. Relation R has schema: CREATE TABLE RC a INT PRIMARY KEY, bINT DEFAULT 0, C INT NOT

image text in transcribedplease answer the above two questions. Thanks

1. Relation R has schema: CREATE TABLE RC a INT PRIMARY KEY, bINT DEFAULT 0, C INT NOT NULL Ris currently empty. Develop a test that determines whether an insertion into R is currently legal. Then apply your test to determine which of the following INSERT statements is allowable. a) INSERT INTOR VALUES(7.8.NOT NULL); b) INSERT INTO R(a,b) VALUES(1.2); O c) INSERT INTO R(6.a) VALUES(5,6); d) INSERT INTO R(c.a) VALUES(6.7); 2. Here are declarations of two relations R and S: CREATE TABLE SC C INT PRIMARY KEY, d INT ); CREATE TABLE RC a INT PRIMARY KEY, b INT REFERENCES S(c) Rab) currently contains the four tuples (0.4), (1,5), (2.4), and (3.5). S(cd) currently contains the four tuples (2,10), (3,11). (4,12), and (5.13). As a result, certain insertions and deletions on R and S are illegal. You should develop simple tests for illegal operations of these four kinds. Then, show your understanding by indicating which of the following modifications will not violate any constraint. a) Inserting (5,6) into R Ob) Deleting (4,12) from S. c) Inserting (1.2) into R d) Inserting (6.4) into R

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

Pro Database Migration To Azure Data Modernization For The Enterprise

Authors: Kevin Kline, Denis McDowell, Dustin Dorsey, Matt Gordon

1st Edition

1484282299, 978-1484282298

More Books

Students also viewed these Databases questions