Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

fix the following querry its using java relational databasing code is below the answer is to be A,D,E heres the text files pc.txt file PC

fix the following querry its using java relational databasing code is below the answer is to be A,D,E

heres the text files

pc.txt file

PC 5 13 model speed ram hd price 1001 2.66 1024 250 2114 1002 2.10 512 250 995 1003 1.42 512 80 478 1004 2.80 1024 250 649 1005 3.20 512 250 630 1006 3.20 1024 320 1049 1007 2.20 1024 200 510 1008 2.20 2048 250 770 1009 2.00 1024 250 650 1010 2.80 2048 300 770 1011 1.86 2048 160 959 1012 2.80 1024 160 649 1013 3.06 512 80 529

product.textfile

Product 3 30 maker model type A 1001 pc A 1002 pc A 1003 pc A 2004 laptop A 2005 laptop A 2006 laptop B 1004 pc B 1005 pc B 1006 pc B 2007 laptop C 1007 pc D 1008 pc D 1009 pc D 1010 pc D 3004 printer D 3005 printer E 1011 pc E 1012 pc E 1013 pc E 2001 laptop E 2002 laptop E 2003 laptop E 3001 printer E 3002 printer E 3003 printer F 2008 laptop F 2009 laptop G 2010 laptop H 3006 printer H 3007 printer

//System.out.println("Find the manufacturers of PC's with at least three different speeds"); the question that is to be //solve

Relation R10= PC.project("model","speed"); Relation R11= R10.naturalJoin(Product); Relation R12=R11.project("speed","maker") ; Relation R13=(R13.name+".speed1"+".maker1");//errors right here Relation R14=(R14.name+".speed2"+".maker2"); Relation R15=R12.naturalJoin("maker".equals ("maker1") && ! "speed" .equals ("speed1")); Relation R16=R15.naturalJoin("maker2".equals ("maker") &&! "speed2" .equals ("speed1") &&! "speed" .equals ("speed2")).showRelation(); Relation R17=R16.project("maker");//to right here idk whats wrong

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

Statistical And Scientific Database Management International Working Conference Ssdbm Rome Italy June 21 23 1988 Proceedings Lncs 339

Authors: Maurizio Rafanelli ,John C. Klensin ,Per Svensson

1st Edition

354050575X, 978-3540505754

More Books

Students also viewed these Databases questions

Question

Carry out an interview and review its success.

Answered: 1 week ago