dongtang1910 2012-12-16 02:16
浏览 83
已采纳

基于Web的零件库存设计

I am a field service technician and I have an inventory of parts that is either issued to me by the company I work for or through orders for specific jobs. I am trying to design a website to manage my parts, both on-hand inventory and parts that have been returned or transferred to someone else. Here is the information I need to track:

  • part number(10 digit)
  • req number(8 digit, unique)
  • description(up to 50 characters)
  • location(Van or shed).
  • WorkOrder("w"+9 digits ex: 'W212141234')
  • BOL(15 digit bill of lading #)
  • TransferDate(date I get rid of part)
  • TransferMethod(enum 'DEF','RTS','OBF')

I will probably use PHP to make a website and interact with the MySQL database.

What is the best design? A multi-table approach or one table with webpages that display queries of only certain fields? I need a list of on hand parts that list part number, req number, description, and location. I will also need to be able to have "defective returns" view that will list what parts I returned as DEF with all the remaining fields filled in.

Besides the "on hand" fields, the rest of the fields won't have data until they are no longer "on hand".

I really appreciate any help because I am new to both SQL and PHP. I have experimented with Ruby on Rails and django but I am not sure if I need to tackle all that at this point.

  • 写回答

1条回答 默认 最新

  • dongyejun1983 2012-12-16 02:41
    关注

    Even though you give some information on your issue, it is hard to actually approach it as the question itself on "what is the best design" is vague.

    What I would do is this:

    MYSQL TABLE DESIGN

    Table parts

    req number(int(8), unique, KEY) 
    part number(int(10))
    description(varchar(50))
    location(enum 'Van','shed')
    WorkOrder(varchar(10))
    BOL(varchar(15))
    TransferDate(date)
    TransferMethod(enum 'DEF','RTS','OBF')
    onhand (boolean)
    

    PHP SCRIPTS

    and then i would make 2 php scripts with a single query each and a table displaying the info

    onhand.php

    select *fields filled for on hand parts* from parts where onhand = 1
    

    notonhand.php

    select *fields filled for not on hand parts* from parts where onhand = 0
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站
  • ¥50 成都蓉城足球俱乐部小程序抢票
  • ¥15 yolov7训练自己的数据集
  • ¥15 esp8266与51单片机连接问题(标签-单片机|关键词-串口)(相关搜索:51单片机|单片机|测试代码)
  • ¥15 电力市场出清matlab yalmip kkt 双层优化问题
  • ¥30 ros小车路径规划实现不了,如何解决?(操作系统-ubuntu)