1

我可以使用以下变量来实现类:

String classname = "VarClass";
String type1 = "int";
String name1 = "id";
String type2 = "char";
String typesize2 = "(5)"
String name2= "name"

public class classname{
  type1 name1;
  type2 name2;
}

我正在 BDB je & java.util 中使用 Base API 实现某种动态类

每当“create table tbname(attname1 atttype1, attname2 atttype2, ...)”命令出现时,

定义返回正确对象的不同类

这可能吗?

或者任何人都可以帮助我:-SQL 开发人员的伯克利数据库指南(https://www.oracle.com/technetwork/articles/seltzer-berkeleydb-sql-086752.html)说

CREATE TABLE employee
        (primary key empid int(8), last_name varchar(20), first_name varchar(15),
        salary numeric(10, 2) salary, street varchar (20), city varchar (15),
        state char(2), zip int(5))

变成这个键和数据对象

typedef int emp_key;

typedef struct _emp_data {
        char    lname[20];
        char    fname[15];
        float   salary;
        char    street[20];
        char    city[15];
        char    state[2];
        int     zip;
} emp_data;
//This is implemented in C/C++ language

但是,当有多个创建命令,每个命令都定义了具有不同属性和不同属性数量的不同表时,我该怎么办?

有什么办法可以编程吗

4

0 回答 0