PostgreSQL and Customer Database

From: Desmond Coughlan (perl_at_zeouane.org)
Date: 10/18/03

  • Next message: Daniel Staal: "Re: PostgreSQL and Customer Database"
    Date: Sat, 18 Oct 2003 18:14:04 +0200
    To: Perl Beginners List <beginners@perl.org>
    
    
    

    Hi,
    I've been working on both SQL and Perl for a while now, and have lots more
    to learn, but am getting there. I'm going on a trip to the UK soon, and my
    choice of reading on the Eurostar is 'Programming Perl' by O'Reilly. :-\

    I have a pet project, which is probably (what with all the other things
    that I have to do at the moment) not going to see the light of day until
    the middle of 2004, but that's cool. My question to this list isn't a
    request to 'hold my hand' and write the code for me, but rather, to give me
    a few pointers to where I can find the information I need, in order to
    learn how to do it myself.

    Here's the deal ...

    A friend runs a small record shop in Paris. He has several tens of
    thousands of CDs, 45s, and 33s (or whatever you call them). He wants to
    get them all onto an SQL database, and be able to keep track of sales, as
    well as being able to see what's selling well, not so well, etc.

    Now, I know enough about SQL to be able to knock up a DB along the lines
    described above, and to extract the information he needs. I run PostgreSQL
    here on my server, and could get a text file, copy it into a database, and
    even (with a bit more reading) produce reports.

    However, that's not the issue, otherwise I'd have posted this question to
    the PostgreSQL mailing list to which I'm subscribed. Why ? Because he
    knows next to nothing about computers, and I can't see him wanting to spend
    the time learning. So here's what I want to do. I want to use perl to
    produce a webpage, which will be on his PC sitting on the counter in his
    shop. He'll enter the artist name, the title, the reference, the price
    that he paid for the record (or the CD, or ... yeah, you get the idea), and
    then when it's sold, the price he sold it for. This page will dynamically
    update a PostgreSQL database running on a server in the back of his shop.
    An added bonus will be if he can maintain a 'mailshot' list, where people
    will ask to be notified of new acquisitions (strictly on an 'ask first'
    basis, as he's not interested in sending spam), or a customer database
    where customers will only be notified of new acquisitions in a particular
    'genre', where they've previously expressed an interest.

    If things go well, he'd even like to have certain (but not all) aspects of
    the database available to customers and potential customers, via a webpage.
    An added possibility is that I could keep (and maintain, from a DbA point
    of view) the database here, and he could login via an encrypted connection,
    to add and remove records.

    OK, first question: is all the above possible ? I think that I know the
    answer, and that it's yes. In which case, my second question is: where can
    I learn how to do it ? I have 'Introduction to Perl' translated, and the
    only mention of databases is in telling me to use::DBI. Fine, but ...
    _how_ do I use DBI ? After that, I need to swot up on CGI, which I've
    already touched upon in writing a 'feedback' form for my webpage.

    Your opinions would be welcome.

    Thanks for listening.

    D.

    -- 
    Desmond Coughlan          |'Io non mori, e non rimasi vivo'
    desmond@zeouane.org 
    http://www.zeouane.org
    
    


    • application/pgp-signature attachment: stored

  • Next message: Daniel Staal: "Re: PostgreSQL and Customer Database"

    Relevant Pages

    • Re: Foxpro sql limitations
      ... My application is an online user interface for customers to log on to ... and check the status of their fleet of vehicles (the client is a fleet ... The ASP site connects to the Foxpro database used ... This SQL db has since been expanded to include some more ...
      (microsoft.public.fox.vfp.queries-sql)
    • diff problem: perl or pgsql?
      ... I have a perl script that builds a plpgsql function called get_name(t ... id text) based on the table structure of a database. ... SQL code to replace get_name unless it has actually changed, ... ....and every line showing a diff follows that pattern. ...
      (perl.beginners)
    • RE: datamining beginner question
      ... I have not worked with SQL 2000 Analysis Services, but from what I hear, ... We are using the SQL Server 2000 as our database server, ... I know the 20k customers is not a big number, ...
      (microsoft.public.sqlserver.datamining)
    • Re: Want to write your SQL statements and even stored procedures in pure C#?
      ... This is C# code, not SQL. ... > can be regenerated at any time to be kept in sync with database ... So if you want to filter on orders to get the customers, ... Just 'customer', 'order' and a filter. ...
      (microsoft.public.dotnet.framework.adonet)
    • Hyperlinking in a returned recordset
      ... I have a customers table in my database (SQL 2k) with a column called ... can just click on the email address field and have it pull up a new mail ...
      (microsoft.public.inetserver.asp.general)