Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

PLEASE ASAP Can someone Create four rows of sample data for each of the relation

ID: 3742296 • Letter: P

Question

PLEASE ASAP

Can someone Create four rows of sample data for each of the relations below

Based on one of the relations of the relational model and its sample data, can you specify an example of each of the following, and explain why you selected it:

A delete operation that would run successfully

An update operation that would run successfully

An update operation that would not run successfully

An insert operation that would not run successfully

Users(Name, firstName, lastName, nickName, yearofBirth, City, suburb,name, Profile, job, family, tvProgram, MentorName, PostContent);

Posts(Content, Comments, Date);

illnesses(doctorName, degree, condition, duration);

Video(Title, duration, description, fileType);

HealthPractioners(doctorName, address, phoneNumber);

UsersHasIllnesses(UserName, doctorName, VideoTitle);

Note:

Underline indicates Primary key

Italics indicates Foreign key

Explanation / Answer

Dear Student,

1. Insertion of Data into USERS table

INSERT INTO USERS VALUES ('ADAM SMITH','ADAM','SMITH','TOM','1993','CALIFORNIA','Alberton East','Student','IT','SMITHS','AXN','RAM',1);
INSERT INTO USERS VALUES ('GOLD SAM','GOLD','SAM','TICK','1992','ATLANTA','SOUTH East','Student','MBA','SMITHS','MAYPAYNE','RAHIM',2);
INSERT INTO USERS VALUES ('SWAPNIL BAISHYA','SWAPNIL','BAISHAYA','BABU','1985','WALES','KONDAPUR','PROFESSIONAL','MBBS','GARGS','PRACTO','RAM',3);
INSERT INTO USERS VALUES ('PRASANA CHINTALA','PRASANNA','CHINTALA','PUPU','1979','INDIANA','MADHAPUR','TEACHER','EDUCATION','BARUAHS','VUVA','RAJ',4);

2. Insertion of Data into POSTS table

INSERT INTO POSTS(1,'I like tennis','9-04-1998');
INSERT INTO POSTS(2,'I like FOOTBALL','10-07-1994');
INSERT INTO POSTS(3,'I like icecream','11-06-1995');
INSERT INTO POSTS(4,'I like basketball','14-04-1999');

3. Insertion of Data into ILLNESSES table

INSERT INTO ILLNESSES('HARRY','MBBS','MILD','12');
INSERT INTO ILLNESSES('ANUBHAV','BTECH','CRITICAL','2');
INSERT INTO ILLNESSES('MARY','MTECH','EMERGENCY','23');
INSERT INTO ILLNESSES('MAYRA','PHI','MILD','1');

4. Insertion of Data into VIDEO table

INSERT INTO VIDEO('HARRY POTTER','3','FICTION','mp4');
INSERT INTO VIDEO('SCARRY AVENUES','2','Sci Fi','mp4');
INSERT INTO VIDEO('Art World POTTER','1','FICTION','mp4');
INSERT INTO VIDEO('Titanic','3','Romance','mp4');

5. Insertion of Data into HEALTHPRACTITIONERS table

INSERT INTO HEALTHPRACTITIONERS('HARRY','SOUTH CALIFORNIA','8989872379');
INSERT INTO HEALTHPRACTITIONERS('ANUBHAV','BANGKOK','9876456712');
INSERT INTO HEALTHPRACTITIONERS('MYRA','THIMPU','1987479127');
INSERT INTO HEALTHPRACTITIONERS('KIA','SOUTH WALES','97828387134');

6. Insertion of Data into USERSHASILLNESSES table

INSERT INTO USERSHASILLNESSES('RPG321','HARRY','YOULINK');
INSERT INTO USERSHASILLNESSES('MAYRA90','HARRY','TOGA');
INSERT INTO USERSHASILLNESSES('pkl989','AMAN','MEDITATION');
INSERT INTO USERSHASILLNESSES('tulla12','HARRY','YOUGURU');

Solution 1 : A delete operation that would run successfully

DELETE FROM USERS WHERE firstName='PRASANNA';

Solution 2:

An update operation that would run successfully
UPDATE VIDEO SET FILETYPE='MP3' WHERE TITLE = 'HARRY POTTER';

Solution 3: An update operation that would not run successfully

UPDATE UsersHasIllnesses SET DOCTORNAME='PRATIM' WHERE USERNAME='NONE1'; // DATA DO NOT EXIST SO THIS COMMAND WILL FAIL

Solution 4: An insert operation that would not run successfully

INSERT INTO ILLNESS(123,'ABC,'DEF',123); // BECAUSE OF DATATYPE MISMATCH this COMMAND WILL FAIL

Please give a thumbs up if you like this answer.

Happy Learning :)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote