Mike Sherrill 'Cat Recall'

less info
5,237 reputation
823
bio website
location United States
age
visits member for 3 years, 5 months
seen 2 days ago

Database design and software development consultant. My clients included everything from Fortune 100 companies to non-profits and mom-and-pop companies. I've worked with SQL databases since 1985. I'm a database generalist; I'm comfortable with every modern SQL dbms. My home server runs a half-dozen different database management systems. I test most of my answers under more than one of them.

I've developed relational models for implementation in non-SQL environments, like Lotus Notes and plain C++ code.

I also develop software in C, VBA, Python, Ruby, and php. I build web applications using various frameworks and languages, including Ruby on Rails, Laravel, and Phalcon.


Apr
25
comment Enforce indirect relationship
You could well be right. That would be one of the hoops.
Apr
25
answered Enforce indirect relationship
Apr
25
answered Which of tables key to reference?
Apr
25
answered What is the benefit of two FK, when one of them can be deduced from another table?
Apr
24
comment Is this table in 3NF?
Neither normalization nor 3NF depend on my perspective or on my opinion. 3NF depends on eliminating transitive dependencies. Where's the transitive dependency in the original table? Even if there were one, it wouldn't justify the decomposition we see in this answer. No principle of normalization justifies what we see in this answer.
Apr
23
comment Is this table in 3NF?
"The argument goes that country depends on state and state depends on city." That's not true, though, is it? State certainly doesn't depend on city in the USA; we have dozens of Springfields. There are Santa Cruzes all over the world. (Springfields, too.) A foreign key can eliminate spelling errors and typos, but that won't affect the normal form. Any time you introduce an ID number--let alone three different ID numbers--in the name of normalization, you're almost certainly on the wrong track.
Apr
23
comment Is this table in 3NF?
If it's not in 3NF, there must be a transitive dependency. Where's the transitive dependency?
Apr
21
comment Help with modeling this table
Over the course of their careers, employees will have many companies. But at a single company, they also have something like a department (maybe more than one), a hire date, maybe a termination date, etc. What additional information do you want to store besides "Fred works for Slate & Co" and "George works for Spacely Sprockets"? Anything?
Apr
21
comment Help with modeling this table
I can imagine several different 5NF schemas for this. It depends mostly on how you want to model employer/employee relationships. How do you want to do that?
Apr
20
comment Creating sequence for longer numeric values
Is it ok to have gaps in the sequence?
Apr
19
comment Unsure how to implement certain constraints and relations in this relational database schema
MySQL doesn't enforce CHECK() constraints. Sometimes, you can replace a CHECK() constraint with a foreign key constraint. (But not this time.) The only practical way to implement "arrival city is different from departure city" in MySQL is with a trigger.
Apr
19
answered PostgreSQL and default Schemas
Apr
17
comment How to permanently delete a row in oracle forever
Define "ever". Are we allowed to recover deleted data by restoring from a year-old offsite backup tape?
Apr
17
answered In Postgresql, is it possible to change the maximum number of columns a table can have?
Apr
16
comment Database design: Dividing multiple identical tables, good or bad?
Yes, more tables for more referential integrity. (But there's no "areas" table. There could be, though.) Usually you trust the local admins to a certain extent. They have a vested interest in being careful. People who take reservations over the phone wouldn't have insert or update permissions on "seats".
Apr
15
comment Database design: Dividing multiple identical tables, good or bad?
If you're confident in your data entry people, you can drop the check constraint for "area". In general, the more "flexible" your situation, the more tables you need to keep out bad data.
Apr
15
revised Proper indexes or anything else to optimize
Faster hardware.
Apr
14
comment Database design: Dividing multiple identical tables, good or bad?
Thank you, Sid. I hope you know that I'm going to quote you on my CV.
Apr
14
awarded  Enlightened
Apr
14
awarded  Nice Answer