database

Why can't an Oracle XMLType be sent over a DBLink?

I have some PLSQL code that calls a remote procedure in order to send an XMLType. What it does, though, is to devide the XMLType into multiple varchar2(4000) parameters, which the procedure accepts. The remote procedure is called via a DBLink. Why does the XMLType have to be split? Is this restriction applicable to recent database versi...

Is there anything as good as TOAD for Postgres (Windows)?

Hi guys, I'm just looking for a management tool like TOAD for Postgres. Anyone used a good one? Edit - I work mostly within the data itself and the database already has a mature model/design. I use the edit windows the most (well, in TOAD for Oracle anyway.) As far as I know, Toad only exists naturally for: Oracle, MS SQL, DB2 and My...

Opinion on TFS Database Edition

Database edition seems appealing but does anyone have any experience with it and how effective it is and how easy to manage? Does it work well for you in terms of source control of schemas, sql procs, concurrently? Is it worth it? ...

What's the best way to abstract the database from a PHP application?

My question is how does one abstract a database connection from the model layer of an application? The primary concern is to be able to easily change from different types of databases. Maybe you start with a flat file, comma-delimited database. Then you want to move to a SQL database. Then later you decide an LDAP implementation would be...

Ado.Net Entity : Objects get autoadded to database...

I have the following problem: I have a transactions database that contains transactions. When inserting new transactions I need to check if they already exist. I then have a list of transactions that are new, and those need to be added to the database. in code: List<Transaction> allNewTransactions = Parse(rawDataInput); #count = 100 ...

Most compatible way to listen for database changes?

I have a process that reads raw data and writes this to a database every few seconds. What is the best way to tell if the database has been written to? I know that Oracle and MS-SQL can use triggers or something to communicate with other services, but I was hoping there would be a technique that would work with more types of SQL databas...

How to get ODBC connection by name?

Given a User DSN how do I create an ODBC connection to that data source in .Net 3.5? ...

Entity Framework - Default Child Objects

Is there a way to set default child entities for a new entity without having to query all of them using ObjectQueries? ...

Finding and displaying duplicates

I have a table. I'd like to search within this table for duplicate titles. Lets say my data is as follows: title1, title2, title3, title1, title4, title2, title9 I'd like for my query to search this table and output only the duplicates. So the output would look like: title1 title1 title2 title2 I know how I can find the duplic...

Database Indexes

How would you explain to some one how indexes improve the performance of the database when used judiciously ? I am looking for a good, clear explanation since it's too complex out there in the books. ...

Is normalization necessary on this 2 column table?

I have 2 columns: "string" "int" I set both as primary keys for unique combination. Would searching based on the string column be poorer than normalizing further the string column and having 2 int columns instead? ...

Fast Search in Logs

I have the same problem as somebody described in another post. My application's log files are huge (~1GB), and grep is tedious to use to correlate information from the log files. Right now I use the ''less'' tool, but it is also slower than I would like. I am thinking of speeding up the search. There are the following ways to do this: ...

SQL Cascading delete without foreign keys?

I have the following tables: Country: Country_ID, CountryName Regions: Region_ID, RegionName, Country_ID Areas: Area_ID, AreaName, RegionID I am not using foreign keys and not planning to do so, all I wanna do now is to be able in one query in the tableAdapter of country table to delete Country and all related regions, areas... How? ...

What does the N in varchar(N) refer to

What does the N in varchar(N) refer to when describing a field in a database. Is it the number of characters or bytes. Also, one is using UTF-8, a character may use more than one byte. ...

How to extract a 0 before '.'

select 00.0004 ||' ' || 'USD/MT' from dual this gives the o/p as .0004 USD/MT I also want a 0 before the decimal so that i would get the result as 0.0004 USD/MT Can anyone help me out? ...

Storing multiple employee IDs in one column of data

Web app is being written in classic ASP with a MSSQL backend. On this particular page, the admin can select 1 or any/all of the employees to assign the project to. I'm trying to figure out a simple way to store the employee IDs of the people assigned to it in one column. The list of employees is generated from another table and can be d...

Adding a column efficently in SQL Server

I want to add an integer column to a table with a large number of rows and many indexes (Its a data warehouse Fact Table). To keep the row width as narrow as possible all the columns in this table are defined as not null. So I want the new column to be not null with a default of zero. From experience adding this column will take some t...

Need advice choosing a DB engine with easy design and editing frontend

I need to develop a database-based application that offers its users an easy-to-use UI to extend the DB as well as view and edit its contents. Its users will not be IT-savvy. They're the kind used to filling their data into several excel sheets. Up to now, those excel data sheets have been manually edited, causing consistency errors. A...

Dash in a field name in access database table

Hi, Im having problems retrieving a field from my ms-access database. The table name is TEST and one of the field's name is HD-TEST When i do: SELECT * from TEST where TEST.HD-TEST='H' and i execute the query, ms-access shows me a dialog expecting the parameter HD. Do you know what could be the reason? Thanks a lot. Kind Regards. ...

Inline SQL vs Stored Procedures

I know this is an age old debate but I'm curious as to what others do. I tend to use stored procedures for complex reports, user verification and other queries that aren't your typical SELECT, INSERT, UPDATE, and DELETE statements. It's my understanding that SPs are faster because they save the execution stack but is there a tangable di...