336 reputation
6
bio website
location Bergen, Norday
age 26
visits member for 11 months
seen Apr 9 at 9:26
stats profile views 9

Worked as a TA in a database fundamentals course in university, so when I graduated and started working as a web developer at an IT company without a DBA, it was natural that I'd end up stumbling into the role of accidental DBA.


Feb
10
suggested suggested edit on Delete with subquery with no unique columns
Feb
10
comment DB2 error - SQL Statement too long or complex
Could you specify something more about where these values are coming from, how the query is built, used, etc.? It might be useful to know more about the problem domain.
Feb
10
revised DB2 error - SQL Statement too long or complex
added 163 characters in body
Feb
10
answered DB2 error - SQL Statement too long or complex
Feb
10
comment What relationship type to use for this messaging system?
You're welcome! I might not be an expert on DBA things, but TAing a university course on database fundamentals with a strong focus on taking a spec and turning it into a functioning database via an EER model and a relational model did at least leave me prepared for questions like this ;)
Feb
10
revised What relationship type to use for this messaging system?
Changed some of the table aliases to be more readable
Feb
10
answered What relationship type to use for this messaging system?
Jan
30
answered Select query from two tables which only specified rows
Jan
23
comment does a subquery pull the entire table?
You could do an EXPLAIN to see what's happening "under the hood". Edit: you don't mention which DBMS you're using, so I can't link to any documentation about how your DBMS uses EXPLAIN.
Jan
19
comment Question regarding 2NF partial key dependency
Can't BC->D be shortened to C->D since AB->C?
Jan
18
comment Slow Query Gets Even Slower After Indexing
Do you know if adding a UNIQUE index on (from_field, to_field) would have any impact on the query compared to using LIMIT 1?
Jan
12
answered How to disable ldf file or limit its size
Jan
9
revised Tuning query to remove joins for reporting
Improved formatting of second code block
Jan
8
suggested suggested edit on Tuning query to remove joins for reporting
Jan
8
answered Want to Get Brands In Wordpress Database Structure Saved as Custom Post types
Jan
4
revised Can I normalize my experimental data table further?
Improved formatting
Jan
4
comment Can I normalize my experimental data table further?
Glad to help. I updated my reply with a direct answer to your question about why to use the surrogate key {id} rather than sticking with the larger candidate key, in case you didn't see it (I'm not sure if Stack Exchange notifies you when an answer is update).
Jan
4
comment Can I normalize my experimental data table further?
If by (CK) you mean "Candidate key", that's not something you define in the database, it's just a theoretical concept which means the minimal amount of attributes that can be used to identify all other attributes in the relation. This means that they're not all candidate keys alone, but the combination {date, compund_type, location, method} is ONE candidate key, and {id} is the other. Your description of the compound table is correct.
Jan
4
revised Can I normalize my experimental data table further?
replied directly to one of OP's questions
Jan
4
revised Can I normalize my experimental data table further?
Added 3NF