Re: connecting artist to album to track tables together correctly

2016-03-07 Thread George Sexton

You should take a look at "The Puppy Poster":

http://www.informationqualitysolutions.com/FreeStuff/rettigNormalizationPoster.pdf

It really covers database normalization well. It used to be given away 
as a freebie when you subscribed to a magazine. You should take a few 
hours and really go over it well.


Here are some things you need to think about

Artists and Albums often don't have a one-to-one relationship. The album 
may be by Lady Gaga, but it's got a duet with Tony Bennet. Similarly, a 
song may have multiple credited artists.


Second, depending upon how detailed you want to get, an artist may have 
multiple roles on a song. The two biggies would be Vocalist and Lyricist 
(or writer).


One of the things that makes me insane about iTunes is that the album 
artist will be all of the credited artists. That can make things hard to 
find.


On 3/6/2016 3:25 PM, sgarciaafi123 wrote:

Hey guys so I'm a bit confused. I'm making a artist, album, and track tables
and I'm confused about how to correctly link an album to their tracks if its
more than one.do I need to write one track to one album to one artist?

Artist1->album1->track1
Artist1->album1->track2

Or can I do it

Artist1->album1->track1,track2,track3

If I can do the second, what's the best way to do it?

Thank you, I'm new to DB.



--
View this message in context: 
http://apache-database.10148.n7.nabble.com/connecting-artist-to-album-to-track-tables-together-correctly-tp145713.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.



--
George Sexton
*MH Software, Inc.*
Voice: 303 438 9585
http://www.connectdaily.com


Re: Using the WHERE clause in a ResultSet

2015-11-04 Thread George Sexton
Myself and another person have given you very good explanations about how to do 
this. Either you're ignoring those for some reason or this is really beyond 
your capability. You should consider hiring a professional.

Sent from my iPad

> On Nov 3, 2015, at 11:43 PM, Bob M  wrote:
> 
> string1 thru string4 are VARCHAR variables
> 
> In my particular case each of the strings can be either"Up" or "Down" but
> their values vary each time my program runs which is every 6
> hours..
> 
> Sorry for being a bit slow, but I am still unclear as to how to ask for a
> subset of the table where Fields 1 thru 4 have as their values string1 thru
> 4
> 
> 
> 
> --
> View this message in context: 
> http://apache-database.10148.n7.nabble.com/Using-the-WHERE-clause-in-a-ResultSet-tp144994p145000.html
> Sent from the Apache Derby Users mailing list archive at Nabble.com.
> 


Re: Using the WHERE clause in a ResultSet

2015-11-03 Thread George Sexton
If you're using JDBC, you would use a prepared statement. This isn't 
exact, but something like:


PreparedStatement ps=conn.prepareStatement("select * from table where 
field1=? and field2=?");

ps.setString(1,variable1);
ps.setString(2,variable2);
ResultSet rs=ps.executeQuery();

while (rs.next()) {

}

On 11/3/2015 10:17 AM, Bob M wrote:

I wish to use the WHERE clause as follows:-

Field 1 = current value of variable 1
Field 2 = current value of variable 2 etc.

when I use code such as
WHERE Field1 = variable1 AND Field2 = variable2
I get an error message saying that variable1 is not in any table in FROM
list.

How do I correct this?




--
View this message in context: 
http://apache-database.10148.n7.nabble.com/Using-the-WHERE-clause-in-a-ResultSet-tp144994.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.



--
George Sexton
*MH Software, Inc.*
Voice: 303 438 9585
http://www.mhsoftware.com


Re: Multiple open/close of a derby database

2014-09-26 Thread George Sexton


On 9/25/2014 9:55 PM, mike matrigali wrote:
or run all applications in same jvm, ie. 3 applications in an 
application server.




Making sure that derby is in a class-loader that's available to all 
instances.



On 9/25/2014 7:09 PM, George Sexton wrote:
You're trying to run deny in embedded mode which is exclusive to that 
Jvm. You need to start an instanceof derby in server mode And have 
the applications connect to it.


Sent from my iPhone


On Sep 25, 2014, at 18:14, Bob M rgmatth...@orcon.net.nz wrote:

Hi

I have an application which opens a derby database and then does 
some things

with table A
I have now cloned this application to give me three applications 
which are

98% identical
App 1 opens the database and actions table 1
App 2 opens the same database and actions table 2
App3 opens the same database and actions table 3

I wish to run the three Apps simultaneously and here I run into 
problems

another instance of Derby may have already booted the database

If I wish to retain the current setup of just one database with various
tables what changes do I need to make to the current coding?

Bob M
Dunedin
New Zealand



--
View this message in context: 
http://apache-database.10148.n7.nabble.com/Multiple-open-close-of-a-derby-database-tp142454.html

Sent from the Apache Derby Users mailing list archive at Nabble.com.







--
George Sexton
*MH Software, Inc.*
Voice: 303 438 9585
http://www.mhsoftware.com


Re: Multiple open/close of a derby database

2014-09-25 Thread George Sexton
You're trying to run deny in embedded mode which is exclusive to that Jvm. You 
need to start an instanceof derby in server mode And have the applications 
connect to it.

Sent from my iPhone

 On Sep 25, 2014, at 18:14, Bob M rgmatth...@orcon.net.nz wrote:
 
 Hi
 
 I have an application which opens a derby database and then does some things
 with table A
 I have now cloned this application to give me three applications which are
 98% identical
 App 1 opens the database and actions table 1
 App 2 opens the same database and actions table 2
 App3 opens the same database and actions table 3
 
 I wish to run the three Apps simultaneously and here I run into problems
 another instance of Derby may have already booted the database
 
 If I wish to retain the current setup of just one database with various
 tables what changes do I need to make to the current coding?
 
 Bob M
 Dunedin
 New Zealand
 
 
 
 --
 View this message in context: 
 http://apache-database.10148.n7.nabble.com/Multiple-open-close-of-a-derby-database-tp142454.html
 Sent from the Apache Derby Users mailing list archive at Nabble.com.
 


Re: Star Derby as a service

2014-09-23 Thread George Sexton


On 9/23/2014 5:37 AM, Alessandro Manzoni wrote:
On Derby wiki pages 
(http://wiki.apache.org/db-derby/DerbyWindowsService) I found how to 
install Derby as a service.
It's made by Tanuki wrapper, but I installed succesfully myself the 
service using Apache commons Daemon 
(http://commons.apache.org/proper/commons-daemon/index.html).

Are there some particular reasons not to use commons Daemon?

I use the Commons Daemon as part of tomcat, and I've never had any 
problems with it.



--
George Sexton
*MH Software, Inc.*
Voice: 303 438 9585
http://www.mhsoftware.com