(Unified Modeling Language, UML) - , , . UML , ( -), (, , ).
(Grady Booch), (James Rumbaugh) (Ivar Jacobson).
ij UML - ' () (). ij - , , :
- ij (class dagram) - , , ' , . ֳ .
- ij ' (object dagram) - ' . , .
- ij (use case dagram) - , . ֳ .
- ij 䳿 - ' , ' . , : (sequence dagram), Ⳮ, (collaboration dagram), ', . ֳ . ij 䳿 .
- ij (statechart dagram) - , , , 䳿 . ֳ .
- ij (actvty dagram) - ( ).
- ij (component dagram) - . ֳ .
- ij (deployment dagram) - . ֳ . ' , .
"-'"
"-'" (Entity-Relationship, ER-) . , ' . ' .
|
|
() , , , , , ' .
', , .
ᒺ
ᒺ :
- ,
- ,
- .
ᒺ StudentGroup. StudentGroup 6 , :
- StudentGroupId ,
- GroupName , ,
- Faculty , ,
- GroupType , ,
- Course , ,
- CountStyd , .
...
ER-
ER- . ' . ER- 㳺 .
ᒺ , . , .
7.1 ER- ᒺ , .
7.1 ER- " "
. , .
UML- . Rational Rose, Visual UML, BPwin, Silverrun, Process Analyst, Together, System Architect, Objecteering . UML- System Architect.
UML .
:
- . .
- :
1. .
2. , .
3. .
4. . .
5. .
|
|
7.2 ij
, . ij " ", , .
3 , :
ᒺ . Group, Teacher Student. , ᒺ . ij ᒺ 7.3.
DAO (Data Access Object ᒺ ). ֳ 䳿 . :
- insertGroup, insertStudent, insertTeacher ᒺ .
- updateGroup, updateStudent, updateTeacher ᒺ .
- deleteGroup, deleteStudent, deleteTeacher ᒺ .
- findById ᒺ .
- findAll ᒺ .
ij 7.4.
䳿 , 7.5.
7.3 UML- ᒺ
7.4 UML-
7.5 UML- GUI
SQL (Structured query language ) 䳿 , , , , . SQL , . , C++, Java Pascal, SQL , , . SQL, , , .
MySQL. SQL- :
DROP DATABASE IF EXISTS students;
CREATE DATABASE students DEFAULT CHARACTER SET 'utf8'; //
USE students; //
create table StudentGroup //
(
StudentGroupId integer AUTO_INCREMENT not null,
GroupName nvarchar(50) not null,
Faculty nvarchar(50) not null, //
GroupType integer not null,
Course integer not null,
CountStyd integer not null,
primary key (StudentGroupId)
);
alter table Teacher
add constraint FK_TEACHER_GROUP
foreign key (TeacherGroupId)
references StudentGroup(StudentGroupId);
ᒺ
ᒺ Group.java, CourseProject\src\net\ukr \ifkep\course_project\domain\. Java- .
䳿
. SQL. , . DAO .
³ :
|
|
1. net.ukr.ifkep.course_project.dao.GroupDao StudentGroup.
StudentGroup SQL , 7.1.
7.1 SQL StudentGroup | |
SQL | |
insert into StudentGroup(GroupName, Faculty, GroupType, Course, CountStyd) values (?,?,?,?,?); | |
update StudentGroup set GroupName =?, Faculty =?, GroupType =?, Course =?, CountStyd =? where StudentGroupId =?; | |
delete from StudentGroup where StudentGroupId =?; | |
select StudentGroupId, GroupName, Faculty, GroupType, Course, CountStyd from StudentGroup where StudentGroupId =?; | |
select StudentGroupId, GroupName, Faculty, GroupType, Course, CountStyd from StudentGroup; |
, SQL . .
DataAccessUtil. :
- createConnection() .
- DRIVER_CLASS .
- CONNECTION_URL .
- CONNECTION_USERNAME .
- CONNECTION_PASSWOORD .
, 䳿 .
(GUI, Graphical user interface) ' , , , . , , .
, :
1. , , . . (ᒺ JMenuBar), , (ᒺ Button) (ᒺ JTable, TableModel).
MainForm.java CourseProject\src\net\ukr\ifkep\course_project\gui\. .