當前位置:首頁 » 操作系統 » 資料庫設計學生宿舍管理系統

資料庫設計學生宿舍管理系統

發布時間: 2022-04-11 01:36:09

❶ 求帶資料庫的,用powerbuilder設計的學生宿舍管理系統,要求就在圖上,急求

用powerbuilder設計的學生宿舍管理系統
我剛好有你要的,現成的,。拿去參考,

❷ 誰會寫一個c++的程序設計:學生宿舍管理系統,要求能從幾個方面對學生的宿舍情況進行查詢

其他的回答也太不責任了!!!
#include <iostream>
#include <string>
#include <fstream>
#include <ctime>

using namespace std;

class student
{
private:
long int stu_num; //學號,宿舍號
char stu_name[40]; //姓名
char class_name[40]; //班別
char house_name[20]; //宿舍
public:
student()
{
stu_num=0;
stu_name[0] =0;
class_name[0] =0;
house_name[0] =0;
}
student::student(long a, char * b,char *c,char *d)
{
Setdata(a , b, c, d);
}
char * Getstuname(void) //姓名查找
{
return stu_name ;
}
long Getstunum(void) //學號查找
{
return stu_num;
}
char * Gethousename(void) //宿舍號查找
{
return house_name;
}
char * Getclassname(void) //按班級查找
{
return class_name;
}
void Setdata(long a, char *b,char *c,char *d)
{
stu_num = a;
strcpy(stu_name, b);
strcpy(class_name, c);
strcpy(house_name, d);
}
void Show(void)
{
cout<<"學號:"<<stu_num<<"\t"<<"姓名:"<<stu_name<<"\t";
cout<<"班級:"<<class_name<<"\t\t"<<"宿舍:"<<house_name<<"\n";
}
};

void main(void)
{
student s1;
int flags=0;
long stu_num; //學號
char stu_name[40]; //姓名
char class_name[40]; //班級
char house_name[20]; //宿舍
time_t t;
time(&t);
ifstream file1;
ofstream file3;
char flag = 'y';
cout<< "---------------------------------學生成績管理系統-------------------------------"<<endl;
cout<< "\t\t\t 時間:" << ctime(&t);
while( flag=='y' || flag=='Y')
{ //由flag控制循環
cout<<"--------------------------------------------------------------------------------\n";
cout<<"\t\t 1:注冊學生!\n";
cout<<"\t\t 2:按學號查看學生信息!\n";
cout<<"\t\t 3:按宿舍號查看學生信息!\n";
cout<<"\t\t 4:按姓名查看學生信息!\n";
cout<<"\t\t 5:按班級查看學生信息!\n";
cout<<"\t\t 6:顯示全部學生信息\n";
// cout<<"\t\t 7:按學號修改學生信息\n";
// cout<<"\t\t 8:按學號刪除學生信息!\n";
cout<<"--------------------------------------------------------------------------------\n";
cout<<"請輸入選擇:";
char choice;
cin>>choice;
switch(choice)
{
case '1':
file3.open("c:\\stu.dat",ios::app|ios::binary);
input: flags=0;
cout<<"輸入學號:";
cin>>stu_num;
while (stu_num<100000 || stu_num>999999)
{
cin.clear();
rewind(stdin);
cout << "你輸入的學號不正確,請輸入一個六位數的學號" << endl;
cout << "學號:";
cin >> stu_num;
}
file1.open("c:\\stu.dat",ios::in | ios::binary | ios::beg);//按讀方式打開文件
while(!file1.eof())
{
int n;
file1.read((char *)&s1,sizeof(student));
n=file1.gcount();
if(n==sizeof(student))
{
if(s1.Getstunum()==stu_num)
flags=1;
}
}
file1.clear();
file1.close();
if (flags==1)
{
cin.clear();
cout << "學號重復,請重輸入!" << endl;
goto input;
}
cout<<"輸入姓名:"; cin>>stu_name;
cout<<"輸入班級:"; cin>>class_name;
cout<<"輸入宿舍:"; cin>>house_name;
s1.Setdata(stu_num,stu_name,class_name,house_name);
file3.write((char*)&s1,sizeof(s1));
file3.clear();
file3.close();
break;
case '2': //按學號查找
cout<<"請輸入學生的學號:";
cin>>stu_num;
while (stu_num<100000 || stu_num>999999)
{
cin.clear();
rewind(stdin);
cout << "你輸入的學號不正確,請輸入一個六位數的學號" << endl;
cout << "學號:";
cin >> stu_num;
}
file1.open("c:\\stu.dat",ios::in | ios::binary | ios::beg);//按讀方式打開文件
while(!file1.eof())
{
int n;
file1.read((char *)&s1,sizeof(student));
n=file1.gcount();
if(n==sizeof(student))
{
if(s1.Getstunum()==stu_num) //顯示學生信息
{
s1.Show();
flags=1;
}
}
}
file1.clear();
file1.close();
if (flags==0)
cout << "沒有找學號為:"<< stu_num <<"的學生記錄!" << endl;
flags=0;
break;
case '3': //按宿舍號查找
cout<<"請輸入宿舍號:";
cin>>house_name;
file1.open("c:\\stu.dat",ios::in | ios::binary | ios::beg);//按讀方式打開文件
while(!file1.eof())
{
int n;
file1.read((char *)&s1,sizeof(student));
n=file1.gcount();
if(n==sizeof(student))
{
if(strcmp(s1.Gethousename(),house_name)==0)
{
s1.Show();
flags=1;
}
}
}
file1.clear();
file1.close();
if (flags==0)
cout << "沒有找到宿舍為:"<< house_name <<"的學生記錄!" << endl;
flags=0;
break;
case '4': //按姓名查找
cout<<"請輸入學生姓名:";
cin>>stu_name;
file1.open("c:\\stu.dat",ios::in | ios::binary | ios::beg);//按讀方式打開文件
while(!file1.eof())
{
int n;
file1.read((char *)&s1,sizeof(student));
n=file1.gcount();
if(n==sizeof(student))
{
if(strcmp(s1. Getstuname(),stu_name)==0)
{
s1.Show();
flags=1;
}
}
}
file1.clear();
file1.close();
if (flags==0)
cout << "沒有找到姓名為:"<< stu_name <<"的學生記錄!" << endl;
flags=0;
break;
case '5': //按班級查找
cout<<"請輸入班級名稱:";
cin>>class_name;
file1.open("c:\\stu.dat",ios::in | ios::binary | ios::beg);//按讀方式打開文件
while(!file1.eof())
{
int n;
file1.read((char *)&s1,sizeof(student));
n=file1.gcount();
if(n==sizeof(student))
{
if(strcmp(s1. Getclassname(),class_name)==0)
{
s1.Show();
flags=1;
}
}
}
file1.clear();
file1.close();
if (flags==0)
cout << "沒有找到該班級為:"<< class_name <<"的學生記錄!" << endl;
flags=0;
break;
case '6': //顯示全部學生信息
file1.open("c:\\stu.dat",ios::in | ios::binary);//按讀方式打開文件
while(!file1.eof())
{
int n;
file1.read((char *)&s1,sizeof(student));
n=file1.gcount();
if(n==sizeof(student))
{
s1.Show();
flags=1;
}
}
file1.clear();
file1.close();
if (flags==0)
cout << "資料庫沒有記錄!" << endl;
flags=0;
break;
// case '7': //修改學生信息按學號
// flags=0;
// cout<<"請輸入要修改學生的學號:";
// cin>>stu_num;
// while (stu_num<100000 || stu_num>999999)
// {
// cin.clear();
// rewind(stdin);
// cout << "你輸入的學號不正確,請輸入一個六位數的學號" << endl;
// cout << "學號:";
// cin >> stu_num;
// }
// file1.open("c:\\stu.dat",ios::in | ios::binary | ios::beg);//按讀方式打開文件
// while(!file1.eof())
// {
// int n;
// file1.read((char *)&s1,sizeof(student));
// n=file1.gcount();
// if(n==sizeof(student))
// {
// if(s1.Getstunum()==stu_num)
// {
// file3.open("c:\\stu.dat",ios::out|ios::binary);
// cout<<"輸入姓名:"; cin>>stu_name;
// cout<<"輸入班級:"; cin>>class_name;
// cout<<"輸入宿舍:"; cin>>house_name;
// s1.Setdata(stu_num,stu_name,class_name,house_name);
// file3.write((char*)&s1,sizeof(s1));
// file3.close();
// flags=1;
// }
// }
// }
// file1.clear();
// file1.close();
// if (flags==0)
// {
// cout << "沒有此學生記錄,不能進行修改!" << endl;
// break;
// }
// break;
// case '8': //刪除學生信息按學號
default: flag = 'n';
break;
}
}
cout << "謝謝您的使用!" << endl;
}

❸ 設計課題2:宿舍管理系統設計 1、 問題描述: 學生宿舍管理系統主要管理學生宿舍的基本信息。在系統中,每

這個很簡單吧,用任何高級編程語言都可,資料庫用ACCESS或sql都可.

❹ 求一個帶資料庫的用pb設計的學生宿舍管理系統

|聯|
|系|
|方|
|式|
|見|
|我|
|個|
|人|有機會的話可幫你
|資|
|料|網路hi加我

❺ 學生宿舍管理系統javaWeb怎麼做

我給講概思路: 1:第步:設計資料庫般像種型宿舍管理系統選用mysql作資料庫設計表包括表欄位名欄位及表間關系 2:第二布:確認使用技術作java選用Springmvc作mvc框架畢竟比較靈簡單Spring必須用管理事務Hibernate作台資料庫管理框架jsp作頁面表現層程序比較健壯擴展起比較便 3:第二步基礎接建立Bean類比類、宿舍類等等映射資料庫表欄位編寫Service層、Dao層等等建立數據處理邏輯 4:實現表現層寫jsp頁面想前台展示內容寫jsp面選用技術juqery,js考慮用戶體驗用ajax實現非同步刷新交互 5:前台相互通信用juint進行集測試看看數據否按照邏輯准確顯示期測試等等 嫌麻煩採用ssh框架直接用jsp+servlet寫比較簡單原理概差層沒清晰明

❻ 學生宿舍管理系統 用SQL怎麼做

你可能還沒有入門!
可以用ASP+acess 或者 php+mysql 或者 .net+mssql
學一個編程語言再了解相匹配的資料庫
再分析程序要實現哪些功能,把整個框架、流程都想一遍。
然後設計資料庫,然後寫程序。

❼ C語言程序設計:學生宿舍管理系統設計

給你個學生成績管理的,你改一下變數名就好了

#include
#include

#define LEN sizeof(struct student)
#define N 35
#include
#define NULL 0
int n=0;
char m[8]={'0','1','2','3','4','5','6','7'};
int i;char c[10];char d[10];
char fname[20],fname0[20],fname6[20]={"shanchu"};
struct student
{long num;
char name[10];
int eng;
int math;
int comp;
int ave;
int all;
}p;

void shuru()
{FILE *fp;
printf("\n\n\t請輸入存儲學生數據的文件名:");
scanf("%s",fname);
fp=fopen(fname,"w");
printf("\t輸入的數據之間請用跳格鍵(Tab)隔開\n\t每輸入完一個學生的信按回車鍵(Enter)\n");
printf("\t結束輸入學生數據時,請輸入一個學生的學號為0並按回車鍵\n");
printf("\t學號 姓名 英語 數學 計算機\n");
do{ printf("\t");
scanf("%ld",&p.num);
if(p.num==0) break;
scanf("\t%s\t%d\t%d\t%d",p.name,&p.eng,&p.math,&p.comp);
p.all=(p.eng+p.math+p.comp);
p.ave=(p.all/3);
fwrite(&p,LEN,1,fp);
n++;
}while(1);
fclose(fp);
}

void chazhao()
{char fname1[20];
FILE *fp;
do{printf("\n\n\t請輸入查找學生數據的文件名:");
scanf("%s",fname1);
if(strcmp(fname1,fname)==0){fp=fopen(fname,"r");break;}
else printf("\t你輸入的文件不存在\n");}while(1);
long number;
do
{ printf("\t請輸入要查找的學生的學號按回鍵(Enter):");
scanf("%ld",&number); rewind(fp);
for(i=0;i { fread(&p,LEN,1,fp);
if(number==p.num) { printf("\t學號 姓名 英語 數學 計算機 平均分 總? \n");
printf("\t%ld\t%s\t%d\t%d\t%d\t%d\t%d\n",p.num,p.name,p.eng,p.math,p.comp,p.ave,p.all);
}
}

printf("\t你還要查找嗎?如果繼續請輸y'加回車鍵,否'n'加回車鍵:");
scanf("%s",c);}while(c[0]=='y');
fclose(fp);
}

void paixu()
{FILE *fp;char fname3[20];struct student k[N];
do{printf("\n\n\t請輸入你要排序的學生數據的文件名:");
scanf("%s",fname3);
if(strcmp(fname3,fname)==0)
{fp=fopen(fname,"r");break;}
else printf("\t你輸入的文件不存在\n");}while(1);
rewind(fp);
for(i=0;i fread(&k[i],LEN,1,fp);
int w,q,j,g,t,t2,t3,t4,t5;char z[10];long t1;
for(q=0;q {g=q;
for(j=q+1;j if(k[j].ave t=k[g].ave;k[g].ave=k[q].ave;k[q].ave=t;
t1=k[g].num;k[g].num=k[q].num;k[q].num=t1;
t2=k[g].eng;k[g].eng=k[q].eng;k[q].eng=t2;
t3=k[g].math;k[g].math=k[q].math;k[q].math=t3;
t4=k[g].comp;k[g].comp=k[q].comp;k[q].comp=t4;
t5=k[g].all;k[g].all=k[q].all;k[q].all=t5;
for(w=0;w<10;w++)
{z[w]=k[g].name[w];k[g].name[w]=k[q].name[w];k[q].name[w]=z[w];};
}
fclose(fp);
printf("\n\n\t請輸入存儲排完序的數據的文件名\n\t注意此文件名和存儲原始數據的文件名不相同\n");
printf("\t");
scanf("%s",fname0);
fp=fopen(fname0,"w");
for(i=0;i fclose(fp);
}

void shuchu()
{FILE *fp;char fname2[20];
do{printf("\n\n\t請輸入你要輸出學生數據的文件名:");
scanf("%s",fname2);
if(strcmp(fname2,fname)==0){fp=fopen(fname,"r");break;}
else if(strcmp(fname2,fname0)==0){fp=fopen(fname0,"r");break;}
else if(strcmp(fname2,fname6)==0){fp=fopen(fname6,"r");break;}
else printf("\t你輸入的文件不存在\n");}while(1);
rewind(fp);
printf("\t學號 姓名 英語 數學 計算機 平均分 總分\n");
printf("\t==============================================================\n");
for(i=0;i {fread(&p,LEN,1,fp);
printf("\t%ld\t%s\t%d\t%d\t%d\t%d\t%d\n",p.num,p.name,p.eng,p.math,p.comp,p.ave,p.all);
}
printf("\t==============================================================\n");
fclose(fp);}

void tongji()
{FILE *fp;char fname4[20];int e1=0,e2=0,e3=0,e4=0,e5=0;
do{printf("\n\n\t請輸入你要統計的學生數據的文件名:");
scanf("%s",fname4);
if(strcmp(fname4,fname)==0)
{fp=fopen(fname,"r");break;}
else printf("\t你輸入的文件不存在\n");}while(1);
rewind(fp);
for(i=0;i {fread(&p,LEN,1,fp);
if(p.ave<=59&&p.ave>=0)e1=e1+1;
if(p.ave<=69&&p.ave>=60)e2=e2+1;
if(p.ave<=79&&p.ave>=70)e3=e3+1;
if(p.ave<=89&&p.ave>=80)e4=e4+1;
if(p.ave<=100&&p.ave>=90)e5=e5+1;
}
fclose(fp);
printf("\t按平均分統計各分數段的學生人數 \n");
printf("\t==============================================================\n");
printf("\t分數段\t0--59\t60--69\t70--79\t80--89\t90--100 \n");
printf("\t人 數 \t %d\t %d\t %d\t %d\t %d\n",e1,e2,e3,e4,e5);
printf("\t==============================================================\n");
}

void shanchu()
{FILE *fp,*fp1;char fname5[20];long number;struct student M[N];
printf("\n\t");
do{printf("\n\t請輸入你要刪除學生數據的文件名:");
scanf("%s",fname5);
if(strcmp(fname5,fname)==0)
{fp=fopen(fname,"r");break;}
else printf("\n\t你輸入的文件不存在 \n");}while(1);
rewind(fp);
fp1=fopen(fname6,"w");
do{printf("\t請輸入要刪除數據的學生的學號並按回車鍵:");
scanf("%ld",&number);
for(i=0;i {fread(&M[i],LEN,1,fp);
if(M[i].num!=number)fwrite(&M[i],LEN,1,fp1);
}
n--;
fcloseall();
fp1=fopen(fname6,"r");fp=fopen(fname,"w");
for(i=0;i {fread(&M[i],LEN,1,fp1);fwrite(&M[i],LEN,1,fp);}
fcloseall();
printf("\t你還要刪除嗎?如果繼續請輸入'y'加回車鍵,否則'n'加回車鍵:");
scanf("%s",c);
}while(c[0]=='y');

}

void charu()
{FILE *fp;char fname7[20];
do{printf("\t請輸入你要插入學生數據的文件名:");
scanf("%s",fname7);
if(strcmp(fname7,fname)==0){fp=fopen(fname,"r+");break;}
else printf("\t你輸入的文件不存在 ");}while(1);

printf("\t請輸入你要插入的數據\n\t輸入的數據之間請用跳格鍵(Tab)隔開\n\t每輸入完一個學生的數據按回車鍵(Enter) \n");
printf("\t結束插入學生數據時,請輸入一個學生的學號為0並按回車鍵\n");
printf("\t學號\t姓名\t英語\t數學\t計算機 \n");
do{fseek(fp,n*LEN,0);printf("\t");
scanf("\t%ld",&p.num);
if(p.num==0) break;
scanf("\t%s\t%d\t%d\t%d",p.name,&p.eng,&p.math,&p.comp);
p.all=(p.eng+p.math+p.comp);
p.ave=(p.all/3);
fwrite(&p,LEN,1,fp);
n++;}while(1);
fclose(fp);
}

void zhujiemian()
{
printf("\n\t 主菜單 \n");
printf("\n");
printf("\t============================================================== \n");
printf("\n");
printf("\t 1.數據輸入 2.數據輸出 \n");
printf("\n");
printf("\t 3.數據排序(按平均分) 4.數據查找(按學號) \n");
printf("\n");
printf("\t 5.數據的插入 6.數據的刪除(按學號) \n");
printf("\n");
printf("\t 7.數據的統計(按平均分)? 0.退出 \n");
printf("\n");
printf("\t============================================================== \n");
printf("\t請輸入你的選擇(0---7)並按回車鍵:");
scanf("%s",d);
}
void main()
{do
{
zhujiemian();
if(d[0]==m[0])break;
else if(d[0]==m[1]){shuru();printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");}
else if(d[0]==m[2]){shuchu();}
else if(d[0]==m[3]){paixu();}
else if(d[0]==m[4]){chazhao();}
else if(d[0]==m[5]){charu();}
else if(d[0]==m[6]){shanchu();}
else if(d[0]==m[7]){tongji();}
else {printf("\t你的選擇不正確!請重新選擇! \n");

}
}while(1);
printf("\n\t\n\t\n\t\n\t\n\t\n\t\n\t");
printf("\t\t謝謝你的使用!!! ") ;

}

❽ sql學生宿舍管理系統怎麼做

這個 不是一兩句話就能說清楚的了 SQL只是一個資料庫 可以存放宿舍的資料 看你用什麼編這個系統了 通過SQL語句連接 一個軟體能做到增刪改察就可以了 可以給你一個思路 通過樓號 樓層管理 可以細到個人 總之有好多細節 建議和宿管人員溝通 了解他們的 工作程序

❾ 想做一個宿舍管理系統,裡面應該有哪些內容呢

感覺這個表不應該從宿舍本身入手,而應該從學生考慮起。
比如姓名,學號,樓號,寢室號,年齡……也就是學生信息表(student)吧
挨個建好,然後通過查詢或者索引方式實現。
select 姓名,學號,寢室號 from student
where....(如果要查1棟的學生,那就在這里寫 樓號=1)
個人理解。。。
如果從宿舍本身入手的話就像是設計好空瓶子,然後往裡面裝水。

❿ 基於vb 的學生宿舍管理系統的設計用什麼資料庫

可以使用access資料庫 也可以使用sql server資料庫。都是可以的。

熱點內容
ssid信息如何配置 發布:2024-09-28 11:15:10 瀏覽:813
下載為什麼要鎖屏密碼 發布:2024-09-28 11:10:59 瀏覽:694
圖像雙線性插值演算法 發布:2024-09-28 11:06:31 瀏覽:872
sql怎麼執行存儲過程 發布:2024-09-28 10:44:32 瀏覽:46
ftp伺服器並發數量 發布:2024-09-28 10:19:02 瀏覽:543
只編譯一個c文件 發布:2024-09-28 09:54:39 瀏覽:238
指紋密碼怎麼破 發布:2024-09-28 09:45:11 瀏覽:661
自編自選腳本 發布:2024-09-28 09:45:10 瀏覽:932
androidui教程pdf 發布:2024-09-28 09:44:13 瀏覽:899
iphone排列文件夾 發布:2024-09-28 09:30:46 瀏覽:356