Which rules should I follow in order to efficiently organize my database model in a database table? For example, I have a database table
person (Varchar) First name, varchar LastName, int (age)}
and domain class
Class person () {string first name; String last name; Old age; } - Should have the same number of assets in the orbit and table
- should they be similar (example: varchar - string)
- What are the best practices
- What to avoid?
There are several strategies for object-relational mapping. Ultimately, you will have to represent each piece of data continuously in some area somewhere, so your strategy will work, you have to answer other questions:
1) How are your records? Are you going to a unique ID field for each class?
2) How will you handle the heritage? If you have a person (person) who introduces an additional area, will you prepare a whole new table for each field in person + PersonA, or is there just a Persona table for additional fields? <3p> How are you planning to create questions against the database? Are you going to provide some form of object-query mapping?
There are many open source ORMs, so long as you are not doing this for a research project, I was advised that you have them.
Comments
Post a Comment