-1
使用Objectdb開發此關係數據庫。有人可以幫助解決這個問題。我正在做一個關係數據庫來顯示學生成績。新來這個,所以我出了什麼地方..對象數據庫關係數據庫
package Student;
import java.io.Serializable;
import java.sql.Date;
import javax.persistence.*;
@Entity
public class students implements Serializable {
private static final long serialVersionUID = 1L;
@studentid @GeneratedValue
private long id;
}
@embeddable
public class Student {
int studentid;
String firstname;
String surname;
char gender;
Date dob;
String address1;
String address2;
String address3;
char postcode;
int phonenumber;
int courseid;
}
@Entity
public class courses implements Serializable {
@EmbeddedId Course id;
:
}
@Embeddable
public class course {
int courseid;
string coursename;
date coursestartdate;
date courseenddate;
}
@entity
public class moduledetails implements Serializable {
private static final long serialVersionUID = 1L;
@moduleId @GeneratedValue
private long id;
}
@Embeddable
public class module {
int moduleid;
String modulename;
int courseid;
int lectureid;
}
@entity
public class lecturedetails implements Serializable {
private static final long serialVersionUID = 1L;
@lectureId @GeneratedValue
private long id;
}
@Embeddable
public class lecture {
int lectureid;
String lecturename;
String lecturedepartment;
}
@entity
public class resultdetails implements Serializable {
private static final long serialVersionUID = 1L;
@studentId @GeneratedValue
private long id;
@Embeddable
public class result<Varchar> {
int studentid;
int courseid;
int moduleid;
Varchar modulename;
char grade;
}
}
謝謝!
什麼/哪裏是錯誤? – KyelJmD 2013-04-07 01:57:19
如果您不告訴我們您要做什麼以及哪些不起作用,我們無法爲您提供幫助。 – 2013-09-04 16:30:46