starting a new database/script

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jeff Sandler

    #1

    starting a new database/script

    Hello learned souls of the MySQL tribe. I've decided on a new project
    and I thought maybe some of you would like to give some input. Let me
    begin with the story that makes me think it's a good idea and a good
    project.

    I've gone to the same place for many years to have my car serviced.
    They're great people and fine mechanics, but I think their computer
    gathers more dust than megabytes.

    Every service requires me to fill out their usual form. My name,
    address, phone, etc. go on the form. Then, I squint at the mechanic's
    scratchings to see if he wrote down the service I want.

    There must be a better way. I know there are big, expensive programs to
    do these things. I'll bet they require an amount of study, learning,
    practicing, etc. before they are useful. I'll bet most of them require
    a lot of computer resources, too. I believe that I could create a nice
    package for these people with a MySQL database, an Apache server and 1
    or more PHP scripts.

    I want the mechanic to be able to enter my car's license number into his
    computer and pull up the whole file on me. I want him to come to me
    with a printed form with my name and everything already filled out.
    Even better, after he's asked me what service I need, he can then print
    an estimate with everything in nice, clear lettering that is easy to
    read and understand. Naturally, a paper invoice is needed when the work
    is all done.

    I'm considering a car table, a customer table, a table with all services
    ever performed, a table with many of the services (with prices &
    descriptions) that the garage can perform.

    Here are the questions I'm thinking about now.
    I know tables allow foreign keys to other tables. I'm thinking about
    using this, for example, with a customer table and a car table. The car
    should have a foreign key to an id of the customer, shouldn't it? What
    can I expect to gain by doing this?

    A lot of this project is printing. So far, all the solutions I've seen
    in PHP are through a web browser. Do web browsers all print? Can PHP
    print? Is it ethical to expect the user to print through the browser
    like that? Is it possible to structure the data (say, for the invoice)
    so it looks OK in the browser and looks really tip-top when printed?


  • Siemel Naran

    #2
    Re: starting a new database/script

    "Jeff Sandler" <ffej2ffej@dsle xtreme.com> wrote in message
    news:40C0A470.8 050603@dslextre me.com...
    [color=blue]
    > I'm considering a car table, a customer table, a table with all services
    > ever performed, a table with many of the services (with prices &
    > descriptions) that the garage can perform.[/color]

    Good. Will cars from different years be different records in the cars
    table, or will there be a car table and year table? How are you going to
    handle different prices over time (ie. they raise prices, provide limited
    time discounts, etc)? Maybe we want to group all the services performed
    into orders (like you go in and they check the oil, wiper blades, tires;
    next time you go they change the battery, transmission fluid).

    What will you use for the user interface?
    [color=blue]
    > Here are the questions I'm thinking about now.
    > I know tables allow foreign keys to other tables. I'm thinking about
    > using this, for example, with a customer table and a car table. The car
    > should have a foreign key to an id of the customer, shouldn't it? What
    > can I expect to gain by doing this?[/color]

    As far as I know you can restrict deleting a customer record if there exists
    a car that refers to this customer. You can also delete all relevant cars
    when you delete a customer (but you don't have to, so instead you can set
    the customer_id to NULL). Also, if if you change the id of the customer,
    you can automatically change the foreign key in the car
    [color=blue]
    > A lot of this project is printing. So far, all the solutions I've seen
    > in PHP are through a web browser. Do web browsers all print? Can PHP
    > print? Is it ethical to expect the user to print through the browser
    > like that? Is it possible to structure the data (say, for the invoice)
    > so it looks OK in the browser and looks really tip-top when printed?[/color]



    Comment

    • David L

      #3
      Re: starting a new database/script

      personally.. if there is only one desk/mechanic using it, i'd try to get
      a 2nd hand copy of, say, Access97, and have a go with that. The reports
      in Access is quite sophisticated compared to, if you were to build html
      pages by hand.

      Jeff Sandler wrote:
      [color=blue]
      > Hello learned souls of the MySQL tribe. I've decided on a new project
      > and I thought maybe some of you would like to give some input. Let me
      > begin with the story that makes me think it's a good idea and a good
      > project.
      >
      > I've gone to the same place for many years to have my car serviced.
      > They're great people and fine mechanics, but I think their computer
      > gathers more dust than megabytes.
      >
      > Every service requires me to fill out their usual form. My name,
      > address, phone, etc. go on the form. Then, I squint at the mechanic's
      > scratchings to see if he wrote down the service I want.
      >
      > There must be a better way. I know there are big, expensive programs to
      > do these things. I'll bet they require an amount of study, learning,
      > practicing, etc. before they are useful. I'll bet most of them require
      > a lot of computer resources, too. I believe that I could create a nice
      > package for these people with a MySQL database, an Apache server and 1
      > or more PHP scripts.
      >
      > I want the mechanic to be able to enter my car's license number into his
      > computer and pull up the whole file on me. I want him to come to me
      > with a printed form with my name and everything already filled out.
      > Even better, after he's asked me what service I need, he can then print
      > an estimate with everything in nice, clear lettering that is easy to
      > read and understand. Naturally, a paper invoice is needed when the work
      > is all done.
      >
      > I'm considering a car table, a customer table, a table with all services
      > ever performed, a table with many of the services (with prices &
      > descriptions) that the garage can perform.
      >
      > Here are the questions I'm thinking about now.
      > I know tables allow foreign keys to other tables. I'm thinking about
      > using this, for example, with a customer table and a car table. The car
      > should have a foreign key to an id of the customer, shouldn't it? What
      > can I expect to gain by doing this?
      >
      > A lot of this project is printing. So far, all the solutions I've seen
      > in PHP are through a web browser. Do web browsers all print? Can PHP
      > print? Is it ethical to expect the user to print through the browser
      > like that? Is it possible to structure the data (say, for the invoice)
      > so it looks OK in the browser and looks really tip-top when printed?
      >
      >[/color]

      Comment

      Working...