Tag Info

New answers tagged

2

A better index would be (assuming ORDER BY IdTrackerPosition DESC is correct, and the query should not specify ORDER BY [Date] DESC instead): CREATE UNIQUE INDEX i -- Choose a better name! ON dbo.TrackerPositions (TrackerId, IdTrackerPosition DESC) INCLUDE (Position, [Date], Speed, NbSatellites, Direction, HDOP); The execution plan should look ...


3

Your index should be on (TrackerId ASC, [Date] DESC) INCLUDE (Position) so that it can easily locate the most recent one for each Tracker. But I really don't like the query from EF. Edit: ...because "most recent" should mean "latest datetime", not "latest identity value"


2

At first glance, I see lots of inconsistent naming--Person_ID, but PasswordHash (or worse, SchoolYear_ID). Pick a naming convention, and stick with it. I promise you that your future self with thank you! On your Classes table, you have a Student_ID column. As far as school goes, many students take one class, so class should have a 1:n relationship with ...


0

I solved this issue using a non-free ORM http://www.devart.com/dotconnect/postgresql/articles/tutorial_ef.html


3

Either of these models look reasonable. The NoticeMasterFile intersection table is not strictly needed since you can get the information through either model. The question is: How do you intend to use the NoticeMasterFile information? Perhaps this change would support some future plans that you have. Of course, the problem is that looking at a data model ...


1

Relational modelling starts for the identification of classes of "things." To these we apply normalisation to remove data update anomolies. The results are implemented as tables with a column for each attribute we identify. We do not start from a bunch of domains, look around for "things" with the same bunch of domains, shoehorn them into the same table ...


0

I would suggest reading this whitepaper on database version control from DBmaestro TeamWork (where I work) Basically, it discuses how database enforced change management combines the enforcement of version control processes on the database objects with the generation of the deployment script when required based on the version control repository and the ...



Top 50 recent answers are included