Giter VIP home page Giter VIP logo

12307-db-system's Introduction

12307 train ticket booking system

Demo

img1 img2 img3 img4

build

建议环境:Ubuntu

  1. 按init/install.txt配置环境。(可把web文件夹修改为apache2的默认文件夹。改完后记得把/etc/apache2/apache2.conf里的denied改成granted.) (安装php时,可以apt install php php-pgsql)
  2. 按init/Lab1-README.txt 建立数据库账户,创建数据库
  3. 按sql/table.sql 建表
  4. 复制以下copy语句把data/process里的数据导入数据库。(路径改成你的)

copy city from '/home/alphabet/db/12307-db-system/data/process/city.csv' with (format csv, delimiter ','); copy train from '/home/alphabet/db/12307-db-system/data/process/train.csv' with (format csv, delimiter ','); copy station from '/home/alphabet/db/12307-db-system/data/process/station.csv' with (format csv, delimiter ','); copy stop from '/home/alphabet/db/12307-db-system/data/process/stop.csv' with (format csv, delimiter ','); copy price from '/home/alphabet/db/12307-db-system/data/process/price.csv' with (format csv, delimiter ',');

5.在php/utils里把pg_connect里的用户名和密码和数据库名字改成你的。 6.启动apache2和pgsql服务。 7.先注册用户名为admin的即为管理员,先在管理页面开放购票,然后可以买票。

reference: http://www.postgres.cn/docs/10/

12307-db-system's People

Contributors

lukechen2 avatar yfchen7 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.