none
Advice on data abstraction for my project RRS feed

  • Question

  • Hello,

    I've just learned LINQ to SQL and I post this topic here because maybe entity classes is the way to go for the project I need an advice about. So...

    I am trying to make a program for adding categories and descriptions to files. The language is C#, I'm using WinForms, it should run on Windows 7...

    1.The categories can contain sub-categories.

    I don't want to call them "tags", because these are different. A category can be fx "favorites". But it can also be: "favorites->music->2013". You can create sub-categories. For the user all the categories will be presented in a TreeView, so that if you select "2013" which is a child of "music", which is a child of "favorites", that whole should give the category name: "favorites->music->2013".

    2.Every file CAN have a description and one or many categories. However:

    • Even if the file is deleted, I want to keep its description, so that it can be available for later usage.
    • Folders themselves will be omitted. The folders themselves cannot have nor categories, nor description. But the contained files YES.

    I made a very simple SQL Server database containing one table: !http://img832.imageshack.us/img832/3931/finalprojectdb.png But I already know it's stupid and not right :D

    Even though I know about LINQ to SQL and LINQ to XML I am still struggling to come up with a good model for organizing all this data. And especially to think of the best way to store all the categories one file is having.

    Any advice on what should the best approach in this situation be, is welcomed. How to handle this data? What would you do if it was you? Thanks in advance !



    • Edited by ILIAN89 Saturday, April 13, 2013 3:35 PM
    Saturday, April 13, 2013 3:31 PM

Answers