Thread: Pharmacy database

  1. #1
    Registered User
    Join Date
    Oct 2016
    Posts
    5

    Pharmacy database

    Hello,

    I have been struggling with an assignment which involves creating a database for a pharmacy. It has to be made so that the administrator of a pharmacy can add and modify the medication in the database. Also when a client will buy something, information about them will be saved in the database. It also has to save the prescriptions and all the sales.

    I assume this will be done with using files but I am not sure where to even begin. Programming is not my strongest suit.

    Any help would be appreciated!

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    37,410
    Presumably this isn't your first homework assignment.

    > I assume this will be done with using files but I am not sure where to even begin.
    Well most homework builds on the knowledge accumulated from past exercises and the current lesson.

    A good place to start is by making a list of very specific actions that need to be performed, and clarifying what ambiguous statements mean (as your tutor).

    The administrator
    - add a medication record
    - modify a medication record

    > Also when a client will buy something, information about them will be saved in the database
    Is this info about the client, or what they bought?

    > It also has to save the prescriptions and all the sales.
    Are these recorded by the administrator, or sales agents?
    What is a sale?
    - price, quantity, product (anything else)?


    If you've been running from one forum to another to get other people to do your work, then you're basically screwed and should drop the course.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Oct 2016
    Posts
    5
    Well the exercises we do mostly consist in 1+1 then we are asked to do the equivalent of calculus.

    The info is about both the client(name, age, sex) and what they bought.

    They are recorded by the sales agent and the sale consists in what you stated and also the type of the medication(what disease they are used for, whether they are solid, liquid, etc., internal or external use, whether they are over the counter or not)

    Ah well, this is the only place I asked for help and as much as I would like to drop it that is not an option. I've been kinda screwed from the beginning anyways.

  4. #4
    Registered User
    Join Date
    Oct 2016
    Posts
    5
    Hello?

  5. #5
    Registered User
    Join Date
    May 2009
    Posts
    3,652
    Quote Originally Posted by llama View Post
    Hello?
    What do you know how to do in C programming?

    So far, you seem to NOT know anything. Please show some effort or you will be ignored by nearly everybody on this site!

    Do you know how to create, write, and read from files?
    If yes, do you know how to do it with both text and binary files?
    Edit: Knowing how to save fixed sized binary records, is one method of solving this problem; but, it is NOT the common way for newbies or people writing portable code.
    Do you know how to use structures in C? If no, I suggest you learn.

    Tim S.
    Last edited by stahta01; 10-24-2016 at 12:05 PM.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  6. #6
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,687
    Were you provided any template code from your instructor? Some courses are actually quite generous in
    this regard and ask you "fill in the blanks" to complete the program. However, I highly suggest that you
    heed to what Salem and stahta01 suggested.

    Code:
    while (effort_is_shown)
    {
        puts("You get extra help!");
    }
    Double Helix STL

  7. #7
    Registered User
    Join Date
    Oct 2016
    Posts
    5
    I can create, write and read from files. No, they didn't insist on binary files.
    I understand how structures work.

  8. #8
    Registered User
    Join Date
    Oct 2016
    Posts
    5
    I wish we had that. Our courses were never like that, they're just not well structured and don't provide enough in my opinion. We didn't get a lot of information about what we're supposed to do, he just told us to do it.

  9. #9
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,687
    If that really is the case, then he is a terrible instructor. When you set an assignment, unless it is a
    test or exam - you need to be told exactly what is expected. Yes, most of it is written down via a
    handout or email but the instructor must at least have given you time to practice and understand at
    least the basics of the concepts before the question was given.

    If you really are struggling, speak to your instructor or your course tutor about it. Colleges are places
    of learning, so they should have facilities to help you if extra time is required. It may also help to get yourself
    a good (recent) book on C to study at home. You can get lots of free ones in PDF format download from the
    Internet, and most have exercises for you to do in your own time to make the practices sink in.
    Double Helix STL

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 10-09-2001, 10:20 PM

Tags for this Thread