Tag Info

Hot answers tagged

11

You fix "So what is the a good way of achieving a good DB design when you don't have a DBA?" by getting a DBA. DB design is not about indexing, that's just part of the overall design. What columns are in your tables, how to split repeated data into normalised tables and when not to split them for performance reasons; what kind of queries they'll ...


5

Does it mean that if we are using an ORM tool we do not need to design our database like before? You still need a design; it just takes a somewhat different form. The nature of the design shouldn't change all that much; you're still going to have records and relations, they'll just look a bit different. Does it mean that we do not even have to come ...


4

No, they're not. The purpose of auditing is to determine who did what in the past. The current data is irrelevant for this purpose, but you will need to record which data changed - there's no point in saying "user Dave change the person table" without saying what he changed. This information doesn't have to be recorded so formally though. You might like to ...


3

The model is just that: an object-based model of the business domain. The database is also a model of the business domain, but in a different form, i.e. tables and relations. They complement each other; what one lacks, the other provides. It's not an inner platform; an inner platform would subvert the technology it is imitating. The Model does not do ...


2

I agree wholeheartedly with user61852 on the question of file paths, but can't disagree strongly enough about BLOBS. Although the question doesn't specifically mention if it's a web application or a more traditional client-server application, it sounds like we're talking about a web app from the context provided about USERS & PRODUCTS. If that's the ...


2

Please consider this as an alternative. The previous two examples will both require that you make changes to the schema as the application's scope grows in addition the "custom_column" solution is difficult to extend and maintain. Eventually you'll end up with Custom_510 and then just imagine how awful this table will be to work with. First let's use your ...


2

We can't answer that. It depends on more than just your schema or lack thereof. It depends also on how you hit the service (in code), how your users hit the application, what sort of caching you're prepared to implement, etc. Use the storage mechanism that is more well suited to how you think and code. Keep interactions with that storage service as isolated ...


2

Sprocs are very good for implementing a secure data access layer - you write sprocs for reading and writing data, and give the client execute access to the sprocs only - no access to the underlying tables or views. This gives your DB an API that clients use, in much the same way as any class implemented in your business logic code would, but much more ...


1

But what if it isn't so simple and we really don't know what kind of thing we want to store, only that it is one of a finite set of well-defined things? This is precisely what a tagged union is for. You can emulate them in Java using an abstract base class with a private constructor, and final inner subclasses. The inner subclasses can use the private ...


1

You've got things the wrong way around. The model is not a poor replica of the data base. No programmer cares about the data base. The data base exists only so that in a future invocation, we can easily reconstruct the same state of our business objects as before. Data bases are strictly a means to an end. They allow some processing and offer some tricks to ...


1

Use a NoSQL database. There would be company and user documents. The users would have part of their schema dynamically created based on a user template (text to indicate fields/types for that company. \Company\<uniqueidentifier> - Name: <Name> - CreatedOn: <datetime> - UserTemplate: <Text> \User\<uniqueidentifier> ...


1

If you're frequently going to run into custom field requests, I'd actually model it pretty similarly to the database. Create a table that holds the metadata about each custom field, CompanyCustomField (who it belongs to, the data type, etc.) and another table CompanyCustomFieldValues which contains the CustomerId, FieldId and the value. If you're using ...



Only top voted, non community-wiki answers of a minimum length are eligible