91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 376KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2021-06-15
  • 語言: C/C++
  • 標簽: DBMS系統??

資源簡介

該系統使用C++編程語言實現DBMS系統的基本功能,包括建表,插入,刪除,查詢,更新表等,基本符合哈工大軟件設計開發和實踐二的要求。

資源截圖

代碼片段和文件信息

#include?
#include?
#include?
#include?
#include?

using?namespace?std;

void?create_table(?string?str1?);
void?insert_into(?string?str1?);
void?delete_from(?string?str1?);
void?select(?string?str1?);
void?display(?char*?tablename?);
void?update_table(?string?str1?);

int?number_of_property(string?str);??//計算屬性的個數
int?find_property_place(?string?cpname_1string?tablename_1?);???//返回屬性在文件中的位置是第幾個
int?readmodel(string?tablename_1);??//找是否有名為tablename_1的表
int?complex_condition_ornot(?string?cpname_1string?condition_1string?cpvalue_1string?shuxing_1);//判斷是否滿足條件
int?check_keyword(?string?st1char*?tablename?);???//插入的元組中主鍵是否已經存在

string?yuanzu;

int?main()
{
????string?str1str2;
????cout?<se?management?system!*******************“?<?????????<?????????<se?journey!********************“?<????while(1)
????{
????????cout?<“;
????????getline(cin?str1);
????????if(str1.compare(“leave“)==0)
????????{
????????????cout?<????????????break;
????????}
????????int?i=0;
????????while(str1[i]!=‘?‘)
????????????i++;
????????str2=str1.substr(0i);
????????if(?str2.compare(?“create“?)==0?)
????????????create_table(str1);
????????if(?str2.compare(?“insert“?)==0?)
????????????insert_into(str1);
????????if(?str2.compare(?“delete“?)==0?)
????????????delete_from(str1);
????????if(?str2.compare(?“select“?)==0?)
????????????select(str1);
????????if(?str2.compare(?“update“?)==0?)
????????????update_table(str1);
????????cout?<????}
????return?0;
}
void?create_table(?string?str1?)
{
????char?modelstr[50];??//存入model中的表的信息
????str1.copy(?modelstr?str1.length()-13?13?);
????modelstr[str1.length()-13]?=‘\0‘;
????FILE?*fp;
????if((fp=fopen(“D:\\model.txt““at+“))==NULL)
????????cout?<????fputs(modelstr?fp);
????fputc(‘\n‘fp);
????fclose(fp);
????string?tmp=modelstr;
????int?i=0;
????while(?tmp[i]!=‘(‘?)
????????i++;
????char?filename[20];
????tmp.copy(?filename?i?0);
????filename[i]=‘\0‘;
????char?s[30];
????sprintf(s?“D:\\%s.txt“filename);
????if((fp=fopen(s“at+“))==NULL)
????????cout?<????fclose(fp);
}
void?insert_into(?string?str1?)
{
????//找出表名
????int?i=0startend;
????string?property;
????char?property1[20];
????while(?str1[i]!=‘(‘)
????????i++;
????char?tablename[20];
????str1.copy(tablenamei-1212);
????i=0;
????while(?tablename[i]!=‘?‘?)
????????i++;
????tablename[i]=‘\0‘;
????string?tablename_1=tablename;???//要插入的table的名字
????FILE?*fp;
????char?s[30];
????sprintf(s?“D:\\%s.txt“tablename);
????if((fp=fopen(s“rt“))==NULL)
???????

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件?????998852??2013-11-01?16:14??DBMS_happy\bin\Debug\DBMS_happy.exe

?????文件???????1065??2013-10-25?15:05??DBMS_happy\DBMS_happy.cbp

?????文件????????266??2013-11-01?15:59??DBMS_happy\DBMS_happy.depend

?????文件????????240??2013-11-02?14:39??DBMS_happy\DBMS_happy.layout

?????文件??????41096??2013-11-01?16:14??DBMS_happy\main.cpp

?????文件?????112361??2013-11-01?16:14??DBMS_happy\obj\Debug\main.o

?????文件?????179251??2013-11-01?17:37??DBMS_happy\report.doc

?????目錄??????????0??2013-11-18?19:33??DBMS_happy\bin\Debug

?????目錄??????????0??2013-11-18?19:33??DBMS_happy\obj\Debug

?????目錄??????????0??2013-11-18?19:33??DBMS_happy\bin

?????目錄??????????0??2013-11-18?19:33??DBMS_happy\obj

?????目錄??????????0??2013-12-16?21:45??DBMS_happy

-----------?---------??----------?-----??----

??????????????1333131????????????????????12


評論

共有 條評論

相關資源