Reputation
7,110
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
1 9 23
Newest
 Explainer
Impact
~151k people reached

Apr
9
comment DISTINCT Role in SELECT
I'm guessing that you have 3,074 agents and they each match your various criteria at least once.
Mar
30
comment How to insert values in junction table for many to many relationships?
@siddhesh - @@IDENTITY is SQL Server. I have corrected this answer to reflect MySQL, which is one of the OP's tags. The MySQL equivalent of @@IDENTITY is LAST_INSERT_ID().
Mar
30
revised How to insert values in junction table for many to many relationships?
Corrected answer for MySQL syntax (vs. SQL Server)
Mar
23
answered db schema for a object with multiple foreign key tables
Mar
19
revised Database design - Projects with multiple Clients but only specific client contacts
Added an illustration for clarity
Mar
18
answered Best away to keep monthly records of loans
Mar
18
answered Should I have a parent table with only one field?
Mar
18
answered Database design - Projects with multiple Clients but only specific client contacts
Mar
18
comment database design question - How to make the table 3NF and have no orphans
+1 for mapping close to reality.
Mar
15
revised Which databases can meet these replication requirements?
Modified tags to get the right eyes on this question
Mar
15
answered How can I compare the schema of two databases?
Mar
15
answered Warehouse Database Design Question
Mar
14
revised How to insert values in junction table for many to many relationships?
Fixed typo
Feb
17
comment School fees database design
All financial databases should begin with a double-entry accounting design. Students are customers and will have accounts. Fees are like products that students buy. Find a good reference design for accounting and product sales and apply it to your system.
Feb
1
revised Getting sum result for last year divided quarterly
Corrected spelling, grammar and punctuation to make the question easier to understand.
Jan
31
comment Product Attribute System While Avoiding EAV
I've discussed using EAV for product catalogs on Stack Overflow here: stackoverflow.com/questions/11779252/… - EAV is evil, except when it is actually the best approach. Attributes of products in a catalog is one where EAV is often the most efficient and suitable design.
Jan
27
comment Multiple user roles with different attributes
Your sections are connected, but your diagramming tool doesn't see it because you didn't define the referential integrity in your DDL (or your modeling tool) properly. Note that every specialty role has a key of user_id. This should be FK to Users.id. In other words, Users is a super-type and admins, employees, customers, etc. are all subtypes related 1:0,1 to the super-type.
Jan
27
comment linking a single table (comment) to multiple tables (article,link,attachment)?
This question was essentially asked yesterday, see: dba.stackexchange.com/questions/90137/… The linked question is about sharing addresses, but the same discussion applies to sharing comments, links, etc. etc.
Jan
26
answered Normalising shared entities and applying constraints
Jan
19
comment Design: how to store lots of booleans?
@AleksandrMakov - A "pure intersection" is a table containing only foreign keys that together make a composite primary key for the table. OBJECT_HAS_THING would be a pure intersection if the only columns in that table are my_object_id and ownable_thing_id and if both of these columns together are the primary key of the table. If you added a third column to this table, say has_one (bit) then it would no longer be a pure intersection.