Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In JAVA Write a program to take as input rollnumber.code and perform the following DBMS action Internally create your own data structure for a table

  1. In JAVA Write a program to take as input rollnumber.code and perform the following DBMS action
  2. Internally create your own data structure for a table and operate on the same
  1. Create_table(tabname)-should create a table in a separate file
  2. Add_attribute(t,attr_type,attr_name)-should add an attribute to the table data in the file
  3. Insert_into(t,datarow)-should insert data into table data file
  4. T=load_table (tabname)-should load the table from file
  5. Save_table(t)-should save the table after insertion of rows from file
  6. Save_table(t) should save the table after insertion of rows

For example,

Query)

Create table mytab 2

Int a

Float b

Insert into mytab(12,23,4)

Would have generated intermediate code as below code

Create table mytab

Add_attribute mytab int a

Add_attribute mytab float b

Insert into mytab(12,23,4)

The corresponding function call sequence when executing

Execute)

Create table (mytab)

t=load table(mytab)

add_attribute (t, int a)

add_attribute (t, float b)

t=load table(mytab)

save_table(t)

insert into (t,(12,23,4))

save_table(t)

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_2

Step: 3

blur-text-image_3

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

Securing SQL Server Protecting Your Database From Attackers

Authors: Denny Cherry

1st Edition

1597496251, 978-1597496254

More Books

Students also viewed these Databases questions

Question

If you were the reader, how would the message make you feel?

Answered: 1 week ago