Reputation
5,801
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
10 28
Newest
 sql
Impact
~314k people reached

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
Apr
14
answered Proper indexes or anything else to optimize
Apr
14
comment speeding up a query on MySql
Which columns are varchar(200)? The source columns or the target columns? GROUP BY on 10 million rows will probably take a while.
Apr
14
revised Database design: Dividing multiple identical tables, good or bad?
Extended examples.
Apr
14
revised Database design: Dividing multiple identical tables, good or bad?
Extended examples.
Apr
14
answered Database design: Dividing multiple identical tables, good or bad?
Apr
13
comment Functional Dependencies and Normal Forms
Are you being asked to determine the normal form for the relation R{ WX Y Z }, or the normal forms for { WX Y }, { WX Z }, and { Y Z }? (When you write "determine the form of:...", the of usually refers to whatever comes after.)
Apr
12
comment How database administrators can see my requests to SQL Server?
"Is there any other ways to see my activity?" Who cares? Are you trying to keep your activity a secret from the sysadmins?