database-agnostic Questions
7
Solved
If I have two objects that have a many-to-many relationship, I would typically model them in my database schema with a many-to-many table to relate the two. But should that many-to-many table (or "...
Eatmon asked 21/12, 2010 at 21:0
2
Solved
I'm currently using Oracle, but most of the SQL is db agnostic. One exception is CURRENT_TIMESTAMP which fails in MSSQL. Is is possible to move to a more portable syntax for this too?
Interrogative asked 12/12, 2013 at 10:47
27
Solved
I am trying to INSERT INTO a table using the input from another table. Although this is entirely feasible for many database engines, I always seem to struggle to remember the correct syntax for the...
Terracotta asked 25/8, 2008 at 12:45
8
This question is about database views, not materialized-views.
Pros:
Query simplification.
Avoid repeat the same joins on multiples queries.
Avoid magic numbers.
Cons:
Hiding real queries (m...
Jankey asked 10/3, 2009 at 13:37
6
Solved
Does "group by" clause automatically guarantee that the results will be ordered by that key? In other words, is it enough to write:
select *
from table
group by a, b, c
or does one have to writ...
Admonish asked 26/1, 2015 at 12:9
9
Solved
I realize this question is very likely to have been asked before, but I've searched around a little among questions on StackOverflow, and I didn't really find an answer to mine, so here goes. If yo...
Kenleigh asked 31/5, 2009 at 14:12
2
What, if any, is the difference between the following?
FROM table1
LEFT JOIN table2 ON table1.key = table2.key
LEFT JOIN table3 ON table2.key = table3.key
and:
FROM table1
LEFT JOIN table2
LEFT J...
Isogamete asked 6/8, 2018 at 11:28
0
I'm struggling to port a console app from .NET Framework 4.6.2 to .NET Core 2.0. The app needs to connect to a database whose platform is not known at compile time. In the full framework this was e...
Kalinin asked 26/11, 2017 at 10:6
4
Solved
Hibernate's Criteria API has Restrictions.ilike function which has the following contract:
A case-insensitive "like", similar to Postgres ilike operator
That's cool. But the same class also ha...
Seidule asked 1/3, 2011 at 20:56
6
Solved
I was wondering, is there a way to create a timestamp in c# from a datetime?
I need a millisecond precision value that also works in Compact Framework(saying that since DateTime.ToBinary() does not...
Dost asked 21/5, 2009 at 9:28
6
Lets assume the following table:
Name SubName Message Time
USA MA M1 1
USA NY M2 2
USA WA M3 3
USA MA M4 4
USA WA M5 5
USA NY M6 6
FIN HEL M7 7
FIN TAM M8 8
FIN HEL M9 9
I want a SQL query which...
Rabinowitz asked 10/8, 2016 at 12:57
4
I am wondering if there is a generic way to create an "ordered index" with liquibase. Something that will produce these kind of SQL statement:
CREATE INDEX idx_name ON my_table (m_column DESC)
...
Stringed asked 14/8, 2012 at 15:6
2
Solved
I am trying to use querydsl for building dynamic queries for dynamic schemas. I am trying to get just the query instead of having to actually execute it.
So far I have faced two issues:
- The sche...
Veinule asked 10/2, 2014 at 22:28
3
Solved
While looking for java libraries to build queries in a database agnostic way I came across many including iciql, querydsl, jooq, joist, hibernate etc.
I wanted something that does not require conf...
Mamiemamma asked 6/2, 2014 at 23:0
8
Solved
What is the best database schema to represent an NCAA mens basketball bracket? Here is a link if you aren't familiar: http://www.cbssports.com/collegebasketball/mayhem/brackets/viewable_men
I can ...
Sarilda asked 16/3, 2009 at 12:20
6
Solved
I have a cms which stores comments against articles. These comments can be both threaded and non threaded. Although technically they are the same just with the reply column left blank when it's not...
Revolution asked 10/5, 2009 at 21:59
4
What is database clustering? If you allow the same database to be on 2 different servers how do they keep the data between synchronized. And how does this differ from load balancing from a database...
Valaria asked 22/7, 2009 at 5:32
5
Solved
If I do
INSERT INTO table1 (datetime1, datetime2) VALUES (NOW(),NOW())
Will the two fields always be identical in both columns?
Ditto for
INSERT INTO table1 (datetime1, datetime2) VALUES (N...
Accurate asked 1/9, 2011 at 13:8
1
Solved
I know this type of question has been asked before, but I could not find one that compared the options I have in mind. So I am going to post them here, please post links if there are duplicates.
T...
Zincate asked 31/8, 2011 at 14:37
4
There are two ways to store enum types in database: as a string or as an integer.
Saving the enumeration ( sex = {male,female}, account_type = {regular,pro,admin}, etc. ) as strings makes things m...
Tooth asked 18/7, 2011 at 11:11
4
Solved
I have a bunch of products with a bunch of different possible attributes for each product. E.g. Product A has a name, size, color, shape. Product B has a name, calories, sugar, etc. One way to solv...
Inaccuracy asked 24/6, 2011 at 19:51
2
Possible Duplicate:
Can I protect against SQL Injection by escaping single-quote and surrounding user input with single-quotes?
We have a legacy app that doesn't do queries using posi...
Cumulus asked 4/3, 2010 at 14:37
3
Solved
Many product developers want to write a .NET application which will work seamlessly with any popular RDBMS like SQL server, oracle, DB2 , MySql. If we use the Data application block it dynamically ...
Erigena asked 8/11, 2009 at 16:6
3
Solved
Is anyone aware of a vendor neutral XSD to describe a relational database schema? Our system needs to grab information about the structure of a database:
Tables
Columns and types
Primary and For...
Filefish asked 19/6, 2009 at 18:40
1
Solved
Like an idiot, I completely overlooked the timezone setting when I first built an application that collects datetime data.
It wasn't an issue then because all I was doing was "time-since" style co...
Molluscoid asked 27/3, 2009 at 13:48
1 Next >
© 2022 - 2024 — McMap. All rights reserved.