*Enquet System [#k936d903]
来期、ストリーミングシステムのために、PHPのフレームワークであるCakePHPを用いて、図書館アンケートシステムをモデルに開発趣味レートを行う。
来期、ストリーミングシステムのために、PHPのフレームワークであるCakePHPを用いて、図書館アンケートシステムをモデルに開発シミュレートを行う。
**Database [#oc204871]
***項目 [#q5d5822b]
-ID
-学科・先攻
--1〜6
-学年
--1〜7
-性別
--1 or 2
-使用頻度
--1〜7
-理由(月1以下の理由)
--1〜6
-図書館に行く目的
--1〜3 or Other
-使用時間帯(複数)
--1〜4
-借り入れ頻度
--1〜5
-借りる目的(複数)
--1〜4
-使用サービス
--オンラインデータベース
---1〜3
--複写取り寄せ
---1〜3
--図書申し込み
---1〜3
--視聴覚室
---1〜3
-HP(複数)
--1~6 or Other
-今後何を充実させればよいか
--1〜7 or Other
-意見
--Other
**複数選択しの対応について [#k8b8aec0]
-テーブルを分割する
-数学的に項目を分離して格納する
--ex(1=>+1、2=>+10、3=>+100とし、1と3なら、101)
---利点=>DB設計が楽
---欠点=>集計に手間がかかる
***結論 [#d6ff626a]
テーブルを分割し、リレーションによって結びつける
**テーブル構成 [#tdb89ef5]
***メインテーブル [#h5619ff3]
-eID(auto inclement)
-学科・先攻(subject)
-学年(grade)
-性別(sex)
-使用頻度(frequency of use)
-理由(月1以下の理由)(reason)
-借用頻度(frequency of borrow)
-使用サービス
--オンラインデータベース(Online DB)
--複写取り寄せ(Copy)
--図書申し込み(request)
--視聴覚室(AV)
-今後何を充実させればよいか(Full up)
-意見(opinion)
***使用時間帯 [#h3cc7c7f]
-ID(auto inclement)
-eID
-使用時間帯(複数)(Time)
***借用目的(purpose) [#w533553e]
-ID(auto inclement)
-eID
-借りる目的(複数)(purpose of use)
***HP [#t04e40a8]
-ID(auto inclement)
-eID
-HP(複数)(HP)
**SQL [#xd07091b]
CREATE TABLE `enquet` (
`id` int(11) unsigned NOT NULL auto_increment,
`subject` text NOT NULL,
`grade` text NOT NULL,
`sex` text NOT NULL,
`FoU` text NOT NULL,
`reason` text NOT NULL,
`FoB` text NOT NULL,
`ODB` text NOT NULL,
`copy` text NOT NULL,
`request` text NOT NULL,
`AV` text NOT NULL,
`FullUP` text NOT NULL,
`opinion` text NOT NULL,
PRIMARY KEY (`id`)
}
CREATE TABLE `time` (
`id` int(11) unsigned NOT NULL auto_increment,
`eid` int(11) unsigned NOT NULL,
`time` text NOT NULL,
PRIMARY KEY (`id`)
}
CREATE TABLE `purpose` (
`id` int(11) unsigned NOT NULL auto_increment,
`eid` int(11) unsigned NOT NULL,
`PoU` text NOT NULL,
PRIMARY KEY (`id`)
}
CREATE TABLE `HP` (
`id` int(11) unsigned NOT NULL auto_increment,
`eid` int(11) unsigned NOT NULL,
`HP` text NOT NULL,
PRIMARY KEY (`id`)
}