I know, I really don’t like all the questions like the survey, but I could not think of a better way to find out what, in my opinion, I need to know. I am very green in the world of database development, working only on a small number of projects that simply interacted with the database, and not with the need to create a new one from scratch. However, everything is changing, and now I am faced with creating my own database.
So far I have created the tables I need and added the columns that I think I need, including any link tables for many relationships and columns for one-to-many relationships. I have some specific questions on this, but I felt that instead of just answering these questions, it would be wiser to ask about things that I may not even know what I should address now, rather than after 6 months, when we have a populated database and client tools.
First, the questions about my database that led me to understand, I don't know enough:
- How do I ensure that my many-to-many reference tables and my one-to-many columns are updated when changes are made to the referenced tables? What problems can I encounter?
- I use nvarchar (n) and nvarchar (MAX) for various text fields. Should I use varchar equivalents (I read that there might be performance risks when using nvarchar)? Are there any other problems associated with the choice of data types, besides the fact that they fear the use of fixed-length arrays of char for storing variable-length information? Any rules on how to choose the appropriate data type?
- I use
intfor the column IDfor each table, which is my primary key in all but the link tables (where I have two primary keys, IDrows of the link table). This identifier is set as an identifier. Are there pitfalls for this approach? - , , , . , , ?
, , , , ( ).
wiki'd - . , , - , , , , . .
Update
, .