Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2010

    Unanswered: 1st year IT student - HELP with concept

    Hello all.

    I'm a first year IT student from Serbia and this is my first time i'm working with databases so I was wondering if I could get your help.

    I can't visualise how to connect the databases so I need help with the concept not the implementation and creating the databases.

    So we're working with C# in the .NET 3.5 framework and we need to complete a program which will be used by professors and students. The program should comprise of 2 databases (Students and Professors) and will have addition two tables (Grades and Subject).

    The students will have the option to submit an application to take the exam, whereas the professors will have an option to upload the grades of the exam and show the results.

    Please help!

    Thanks in advance!!

  2. #2
    Join Date
    Jan 2003
    Provided Answers: 17
    Are you looking for help on how to connect to the database, or how to use the connection?

  3. #3
    Join Date
    Aug 2010

    1454 buquith

    I'm not entirely sure what your question I think this is the info you are looking for:

    1) Choose your database environment (MS SQL Server and MySQL are two obvious choices for .NET development)

    2) Install / Reference the appropriate database interface libraries for the database server you've chosen. The libraries for MS SQL are built in, I'm sure the MySQL ones (as well as Oracle, etc.) are easy to find.

    3) There are a ton of different coding styles for mixing your procedural code with your SQL code. One basic way is to create functions that act as intermediaries between C# & SQL, i.e.:

    public bool UpdateGrade(int StudentID, double Grade)
    string sql = "UPDATE grades SET Grade = " + Grade + " WHERE StudentID = " + StudentID;
    //Code to initialize database object
    //Code to execute SQL
    //Code to check that update occurred and return true / false.


    A few additional notes:
    1) I don't see much of a reason to separate your Students / Professors databases. I assume there will be some data that will be needed by both sides and you're only creating additional work for yourself. Assuming your application is well built and so is your security, you don't have to worry about students accessing professors records.

    2) Most SQL interface libraries offer functions to build your query that protect against SQL injection attacks. Do some research regarding best practices surrounding this.
    Case Culture - Fashion Cases for iPhone and BlackBerry

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts