Sunday, May 18, 2008

Estructura de la BBDD

Para que no me quede en el olvido esta es la estructura:

CREATE TABLE songs(
_id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT,
filename TEXT,
album INTEGER,
artist INTEGER
);
CREATE TABLE artists(
_id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT,
full_name TEXT,
photo TEXT
);
CREATE TABLE albums(
_id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT,
artist INTEGER,
photo TEXT
);

pueden haber albums con canciones de varios artistas, pero como queremos indexar primeramente por artistas creamos un registro por cada par artist-title

No comments: