화일시스템과 데이터베이스시스템의 차이점
본 자료는 6페이지 의 미리보기를 제공합니다. 이미지를 클릭하여 주세요.
닫기
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
해당 자료는 6페이지 까지만 미리보기를 제공합니다.
6페이지 이후부터 다운로드 후 확인할 수 있습니다.

소개글

화일시스템과 데이터베이스시스템의 차이점에 대한 보고서 자료입니다.

목차

1.화일시스템
1.1 화일
1.2 화일시스템
1.3 화일시스템의 문제점

2.데이터베이스시스템
2.1 데이터베이스 정의
2.2 데이터베이스 특징
2.3 데이터베이스 스키마
2.4 데이터베이스 관리시스템

3.화일시스템과 데이터베이스시스템의 응용프로그램

본문내용

th < 0) or (iMath > 100) then
begin
ShowMessage(\'각 점수는 0~100 사이로 입력해 주세요.\');
exit;
end;
if AppendDBRecord(strName,strSex,iKor,iEng,iMath) = false then
ShowMessage(\'데이터를 추가할 수 없습니다.\');
NameEdit.Clear;
SexComboBox.ItemIndex := 0;
KorEdit.Clear;
EngEdit.Clear;
MathEdit.Clear;
NameEdit.SetFocus;
end;
procedure TForm1.TableAfterPost(DataSet: TDataSet);
begin
DbiSaveChanges(Table.Handle);
end;
procedure TForm1.OutputButtonClick(Sender: TObject);
var
strQuery : String;
iCount : Integer;
begin
strQuery := \'SELECT * FROM \'+m_strDBFileName+\' ORDER BY Sum2 desc\';
Table.Close;
With Query do
begin
//DatabaseName := m_strDirectory;
//TableName := m_strDBFileName;
//TableType := ttParad8ox;
Close;
with SQL do
begin
Clear;
Add(strQuery);
end;
execSQL;
end;
With Query do
begin
//DatabaseName := m_strDirectory;
Open;
First;
Unit2.Form2.StringGrid.RowCount := RecordCount+1;
iCount := 1;
while not EOF do
begin
Unit2.Form2.SetStringGrid(iCount,
FieldByName(\'Name\').AsString,
FieldByName(\'Sex\').AsString,
FieldByName(\'Kor\').AsInteger,
FieldByName(\'Eng\').AsInteger,
FieldByName(\'Math\').AsInteger,
FieldByName(\'Sum2\').AsInteger,
FieldByName(\'Avg\').AsInteger);
Next;
iCount := iCount+1;
end;
end;
Unit2.Form2.Show;
end;
end.
// <그림 4>의Form2는 입력된 내용을 DB에 저장하고 DB에 저장되어 있는 내용을 화면에 출력하는 폼이다. Form2에 유닛화일은 unit2이다. Form2를 더블클릭하여 아래와 같은 소스코드를 작성해야 한다.
<그림 4> <그림 3>을 수행한 결과를 화면에 출력하기 위한 폼
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Grids;
type
TForm2 = class(TForm)
StringGrid: TStringGrid;
procedure FormCreate(Sender: TObject);
procedure StringGridClick(Sender: TObject);
private
{ Private declarations }
public
procedure SetStringGrid(var iIndex : Integer; strName : String; strSex : String;
iKor : Integer; iEng : Integer; iMath : Integer;
iSum : Integer; iAvg : Integer);
end;
var
Form2: TForm2;
implementation
{$R *.DFM}
procedure TForm2.SetStringGrid(var iIndex : Integer; strName : String; strSex : String;
iKor : Integer; iEng : Integer; iMath : Integer;
iSum : Integer; iAvg : Integer);
begin
StringGrid.Cells[0,iIndex] := strName;
StringGrid.Cells[1,iIndex] := strSex;
StringGrid.Cells[2,iIndex] := IntToStr(iKor);
StringGrid.Cells[3,iIndex] := IntToStr(iEng);
StringGrid.Cells[4,iIndex] := IntToStr(iMath);
StringGrid.Cells[5,iIndex] := IntToStr(iSum);
StringGrid.Cells[6,iIndex] := IntToStr(iAvg);
StringGrid.Cells[7,iIndex] := IntToStr(iIndex);
end;
procedure TForm2.FormCreate(Sender: TObject);
begin
StringGrid.ColCount := 8;
StringGrid.RowCount := 2;
StringGrid.Cells[0,0] := \'이름\';
StringGrid.Cells[1,0] := \'성별\';
StringGrid.Cells[2,0] := \'국어\';
StringGrid.Cells[3,0] := \'영어\';
StringGrid.Cells[4,0] := \'수학\';
StringGrid.Cells[5,0] := \'총점\';
StringGrid.Cells[6,0] := \'평균\';
StringGrid.Cells[7,0] := \'순위\';
end;
procedure TForm2.StringGridClick(Sender: TObject);
begin
end;
end.
// <그림 5>는 <그림3>의 실행결과로서 입력버튼을 누르면 연속해서 데이터를 입력할 수 있고 입력된 데이터는 모두 DB에 저장되며 출력 버튼을 누르면 <그림 6>을 볼 수 있다
<그림 5> <그림 3>의 수행결과
<그림 6>은 입력한 데이터의 총점과 평균을 구하고 순위를 계산해서 화면에 보여 준다

추천자료

  • 가격2,000
  • 페이지수19페이지
  • 등록일2005.11.10
  • 저작시기2005.11
  • 파일형식한글(hwp)
  • 자료번호#319928
본 자료는 최근 2주간 다운받은 회원이 없습니다.
다운로드 장바구니