Android項目之無線點餐(1)--點餐系統資料庫設計

來源:互聯網
上載者:User

標籤:android項目之無線點餐1--點餐系

(1)使用資料庫mysql,指令碼語言如下:

/* 使用者表*/CREATE TABLE `usertbl` (  `id` int(11) NOT NULL AUTO_INCREMENT,  `username` varchar(20) DEFAULT NULL,  `password` varchar(20) DEFAULT NULL,  `permission` int(11) DEFAULT NULL,  PRIMARY KEY (`id`)) DEFAULT CHARSET=gbk;/*餐桌表*/CREATE TABLE `tabletbl` (  `id` int(11) NOT NULL AUTO_INCREMENT,  `flag` int(11) DEFAULT '0' COMMENT '1:表示有人 0:表示空位',  PRIMARY KEY (`id`)) DEFAULT CHARSET=gbk;/*菜單分類表*/CREATE TABLE `menutypetbl` (  `id` int(11) NOT NULL AUTO_INCREMENT,  `name` varchar(20) DEFAULT NULL,  PRIMARY KEY (`id`))DEFAULT CHARSET=gbk;/*菜單表*/CREATE TABLE `menutbl` (  `id` int(11) NOT NULL AUTO_INCREMENT,  `tid` int(11) DEFAULT NULL,  `name` varchar(20) DEFAULT NULL,  `price` int(11) DEFAULT NULL,  `description` varchar(20) DEFAULT NULL,  PRIMARY KEY (`id`))DEFAULT CHARSET=gbk;/* 訂單表*/CREATE TABLE `ordertbl` (  `id` int(11) NOT NULL AUTO_INCREMENT,  `ctime` varchar(20) DEFAULT NULL,  `uid` int(11) DEFAULT NULL,  `tid` int(11) DEFAULT NULL,  `description` varchar(20) DEFAULT NULL,  `personNum` int(11) DEFAULT NULL,  `isPay` int(11) DEFAULT '0' COMMENT '0:未結算 1: 結算',  PRIMARY KEY (`id`))DEFAULT CHARSET=gbk;/* 訂單詳細表*/CREATE TABLE `orderdetailtbl` (  `id` int(11) NOT NULL AUTO_INCREMENT,  `oid` int(11) DEFAULT NULL,  `mid` int(11) DEFAULT NULL,  `num` int(11) DEFAULT NULL,  `description` varchar(20) DEFAULT NULL,  PRIMARY KEY (`id`))DEFAULT CHARSET=gbk;INSERT INTO `usertbl` (`id`, `username`, `password`, `permission`) VALUES   (1,'admin','123',NULL),  (2,'tom','456',NULL);COMMIT;INSERT INTO `menutypetbl` (`id`, `name`) VALUES   (1,'熱菜'),  (2,'涼菜'),  (3,'酒品');COMMIT;INSERT INTO `menutbl` (`id`, `tid`, `name`, `price`, `description`) VALUES   (1,1,'水煮魚',30,NULL),  (2,1,'地三鮮',15,NULL),  (3,2,'魚香肉絲',15,NULL),  (4,2,'東北亂燉',30,NULL);COMMIT;INSERT INTO `tabletbl` (`id`, `flag`) VALUES   (1,0),  (2,0),  (3,0),  (4,0),  (5,0),  (6,0);COMMIT;

(2)命令列中擦混剪資料庫:-->create datbase wiressorder;  -->charset gbk;(需要將指令碼語言儲存為db.sql存放在C盤目錄下等待使用)


資料庫建立成功!



Android項目之無線點餐(1)--點餐系統資料庫設計

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.