Answered step by step
Verified Expert Solution
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
- 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 and operate on the same
- Create_table(tabname)-should create a table in a separate file
- Add_attribute(t,attr_type,attr_name)-should add an attribute to the table data in the file
- Insert_into(t,datarow)-should insert data into table data file
- T=load_table (tabname)-should load the table from file
- Save_table(t)-should save the table after insertion of rows from file
- 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started