Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75992 - sandbox/icl/libs/xplore/br1/sqlbrowser
From: afojgo_at_[hidden]
Date: 2011-12-16 10:16:48


Author: jofaber
Date: 2011-12-16 10:16:48 EST (Fri, 16 Dec 2011)
New Revision: 75992
URL: http://svn.boost.org/trac/boost/changeset/75992

Log:
Changes on the toy db-schema
Binary files modified:
   sandbox/icl/libs/xplore/br1/sqlbrowser/media1.db
Text files modified:
   sandbox/icl/libs/xplore/br1/sqlbrowser/MakeMedia1.sql | 33 +++++++++++++++++++++++++++++----
   sandbox/icl/libs/xplore/br1/sqlbrowser/qsqlconnectiondialog.ui | 2 +-
   2 files changed, 30 insertions(+), 5 deletions(-)

Modified: sandbox/icl/libs/xplore/br1/sqlbrowser/MakeMedia1.sql
==============================================================================
--- sandbox/icl/libs/xplore/br1/sqlbrowser/MakeMedia1.sql (original)
+++ sandbox/icl/libs/xplore/br1/sqlbrowser/MakeMedia1.sql 2011-12-16 10:16:48 EST (Fri, 16 Dec 2011)
@@ -7,12 +7,37 @@
 insert into Albums values (1, 'Kind of Blue', 'Miles Davis', 'Jazz', '9.3');
 insert into Albums values (2, 'Nefertiti', 'Miles Davis', 'Jazz', '9.1');
 
-create table Tracks (id integer primary key, Album integer, Pos integer, Title varchar, Artist varchar, Genre varchar, Rating number, Duration varchar, BPM number);
+create table Tracks (id integer primary key, Title varchar, Artist varchar, Genre varchar, Rating number, Duration varchar, BPM number);
+
+-- Kind of Blue
+insert into Tracks values (1, 'So What', 'Miles Davis', 'Jazz', '9.6', '09:05', '80');
+insert into Tracks values (2, 'Freddie Freeloader', 'Miles Davis', 'Jazz', '9.3', '09:35', '');
+-- Nefertiti
+insert into Tracks values (3, 'Nefertiti', 'Wayne Shorter', 'Jazz', '9.0', '07:52', '80');
+insert into Tracks values (4, 'Fall', 'Wayne Shorter', 'Jazz', '9.3', '06:39', '');
+
+
+create table AlbumsByTracks (Album integer, Track integer, Pos integer);
+
+insert into AlbumsByTracks values (1, 1, 1);
+insert into AlbumsByTracks values (1, 2, 2);
+insert into AlbumsByTracks values (2, 3, 1);
+insert into AlbumsByTracks values (2, 4, 2);
+
+
+-- ----------------------------------------------------------------------------
+select Albums.Title, Albums.Genre, Tracks.Title, Tracks.Duration, Tracks.Artist
+from AlbumsByTracks, Albums, Tracks
+where AlbumsByTracks.Album = Albums.Id and AlbumsByTracks.Track = Tracks.Id
+
+-- ----------------------------------------------------------------------------
+select Albums.Title, Albums.Genre, Tracks.Title, Tracks.Duration, Tracks.Artist
+from AlbumsByTracks, Albums, Tracks
+inner join Albums on AlbumsByTracks.Album = Albums.Id
+inner join Tracks on AlbumsByTracks.Track = Tracks.Id
+where AlbumsByTracks.Album = Albums.Id and AlbumsByTracks.Track = Tracks.Id
 
-insert into Tracks values (1, 1, 1, 'So What', 'Miles Davis', 'Jazz', '9.6', '09:05', '80');
-insert into Tracks values (2, 1, 2, 'Freddie Freeloader', 'Miles Davis', 'Jazz', '9.3', '09:35', '');
 
-create table AlbumsByTracks (id integer primary key, Album integer, Track integer, Pos integer);
 
 -- ----------------------------------------------------------------------------
 -- select .. from Refering inner join Target on Refering.Pointer = Target.Id

Modified: sandbox/icl/libs/xplore/br1/sqlbrowser/media1.db
==============================================================================
Binary files. No diff available.

Modified: sandbox/icl/libs/xplore/br1/sqlbrowser/qsqlconnectiondialog.ui
==============================================================================
--- sandbox/icl/libs/xplore/br1/sqlbrowser/qsqlconnectiondialog.ui (original)
+++ sandbox/icl/libs/xplore/br1/sqlbrowser/qsqlconnectiondialog.ui 2011-12-16 10:16:48 EST (Fri, 16 Dec 2011)
@@ -58,7 +58,7 @@
       <item row="1" column="1">
        <widget class="QLineEdit" name="editDatabase">
         <property name="text">
- <string>xperiment.db</string>
+ <string>../sqlbrowser/media1.db</string>
         </property>
        </widget>
       </item>


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk