Tag Info

New answers tagged

0

One way to understand what's going on with normalization is to find out what normalization buys you. In other words, what's going to happen if you depart from any given normal form? For normalization forms second through fifth normal forms, the answer is "update anomalies". That is, when you insert, update, or delete rows, can you end up leaving things ...


0

Here some real world expirience: I was working on very large database with structure like this one. Back then I decided to use 'Multi-tenant schema seperated architecture' based on this article https://msdn.microsoft.com/en-us/library/aa479086.aspx When you considering to use this design in postgres, take in account that: 1. You need to write a management ...


0

About CMS versioning; for drupal it makes a special table for every field of the entity that stores the old value ; such a concept alllows you a fine manipulation of your data but i think it's expensive, my own solution is to convert my object to xml format and store it as string with the other fields( changetime, id...)


1

Simply include in your model a choice table for each type of choice that your Your field choice_type_id is essentially a kind of partitioning attribute. It indicates what type of child table is applicable. So far you have three tables: MULTIPLE_CHOICE, BINARY_CHOICE, and FREE_TEXT (although you might consider binary choice to be a special case of multiple ...


1

It depends. There are cases whether one design or the other are satisfactory. If you are doing a lot of queries only on the preferred or default entry, then the second option seems better. If, however, you are normally doing lots of queries for all the entries, regardless of whether they are preferred/default or not, the first option is a little easier ...


2

When ER Modeling was introduced in the 1970s, the intent was to provide a model that was not biased towards one particular implementation. People were constructing relational models of a given project, even if the intent were to implement on a hierarchical or network database. This evolved into what I learned as conceptual modeling, and that's probably ...


1

Another option is to use SQL Server Data Tools (SSDT), an extension of Visual Studio. You can extract your database schema as a .dacpac file and compare that with another .dacpac file or an existing database. SSDT is included with SQL Server 2012 client tools, making it pretty accessible. You can find the full instructions of how to run the compare on the ...


0

The easiest way is to use an automated tool built for this purpose, but if you don't have access to one, you can get all of the basic information that you need from the INFORMATION_SCHEMA views. Using the metadata in INFORMATION_SCHEMA is probably an easier option than generating DDL scripts and doing a source compare because you have much more control over ...


1

If you cannot use one of the many tools out there because of connectivity problems and want an "offline" compare, you can use SSMS to generate scripts for all database objects by right clicking on the database and using the "Tasks.../Generate Scripts" function, and make sure you select to create one file per object. When you have done that for both ...


0

Do a search for "SQL Server Compare" and you'll find lots of tools. The one we use at my job is Red Gate SQLCompare. It has a 14 day trial. But since you are talking about two different environments I don't think that would work for you, unless the client sends you a backup of their DB. The other option is to write queries against the system tables (like ...


0

Obviously, you are dealing with the same tables in each user schema. Have you considered inheritance for this? It can give you the best of both worlds for some use cases. There are also some limitations. You can have a separate schema for each user and still search all user tables at once very conveniently. Related: Select rows from table where each row ...


3

I have an EAV for tracking server / database configuration. It's great for getting data in. We can throw any data at it and the loader ensures the "E" and the "A" reflect the data given. Once we got over a few hundred million rows in the Values table, however, getting data out became increasingly problematic. (I think having 400-column PIVOT queries ...


8

EAV is not evil; like any other tool, it can be implemented poorly and abused. You can find articles trash talking cursors, dynamic SQL, triggers, even SQL Server itself. That doesn't make them bad things. EAV can be an appropriate solution. Whether it's the right answer in your specific case is probably more opinion-based than anything; I'm answering more ...



Top 50 recent answers are included