Hello all,
is there a documentation of the pubs database (it comes as a demo DB for SQL 2000)? for example, what is the roysched table? what represents lowqty and hightqty and discount columns from the discount table? minlvl and maxlvl from jobs table?
Thanks
...
I have four tables containing exactly the same columns, and want to create a view over all four so I can query them together.
Is this possible?
(for tedious reasons I cannot/am not permitted to combine them, which would make this irrelevant!)
...
May be my title is not clear. I am looking for some kind of version control on database tables, like subversion does on files, like wiki does.
I want to trace the changes log.
I want to extract and run the diff in reverse. (undo like a "svn merge -r 101:100").
I may need a indexed search on the history.
I've read the "Design Pattern fo...
We have a huge data of about 300 million records, which will get updated every 3-6 months.We need to query this data(continously, real time) to get some information.What are the options - a RDBMS(mysql) , or some other option like Hadoop.Which will be better?
...
I have the following code in a SQL Server 2005 trigger:
CREATE TRIGGER [myTrigger] ON [myTable]
FOR UPDATE,DELETE
AS
BEGIN
DECLARE @OperationType VARCHAR(6)
IF EXISTS(SELECT 1 FROM INSERTED)
BEGIN
SET @OperationType='Update'
END
ELSE
BEGIN
SET @OperationType='Delete'
END
My question: is there a situation in which @Operation...
Quite a while ago, I heard about Object databases. Cool concept and all. Now, with the event of ORMs everywhere, does anyone still use any of the Object oriented Databases systems? Are they relevant? Are they practical?
...
I'm working on a database that tracks files and dependencies in projects. Briefly, I have two main tables; the PROJECTS table lists project names and other properties, the FILES table lists files. Every file entry points to a project as a foreign key set to CASCADE, so if I delete a project record from the database, all the file records ...
This is my first attempt at answering my own question, since someone may well run into this and so it might be of help. Using Firebird, I want to combine the results of two queries using UNION ALL, then sort the resulting output on a given column. Something like:
(select C1, C2, C3 from T1)
union all
(select C1, C2, C3 from T2)
order b...
Hi,
I'd like to use your wisdom for picking up the right solution for a data-warehouse system.
Here are some details to better understand the problem:
Data is organized in a star schema structure with one BIG fact and ~15 dimensions.
20B fact rows per month
10 dimensions with hundred rows (somewhat hierarchy)
5 dimensions with ...
I am setting up a very small mySQL database that stores, first name, last name, email and phone number and am struggling to find the 'perfect' datatype for each field. I know there is no such thing as a perfect answer, but there must be some sort of common convention for commonly used fields such as these. For instance, I have determined...
I would like to learn the best practices to employ when creating a database driven web-application.
I prefer to learn from examples.
What is a good sample application that I can download and run to learn this:
I am looking for:
Should be written in C# (preferably)
Should contain a complex database design (parent child relations, etc....
How do you use a DetailsView control in Asp.NET?
How do you change the labels to something other than the database field name?
How do you hide some of the fields from the user? (which you need to query for because they are the identity fields - row-id, which you dont want the user to see)?
...
When you have parent-child tables and you wish to use a DetailsView to edit the data how do you do it using a SqlDataSource?
For example, if you have a Person and an Employee table (where an employee is the child table and the Person is parent table - an employee derives from a person).
Person
P_ID
FirstName
LastName
DOB
Employee
E...
It seems to me there are other functional dependencies you may wish to declare (other than superkeys of course), but SQL provides no easy way to do so. Why is this?
...
I am trying to creating an optional association between a couple of tables. I have one table called Invoice. The Invoice table has a FK reference to the Customer table through the CustomerId field. The Invoice table also has a not enforced FK reference to the Project able through the ProjectId field.
Is there anyway to set up my Linq...
Hi,
I'm working on a design for a hierarchical database structure which models a catalogue containing products (this is similar to this question). The database platform is SQL Server 2005 and the catalogue is quite large (750,000 products, 8,500 catalogue sections over 4 levels) but is relatively static (reloaded once a day) and so we a...
How do we write below pseudo code in db2,
If (Proc exists)
Drop Proc
Create Proc
Else
Create Proc
One solution I found, after googling is to ignore the return codes. Do we have a more elegant way to do this?
Thanks
Update: With the help of the answer below we wrote a proc as below to drop the procedures
CREATE PROCEDURE SV...
How would one create a REST web service to write a row into a databse table. Use the follwoing scenario:
The table is called Customer - the
data to be inserted into the row would
be the name, addresss, telephone
number, email.
I think its impossible to describe the whole thing end to end in Java or C#, and I would never expec...
I'd like to hear from anyone who has experience with Redgate's tools for Sql Server 2005. In particular, are their backups 100% reliable? Their claims about backup speed and compression sound almost too good to be true.
For those who have used Redgate's backup, do they handle transaction log backups (and therefore restoring up to a sp...
I have a function that looks something like this:
//iteration over scales
foreach ($surveyScales as $scale)
{
$surveyItems = $scale->findDependentRowset('SurveyItems');
//nested iteration over items in scale
foreach ($surveyItems as $item)
{
//retrieve a single value from a result table and do some stuff
...