Help : I need to make a complex database?

Discussion in 'MySQL' started by jskapur, Jul 31, 2009.

  1. #1
    Hi,
    Thanks to all in advance for all the help you might have to offer. Please could help me solve the dilemma I am in. I have been asked to create this database, for work (I am doing work experience) and this database entitles me to make several tables but to make calculations as well. But more complex.

    For example, if there is 500 of product x received today, and we gave out 10 pieces tomorrow and 20 more in 36 days, I have to make a column that always updates the balance. But also in this database it should also show the date each product was given out and this database will have over 1,000 different products.

    Now the dilemma I am in, is that if I should make in Microsoft Access 2003 of MySQL Server Management 2005 alongside Visual Studios.

    Please if you could be so kind and let me know how I should approach this and what pro gramme I should use. Thanks in advance.:)
     
    Last edited: Jul 31, 2009
    jskapur, Jul 31, 2009 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    How are you accessing the database? If you need to manually edit it (like Excel), then Access is probably the best bet. If you have an application or something else that will be retrieving the data, I would go with MySQL or SQL Express.

    You can use a trigger to update the running total.

    You're going to need several tables to properly manage and track.

    Off the top of my head, you will most likely need a Products, Stock, Transactions. Keep the products in the products table. Use the Stock table with a reference to the product to add and remove stock. Use the Transactions table to record each time and the quantity of products you sell. At the same time you add a transaction, you would subtract the quantity from the Stock table, which will keep your Stock accurate.
     
    jestep, Jul 31, 2009 IP
  3. jskapur

    jskapur Active Member

    Messages:
    144
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    81
    #3
    thanks so much, but If i create this database in MySQL, I can make an application for it in Visual Studio - is that correct?

    So for the rest of the employees in the company they would not need to go through all the trouble of downloading visual studios or mySQL, they would just need this application designed by Visual Studios... is that correct?

    By the way, thanks and I have already started following your advice in MySQL - to make various different tables interlinked with querys i am guessing?:)
     
    jskapur, Jul 31, 2009 IP
  4. justinlorder

    justinlorder Peon

    Messages:
    4,160
    Likes Received:
    61
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It looks like a database problem.
    Actually it is the problem of database structure. They are more important than php or any other language code.
    You have to design it .
    You had better to ask some experts/managers in php+mysql projects.
     
    justinlorder, Jul 31, 2009 IP
  5. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #5
    I would probably go with SQL Server Express, if you will be accessing via a VB desktop application.

    I do not have much experience with desktop development, so I'm not sure the best way to handle this.

    Generally you would have one computer/server run the database, and each person would have the application on their computer and connect to the database server.
     
    jestep, Jul 31, 2009 IP
  6. grandllama

    grandllama Greenhorn

    Messages:
    48
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #6
    Yes, basic client server design. The server runs the DB and I agree that SQL Server is the best bet when using VB

    Connect with native drivers or ODBC with the client application to the database server - in this case fat client architecture is probably the easiest method - most of the calculations can be done with the fat client.

    I know someone above mentioned using triggers and they could be used to do the updates, as could some stored procedures, but the simplest method for someone new to the world is to have the client application do it.
     
    grandllama, Jul 31, 2009 IP
  7. jskapur

    jskapur Active Member

    Messages:
    144
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    81
    #7
    I have created the database fields in SQL, but now I have another problem. I have Visual Studio 2005 and Microsoft Visual C# 2005 Express Edition. I will be able to now complete the task, only if all the templates that are in Microsoft Visual C# 2005 Express Edition could be transferred to my Visual Studio 2005. These are two different applications on my computer not connected. Microsoft Visual C# 2005 Express Edition is a 30 day trial and Visual Studio 2005 is not a trial. Do any of you know how I should approach this.
    Thanks again for all you help.
     
    jskapur, Aug 1, 2009 IP