What will be the best database setup for any small "managing contactsInch type website? It will be utilized internally only (intranet), and I am using ASP.Internet 3.5 and SQL Server.

The database stores details about people we're in touch with, companies they work with, etc. Lots of people can function for the similar company (n:1), but people may also work with several companies (n:m). People might have multiple emails and numbers. Companies might have multiple offices at different locations, etc. The database design needs to be flexible enough to include new fields in a later point.

I understand of countless different approaches, but I'm not sure which is the very best.

  • Very classic, different table for various subjects (people, companies), with a lot of fields like "email1", "email2", and tables to relate the topics (what individuals operate in what companies) when there might be n:m associations. Additional fields ("email3") could be added afterwards without problem. May have many empty fields since you need to consider the utmost quantity of emails anyone might have.
  • Separate tables for such things as emails, that link back to folks table. Could be problematic if (for instance) the initial design only requires one phone number, and also at a later point it's made the decision to deal with numbers like emails inside a separate table. May finish up with lots of tables. However the design is comparatively space-efficient (couple of empty fields).
  • Adjacency list model, where every property has it's own record within the table, as well as an ID pointer towards the primary record. For instance, title, address, all emails, all numbers, etc are saved separate records pointing towards the same primary personal record. The database will not have empty fields whatsoever, and there's plenty of freedom for further structures afterwards.
  • All data saved as XML within the SQL Server database (while using XML data type)?
  • Or simply plain XML files?

I recommend a relational database. any project appears not so difficult to become addressed just by getting the best tables using the right associations. I'd avoid XML because the data will probably be consistent. XML is much better for data with unpredictable structures, like for instance a household tree. A database will work better and it'll be simpler to keep. It is also simpler to set of data just when was inside a RDB instead of XLM format. It’s sound practice to code with scalability in your mind. If you're controlling contacts I'm able to guarantee you they'll need multiple phones sooner or later.

Adjacency list model is much better for if you have an increasing number of qualities however the structure is straightforward. For instance an account in which you have n quantity of questions and solutions however they all tie look out onto one user.