JamesRyan
  • Member for 10 years, 3 months
  • Last seen more than 2 years ago
  • GB
2 answers
-4 votes
964 views
How can I generate Cassandra data model from a MySQL schema?
12 votes

The whole point of NoSQL is that it doesn't use the same type of datastructures as an SQL database. It requires a whole different way of thinking and approach with your app, so there isn't something ...

View answer
6 answers
33 votes
11k views
Why don't databases create their own indexes automatically?
6 votes

They can analyse past queries and suggest/create indexes however this doesn't work optimally because indexes strike a balance to speed up what you want optimised at a cost and the server can not know ...

View answer
3 answers
0 votes
252 views
Resume job 'A' at some step till job 'B' is completed
5 votes

You are using jobs incorrectly, the steps from job B should simply be in job A. Use stored procedures to group and reuse common code not jobs. However it is possible to do this, in which case this is ...

View answer
2 answers
6 votes
7k views
When is a result returned deterministic and when not?
4 votes

Rows are not returned in any specific order in SQL (in reality they are likely to be in the same order most of the time) so without an ORDER BY any of the rows could be returned first. So it is non ...

View answer
4 answers
12 votes
2k views
Is it poor practice to aggregate data from different tables into one?
3 votes

By all means put it into a standardised set of tables so that you can tweak the import stage rather than having to change complex report(s) and queries. But the data should still be normalised which ...

View answer
2 answers
1 votes
807 views
Why are my results returned twice?
3 votes

That's how joins work! Don't select the wall posts in the same query if you just want the comments.

View answer
1 answers
2 votes
670 views
Why is a duplicate record inserted when it should not be?
Accepted answer
3 votes

This turned out to be a red herring. When pgadmin gets disconnected midquery, it returns the last error again even if it was an entirely different command! :)

View answer
1 answers
3 votes
160 views
Restore diff backup only on SQL Server
Accepted answer
3 votes

No, the differential backup is based on the differences since the main. It doesn't contain a full usable structure.

View answer
3 answers
9 votes
19k views
How to free SQL Server memory?
3 votes

It will give up the memory it is not using automatically as other apps try to commit it.

View answer
1 answers
3 votes
282 views
SQL Server Replication w/o network connection
2 votes

If you use log shipping, you can do the copy operation of the transaction log backups manually to take them from one server to the other.

View answer
1 answers
0 votes
48 views
Is reading a single record always an atomic operation?
2 votes

In an ACID compliant database it is atomic

View answer
3 answers
6 votes
2k views
Representing N:N relation as a functional dependency in a database design
2 votes

I don't know how to write this out in the above format but you are going to have a table for books, and a table for categories with a foreign key to the book. If there were more columns for the ...

View answer
3 answers
1 votes
8k views
Why are my SQL Server 2008R2 databases not mirroring?
2 votes

You shouldn't restore it with recovery, that leaves an active db. To apply transaction logs you need to use with norecovery (restoring) or with standby (read only).

View answer
1 answers
0 votes
34 views
Store last elements in a dedicated table
1 votes

It is likely that you would partition the table by time or region, etc. Also this is what indexes or caching already do. So your idea could be appropriate but you need to think about whether you are ...

View answer
2 answers
3 votes
2k views
How to design future proof tables?
1 votes

Where info is personalised it should be normalised into linked tables that only join to rows where that optional column has been added. Also if you might be adding many columns or long data it is ...

View answer
4 answers
5 votes
16k views
Finding all date ranges that overlap a target date range
0 votes

Generate a calendar table (that's googleable) and join your other tables to it. This makes it easy to do overlaps, etc. in an efficient way. In case it is not clear this is the standard way. I ...

View answer
2 answers
3 votes
292 views
Is two unrelated tables with foreign keys to a third table breaking first normal form?
0 votes

Whether it is fine depends on usage. If you treat business and personal addresses differently in any way then they should be two seperate tables otherwise one is fine. Being overgeneric and reusing ...

View answer
3 answers
0 votes
128 views
Is it good practice to create new tables for new elements in a database?
0 votes

Your model above works for a list of flowers where the garden is not relevant. But it wouldn't work when flowers or gardeners could be in multiple gardens. You should have a table for each type of ...

View answer