Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Add a new row based on some condition?

 
   Database Forums (Home) -> General Discussion RSS
Next:  New Databases  
Author Message
iherage

External


Since: Jun 03, 2008
Posts: 5



(Msg. 1) Posted: Tue Jun 03, 2008 1:38 am
Post subject: Add a new row based on some condition?
Archived from groups: comp>databases (more info?)

Hello,

I have designed two tables, one for the main information of
maintenance, and the other for additional information. The additional
table is used when one column in the main table has the value of 1
meaning we will send it to other company to repair it. So in the
additional table we have to record the company name, address, and
delivery package number, etc. If we can do it ourself, there is then
no need to use the additional table.

I have been thinking about this approach. Is this the right way? I
think it might cause the inconsistency of the database and difficulty
to maintain the database. But I wonder if there is any alternatives.
Any suggests? Thank you a lot.

 >> Stay informed about: Add a new row based on some condition? 
Back to top
Login to vote
Ed Prochak

External


Since: Apr 20, 2007
Posts: 83



(Msg. 2) Posted: Tue Jun 03, 2008 5:57 am
Post subject: Re: Add a new row based on some condition? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Jun 3, 3:38 am, wrote:
> Hello,
>
> I have designed two tables, one for the main information of
> maintenance, and the other for additional information. The additional
> table is used when one column in the main table has the value of 1
> meaning we will send it to other company to repair it. So in the
> additional table we have to record the company name, address, and
> delivery package number, etc. If we can do it ourself, there is then
> no need to use the additional table.
>
> I have been thinking about this approach. Is this the right way? I
> think it might cause the inconsistency of the database and difficulty
> to maintain the database. But I wonder if there is any alternatives.
> Any suggests? Thank you a lot.

You really should give more details, but I'm going to assume some
things.
(Hopefully that other definition of assume won't bite us both! 8^)

so you have something like:
Table main_maint:
serial# PK
description
installation date
... (other attributes) ...
next repair date
out for repair flag

Table repair_outside:
serial# PK
service company name
address
estimated cost
estimated return date
....(other columns)

Since you gave such a slight purpose for that flag, I'd say you don't
need it. So how do you know a machine is out for repair? if there is a
record in the repair_outside table. (note assumes repair record
deleted once machine is back in service. If history is needed, then
copy the info to repair history tables).

HTH,
Ed

 >> Stay informed about: Add a new row based on some condition? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Simple File Based Library? - I'm not sure if this topic goes here but, I'm looking for a c++ library that can read a file and use that file as a database. For instance, the excel libraries for microsoft that can read and write to excel files. Are there any libraries like that?

Simple disk-based sorting method - I have a disk file which contains 370,260 records of average length 60 ASCII text characters. I need to sort them on the first 9 characters, which are set off from the rest by a space. Once sorted the first record looks like 100100100 08:35-08:39 4 0 0...

Unify Database information? - Hi. I am trying to find any and all information out there regarding the Unify database. Specifically the older version which runs on SCO OpenServer. I am trying to export data from this database with an applcation's query tool, but the tool is causing..

mysqldump - Hello, I'm trying to do a dump of my database with one line for each INSERT: INSERT INTO Table VALUES(...); INSERT INTO Table VALUES(...); ... I couldn't do it with mysqldump. I tired the different options, but I always get 1 big INSERT line: INSERT..

OWB client and HR sample schema - Buddies, I'm new to Oracle Database Warehousing and OLAP, I've just installed OWB 9.2 for experiment. When I tried to connect to the sample schema HR, I encouter a error with message "API5022 Cannot connect to specified repository. verify connecti...
   Database Forums (Home) -> General Discussion All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]