This tag specifies that the question is independent of any particular database and the sql should work in any rdbms.
Questions tagged [database-agnostic]
100 questions
1
vote
2 answers
Multiple Junction Tables Between Same Entities
I'm planning a database schema, and I've encountered a situation where I don't know the best way to proceed. I'm really looking for a list of pros and cons to each of my proposed solutions, perhaps followed by a recommendation for which would…

Aaron
- 228
- 2
- 9
1
vote
1 answer
Cross database query in C# to get Databases names list
I'm using Entity Framework 6 (EF6) with C#. I'm trying to write a DB agnostic query to get all the databases names list.
For example:
with SQL Server exists something like
select * from master.sys.databases
WHERE name NOT IN ('master', 'tempdb',…

Francesco Abbundo
- 33
- 8
1
vote
2 answers
The entity framework and database agnostic programming, possibilities?
We want to use the Entity Framework (.NET 4.0) to build applications that can deal with Sql Server, MySQL and Oracle. And maybe Sqlite too.
It should be easy to switch the db vendor by some setting in a config file.
Is this possible? I prefer real…

Theo
- 819
- 4
- 6
1
vote
5 answers
Does this behavior exist in all major databases?
mysql> select 0.121='0.121';
+---------------+
| 0.121='0.121' |
+---------------+
| 1 |
+---------------+
Does it hold for other database that number='number' is true?

user198729
- 61,774
- 108
- 250
- 348
1
vote
2 answers
Get Value from Previous row/next row SQL
i have a table with 3 fields. i.e.
id, transferdate, placeid
---------------------------
1 | 1-4-2014 | 14
2 | 4-4-2014 | 14
5 | 10-4-2014| 14
6 | 1-5-2013 | 13
9 | 10-6-2013| 12
What i would like to achieve...if possible...with a single…

ckinfos
- 121
- 1
- 8
1
vote
1 answer
guarantee child records either in one table or another, but not both?
I have a table with two child tables. For each record in the parent table, I want one and only one record in one of the child tables -- not one in each, not none. How to I define that?
Here's the backstory. Feel free to criticize this…

user151841
- 17,377
- 29
- 109
- 171
1
vote
2 answers
Database agnostic. ANSI SQL or ORM?
I work in an project that most of the code is written in PL/SQL. We need to refactor the code to support SQL Server (and if possible in the future to be database agnostic). They decided to transform the PL SQL code to ANSI SQL but for some reason it…
1
vote
1 answer
Stop execution of batch file on error for sqlplus in oracle
I am having 4 files named
test.bat which contains
@echo off
C:\oraclexe\app\oracle\product\10.2.0\server\BIN\sqlplus -s -l user/pass@localhost…

Rajubhai
- 107
- 4
- 13
1
vote
2 answers
design for 'simple' inventory system
I want to make a relational database system for a local computer hardware non-profit. There are two inter-related features that I want to figure out how to implement. First, we need to manage our inventory of parts, and second, we need to track…

user151841
- 17,377
- 29
- 109
- 171
1
vote
1 answer
Django : How to manage database specific code?
I am using the postgres unaccent feature for a django project.
This makes my app database specific and I want to be able to use some others databases (postgres without with extension or others). In this case of course, I don't use unaccent
I would…

luc
- 41,928
- 25
- 127
- 172
1
vote
3 answers
Number of times a nested query is executed
How many times will this nested sub-query be executed?
SELECT CID, CNAME
FROM CUSTOMER
WHERE EXISTS ( SELECT CID
FROM RENTALS
WHERE CUSTOMER.CID = RENTALS.CID
AND PICKUP = 'CARY' )
This…

Gaurang Tandon
- 6,504
- 11
- 47
- 84
1
vote
7 answers
Difficult Temporal Cross-Table Database Constraint
I have a particularly difficult business constraint that I would like to enforce at the database level. The data is financial in nature, and so must be protected from inconsistencies to the nth degree – no trusting the business layer with this…

Isabelle Wedin
- 1,345
- 10
- 26
1
vote
3 answers
Software as a service - Database
If I am building a CRM web application to sell as a membership service, what is the best method to design and deploy the database?
Do I have 1 database that houses 100s of records per table or deploy multiple databases for different clients?
Is it…

Theo
- 135
- 2
- 8
1
vote
2 answers
SQL select certain number of rows
Hello I need a SQL query statement that gets me rows 'start' to 'finish'.
For example:
A website with many items where page 1 selects only items 1-10, page 2 has 11-20 and so on.
I know how to do this with Microsoft SQL Server and MySQL but I need…

Ray Stanz
- 81
- 1
- 8
0
votes
1 answer
How are constraints defined in schema? Is it by Store Procedure, User defined function or T-SQL or PL/SQL in the Database?
How does SQL Server or Oracle or any database server applies constraints on the table>
I am aware of constraints, but how they are applied on the table or a column? I tried to find how SQL Server understands a requirement for a constraint and…

Andrew
- 179
- 2
- 15