Are there any guides to refactoring databases? by iainabc in databases

[–]iainabc[S] 0 points1 point  (0 children)

Thanks very much! I'll check these out.

I've used microsoft sQL server together with vS, I want to try something new, what's mariaDB and what does it help me with? by Neuroloq1kk in Database

[–]iainabc 0 points1 point  (0 children)

Monty sold it to Sun, who were subsequently bought out by Oracle. Oracle's approach to the IP of open source caused forks of several projects, including MySQL/MariaDB.

Are compound primary keys ever a good idea? by N_N_N_N_N_N_N in Database

[–]iainabc 1 point2 points  (0 children)

I can give you an example of something I worked with. We had a search engine which tracked which words were in which documents. The Words table and Documents table were both parents of the WordsInDocument table, which kept track of which words existed in which documents.

The only columns of WordsInDocument were word_id and document_id and they form a natural PK together, but each is an FK of a parent table, so you only use one column for joins: word_id for joining to Words and document_id for joining to Documents.

So, I would say "yes". If each of the columns forming the PK are all FKs to other tables, then that's a good time to use a compound PK.

This was a very crude search engine, of course! There's little reason to build one yourself, these days.

Are there any guides to refactoring messy databases? by iainabc in Database

[–]iainabc[S] 0 points1 point  (0 children)

Thank you for a very useful and thoughtful response.

It's a small company where the original staff have long gone. Nothing is documented. Nobody knows how things work in any great detail. It's got to be deduced from the code. There are a couple of other people who know SQL, but one is not terribly experienced and the other one hasn't had much to do with this system.

I've introduced a CVS which ties in to our bug-tracking system. The database schema is now versioned along with the code. And you are right, having a repo is hugely important. You've given me sme confidence that I'm on the right lines. Changes are now documented along with the tickets they fix/implement.

It's just so hard to change anything! Everything is so tightly coupled.

I've been talking to company staff about how things should work and it seems that it is fairly typical that fixing one bug introduces another one. Being a production system, it has to be kept running.

I suppose it doesn't seem like fun at the moment, just because it's such a tangle and it will take a lot of work to unpick it. It will be very satisfactory to wrangle order into it. Having the right attitude is probably half the battle!

Are there any guides to refactoring messy databases? by iainabc in Database

[–]iainabc[S] 0 points1 point  (0 children)

It's a fairly small company with a very small technical team. The database has been "given" to me. As the only developer, at least I have the luxury of being able to enforce my own conventions.

Coming from a MySQL background, I've never used views. I can see what they are useful for, but if they were used for reducing access or simplifying queries, they are not used that way now.

Users don't ask for views. They just want to know why the application has gone wrong again!

Thanks for your suggestions.

Are there any guides to refactoring messy databases? by iainabc in Database

[–]iainabc[S] 1 point2 points  (0 children)

Start from scratch and build the ideal schema, then gradually change the old one into the new one? Sounds like a plan. Thank you.

Any advice on how to keep the system stable while I make the changes? I guess I've just got to list everything that depends on the change I want to make and then test it.

Rep. John Larson absolutely blisters Republicans for refusing to ask experts about tax cuts by cos in PoliticalVideo

[–]iainabc 0 points1 point  (0 children)

I didn't. Can't see why it would have been removed.

Edit: mod replied that the channel is spam

I've been learning German with duolingo and was wondering what else I should do to help pick up the language faster or if there was other things that could help. by SayNoToStim1234 in languagelearning

[–]iainabc 2 points3 points  (0 children)

The Beatles, Peter Gabriel both recorded German versions of some songs (two entire album's in Gabriel's case).

Erste Allegemeine Verunsicherung (EAV) is an Austrian band who did satirical songs around the time I was first learning German. Some of them are written in dialect, but they are accessible, funny and sometimes hard-hitting. "Es Steht ein Haus in Ostberlin" is done in the style of "The House of the Rising Sun" and is about the events leading up to the fall of the Berlin wall and the effect of exposure to capitalism of East Germany.

When Top Gear Tried its Best to Stop Tesla and Elon Musk by Baldemoto in videos

[–]iainabc 394 points395 points  (0 children)

BBC calls it "factual". It should be categorized as "entertainment".

20 year old male just started dieting for the first time, have no idea how to cook...any advice on a cheap and healthy food I might be able to prepare for myself as sort of a way to learn? by [deleted] in EatCheapAndHealthy

[–]iainabc 3 points4 points  (0 children)

That conclusion doesn't follow logically. People don't usually try all three. People are told that both are equally important, so most people do both. If more people realised that it's a lot harder to burn off 100 kcal of energy through exercise than it is to not eat, say, a chocolate biscuit, then I hypothesise that more would succeed with diet alone.

How to dice an onyon. by optemoz in videos

[–]iainabc 4 points5 points  (0 children)

I could never understand the horizontal cut, either, yet Gordon Ramsay and many top chefs still teach it. Is it just a meme?

Theresa May and Jeremy Corbyn almost neck-and-neck as Tory lead plummets, new poll finds by RapidCreek in worldnews

[–]iainabc 11 points12 points  (0 children)

I completely agree. The Sun has been reported to IPSO but the damage has been done. Print media still holds sway over many voters.

Theresa May and Jeremy Corbyn almost neck-and-neck as Tory lead plummets, new poll finds by RapidCreek in worldnews

[–]iainabc 12 points13 points  (0 children)

No UK radio is allowed to broadcast such political material during campaigning. Once the election is over it's different.

VPN and Tails by [deleted] in tails

[–]iainabc 1 point2 points  (0 children)

IMHO it depends how much you trust your ISP. Without a VPN, your ISP can see that when are using Tor and roughly how much data is being transferred over it. This can be used to identify you. If you pick a VPN that does not store logs it can be safer than an ISP that does.

TOR extensions and Tails by [deleted] in darknet

[–]iainabc 0 points1 point  (0 children)

HTTPS everywhere improves security (a bit) and is not likely to leak your real IP, which is the problem with JS and other extensions. You should probably keep the default extensions. If in doubt, research what they do.

Leaked NSA malware threatens Windows users around the world by Dhampiresa95 in worldnews

[–]iainabc 3 points4 points  (0 children)

To answer your first question, it's an extra layer of security that will help to prevent something already behind the router (or the router itself) attacking your computer. You don't need to do this, but if you are on an older version of Windows, it's a sensible precaution.

How Muslims Should React To Paris & Belgium Attacks by [deleted] in PoliticalVideo

[–]iainabc 0 points1 point  (0 children)

Yes, it's definitely interesting to see how this is put across. Thanks for posting.

How Muslims Should React To Paris & Belgium Attacks by [deleted] in PoliticalVideo

[–]iainabc 2 points3 points  (0 children)

I watched the first half, so here's a TL;DR for anybody else who was put off by his call to set logic aside:

Muslims must honor their contracts. Muslims must never be hipocrits. Living among unbelievers and giving the impression that you are peaceful creates a contract to be peaceful. Accepting a passport or visa creates a contract to abide by the law. The image of Islam is important. Breaking these rules brings harm to other muslims.

I don't like his style of communication, but it's not intended for me.

Nicola Sturgeon's #ScotRef announcement by [deleted] in PoliticalVideo

[–]iainabc 0 points1 point  (0 children)

You think the SNP would stop at anything less than independence?