I'm familiar with the java.sql.DatabaseMetaData interface, but I find it quite clunky to use. For example, in order to find out the table names, you have to call getTables and loop through the returned ResultSet, using well-known literals as the column names.
Is there an easier way to obtain database metadata?
...
Based on the StackOverflow data dump, it seems that S.O. represents questions and answers as a single table - Posts.
However, a question has a title, a body and tags associated with while an answer only has a body. To me, at least, this indicates that they are distinct enough that they should be separate tables.
Besides, I don't like...
Hi,
I am not deleting records permanently (just maintaining flag) but I'd like to know how cascading delete / update works in LINQ-to-SQL class.
EDIT
If I have similar situation e.g. maintaining flag for Delete option. How do you achieve Cascading Delete for your database?
...
Excuse the long question!
We have two database tables, e.g. Car and Wheel. They are related in that a wheel belongs to a car and a car has multiple wheels. The wheels, however, can be changed without affecting the "version" of the car. The car's record can be updated (e.g. paint job) without affecting the version of the wheels (i.e. ...
As part of the requirement we need to process nearly 3 million records and associate them with a bucket. This association is decided on a set of rules (comprising of 5-15 attributes, with single or range of values and precedence) which derive the bucket for a record.
Sequential processing of such a big number is clearly out of scope.
Can...
I'm no DBA, but I respect database theory. Isn't adding columns like isDeleted and sequenceOrder bad database practice?
...
What is currently the best solution for WPF applications which are meant to be used on one computer where various users log into them and use them to get/save information locally? Here's how I see the options:
MDF would seem to be the best choice since I assume you can lock it down quite well so that even though users can access the .m...
Hi
what is faster query ?
select Name from Worker
or
select TOP(1) Name from Worker
I have 1,000,000 records
thank's in advance
...
I need to write a report that generates summary totals against a table with date ranges for each record.
table data:
option start_date end_date
opt1 6/12/2009 6/19/2009
opt1 6/3/2009 6/13/2009
opt2 6/5/2009 6/6/2009
What I want out is basically this:
date option count
6/1/2009 opt1 0
6/1/200...
In an application similar to StackOverflow that I am building, I am trying to decide what relationship my Questions, Answers and Comments tables should have.
I could have Questions and Answers both be represented by a single table Posts.
That would allow Comments to have a single foreign key to Posts.
But if Questions and Answers are ...
How would you go about making an application that can edit it's own look and feel?
Can tweak its own XAML files? then reload them. I'm thinking a notepad-like text editor, not a visual designer.
All the event/code would be bound right after display from an "iron" scripting language.
...
There has been some discussion on the SO community wiki about whether database objects should be version controlled. However, I haven't seen much discussion about the best-practices for creating a build-automation process for database objects.
This has been a contentious point of discussion for my team - particularly since developers a...
Assuming this is the correct Ansi SQL syntax for a left outer join:
SELECT *
FROM employee LEFT OUTER JOIN department
ON employee.DepartmentID = department.DepartmentID
And this is the correct Ansi SQL syntax for a right outer join:
SELECT *
FROM employee RIGHT OUTER JOIN department
ON employee.Departme...
I'm about to start my first LINQ (to Entities) 'enabled' project, and it immediately strikes me how easy it is to draft SQL queries in SQL Server vs. writing and running code to check results. What do people usually do here? Prototype in T-SQL then implement in code, or use a tool, or what?
...
I have a purely academic question about SQLite databases.
I am using SQLite.net to use a database in my WinForm project, and as I was setting up a new table, I got to thinking about the maximum values of an ID column.
I use the IDENTITY for my [ID] column, which according to SQLite.net DataType Mappings, is equivalent to DbType.Int64. ...
How often do you refresh your development database from production database?Since there are many types of projects (targeting different domains) I would like to know how it is being done and at what intervals(days/months/years) it is being done ?
thanks
...
Using the update command, I want to change the type_name for a specific entry in the database, but it is changing the type_name for all the entries with the same type_id.
I need it to only change that individual entry's type_name, and not the type_name that is associated with all the entries with the same type_id.
I have an update quer...
I've the following DB structure in SQLite:
I want to create a trigger that whenever I delete a country all the related districts, municipalities and parishes are also deleted (like MySQL InnoDB), I've tried using SQLite triggers and came up with this:
Districts:
CREATE TRIGGER [delete_country]
BEFORE DELETE
ON [countries]
FOR EACH R...
I am sending data from a linux application through serial port to an embedded device.
In the current implementation a byte circular buffer is used in the firmware. (Nothing but an array with a read and write pointer)
As the bytes come in, it is written to the circular bufffer.
Now the PC application appears to be sending the data too f...
After a breakdown on my virtual webhost, they finally restored the container, but now I randomly get the error when I try to execute queries. I can do a
Select top 20000 from Orders
But
Select * from Orders (about 100k rows total)
Receives the error in my management studio:
A transport-level error has occurred when rece...