Dsy Network www | forum | my | didattica | howto | wiki | el goog | stats | blog | dona | rappresentanti
Homepage
 Register   Calendar   Members  Faq   Search  Logout 
.dsy:it. : Powered by vBulletin version 2.3.1 .dsy:it. > Didattica > Corsi A - F > Basi di dati ~ informatica triennale > Progetto Basi 2011/2012 Thread Rating: 1 votes, 4.00 average.
Pages (12): « First ... « 5 6 7 8 [9] 10 11 12 »   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
pintu
.illuminato.

User info:
Registered: Jul 2010
Posts: 248 (0.05 al dì)
Location: Novara
Corso: informatica
Anno:
Time Online: 2 Days, 0:46:30 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Senza scheduler e con la colonna aggiuntiva "attivo" (boolean) posso limitare la ricerca ad annunci non scaduti..La soluzione di aPiso sarebbe questa giusto? Ma comunque non risolve il problema..Se il mio annuncio x scade oggi, domani quando accedo al database il campo attivo dell'annuncio x dovrà essersi settato automaticamente a FALSE...quindi se non ho capito male mi tocca capire come funziona questo benedetto scheduler :D

15-05-2012 22:39
Click Here to See the Profile for pintu Click here to Send pintu a Private Message Find more posts by pintu Add pintu to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
number15
.grande:maestro.

User info:
Registered: Nov 2005
Posts: 652 (0.10 al dì)
Location:
Corso:
Anno:
Time Online: 121 Days, 13:57:11 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

No, questa è la mia :-D

La sua è di fare la query con where data_di_scadenza < now()

__________________
Portale segnalazioni marchi-negozi di abbigliamento
http://www.ovojo.com

16-05-2012 07:45
Click Here to See the Profile for number15 Click here to Send number15 a Private Message Find more posts by number15 Add number15 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
pintu
.illuminato.

User info:
Registered: Jul 2010
Posts: 248 (0.05 al dì)
Location: Novara
Corso: informatica
Anno:
Time Online: 2 Days, 0:46:30 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Scusa la mia ignoranza ma devo concludere questa dannata cosa della data :D Ora che ho il mio campo 'attivo', per settarlo automaticamente ho bisogno dello scheduler perchè non posso farlo via trigger giusto? Neanche magari con un trigger before insert or update or delete?

16-05-2012 09:04
Click Here to See the Profile for pintu Click here to Send pintu a Private Message Find more posts by pintu Add pintu to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
pintu
.illuminato.

User info:
Registered: Jul 2010
Posts: 248 (0.05 al dì)
Location: Novara
Corso: informatica
Anno:
Time Online: 2 Days, 0:46:30 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

PS: ma cron è solo per Linux? Io uso windows

16-05-2012 09:29
Click Here to See the Profile for pintu Click here to Send pintu a Private Message Find more posts by pintu Add pintu to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
number15
.grande:maestro.

User info:
Registered: Nov 2005
Posts: 652 (0.10 al dì)
Location:
Corso:
Anno:
Time Online: 121 Days, 13:57:11 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

No, con i trigger non risolvi.
I trigger si attivano su una qualche azione, non a tempo.
Quindi se tu non hai azioni, non puoi aggiornare lo stato degli annunci.

Quindi le opzioni sono 2:
1) usare il campo attivo, e utilizzare uno scheduler per aggiornarlo (che sia cron o quello di postgres)
2) non usare il campo attivo e nelle query aggiungi il controllo che la data d scadenza sia minore della data odierna.

__________________
Portale segnalazioni marchi-negozi di abbigliamento
http://www.ovojo.com

16-05-2012 09:30
Click Here to See the Profile for number15 Click here to Send number15 a Private Message Find more posts by number15 Add number15 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
number15
.grande:maestro.

User info:
Registered: Nov 2005
Posts: 652 (0.10 al dì)
Location:
Corso:
Anno:
Time Online: 121 Days, 13:57:11 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by pintu
PS: ma cron è solo per Linux? Io uso windows


Si, solo linux.
Non conosco alternative...
Prova comunque lo scheduler di postgres, ha anche più senso per un esame di db.

Se non vuoi impazzire, utilizza l'altra soluzione.

__________________
Portale segnalazioni marchi-negozi di abbigliamento
http://www.ovojo.com

16-05-2012 09:38
Click Here to See the Profile for number15 Click here to Send number15 a Private Message Find more posts by number15 Add number15 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
pintu
.illuminato.

User info:
Registered: Jul 2010
Posts: 248 (0.05 al dì)
Location: Novara
Corso: informatica
Anno:
Time Online: 2 Days, 0:46:30 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Si ho usato la seconda alla fine..quando eseguo la ricerca di un immobile faccio prima un UPDATE della tabella annuncio.. se data_scadenza > now() allora 'attivo' = FALSE, poi eseguo la ricerca. Grazie comunque per la pazienza :) Posso chiederti un altro aiuto?
Nella tabella annuncio io ho i due attributi data_pubbl e data_scadenza di tipo DATE. Io però vorrei che l'utente della mia applicazione inserisca solo la data di pubblicazione e che la data_scadenza sia calcolata automaticamente, tipo 30 giorni dopo la data_pubbl...come posso fare?

16-05-2012 09:41
Click Here to See the Profile for pintu Click here to Send pintu a Private Message Find more posts by pintu Add pintu to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
number15
.grande:maestro.

User info:
Registered: Nov 2005
Posts: 652 (0.10 al dì)
Location:
Corso:
Anno:
Time Online: 121 Days, 13:57:11 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Il problema è che usi postgres e non ho idea delle funzioni che abbia.

Per myslq son queste: http://dev.mysql.com/doc/refman/5.5...-functions.html

Devi cercare le equivalenti per postgres.
Quella che ti serve dovrebbe essere la funzione DATE_ADD()

__________________
Portale segnalazioni marchi-negozi di abbigliamento
http://www.ovojo.com

16-05-2012 10:04
Click Here to See the Profile for number15 Click here to Send number15 a Private Message Find more posts by number15 Add number15 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
pintu
.illuminato.

User info:
Registered: Jul 2010
Posts: 248 (0.05 al dì)
Location: Novara
Corso: informatica
Anno:
Time Online: 2 Days, 0:46:30 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Grazie ho risolto la cosa delle date! Come faccio a inserire delle immagini all'interno del database? (Postgres)

17-05-2012 10:27
Click Here to See the Profile for pintu Click here to Send pintu a Private Message Find more posts by pintu Add pintu to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
number15
.grande:maestro.

User info:
Registered: Nov 2005
Posts: 652 (0.10 al dì)
Location:
Corso:
Anno:
Time Online: 121 Days, 13:57:11 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Metti il percorso in un campo text e lo usi come img src nel'html

__________________
Portale segnalazioni marchi-negozi di abbigliamento
http://www.ovojo.com

17-05-2012 10:40
Click Here to See the Profile for number15 Click here to Send number15 a Private Message Find more posts by number15 Add number15 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
pintu
.illuminato.

User info:
Registered: Jul 2010
Posts: 248 (0.05 al dì)
Location: Novara
Corso: informatica
Anno:
Time Online: 2 Days, 0:46:30 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Non capisco perchè non funziona :(

<img src="C:\Program Files\PostgreSQL\EnterpriseDB-Apache\Php\apache\www\NEWS_1336368281_TUTTO.jpg" />

quando carico la pagina contenente l'immagine non la visualizza!

18-05-2012 10:03
Click Here to See the Profile for pintu Click here to Send pintu a Private Message Find more posts by pintu Add pintu to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
pintu
.illuminato.

User info:
Registered: Jul 2010
Posts: 248 (0.05 al dì)
Location: Novara
Corso: informatica
Anno:
Time Online: 2 Days, 0:46:30 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

niente risolto :)

18-05-2012 10:19
Click Here to See the Profile for pintu Click here to Send pintu a Private Message Find more posts by pintu Add pintu to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
aPiso
.illuminato.

User info:
Registered: Sep 2010
Posts: 158 (0.03 al dì)
Location: Milano
Corso: Informatica
Anno: 3
Time Online: 1 Day, 21:54:30 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

scusate io non ho capito solo una cosa per i cluster... mettiamo ad esempio che io voglia attuare il criterio di similarità geografica.
Quindi se questo criterio è selezionato come il criterio attivo quando seleziono un annuncio devo mostrare gli annunci simili.
Ma io questi annunci sarei andato a pigliarli con una funzione, mentre da quel che leggo vanno messi in una qualche vista materializzata e aggiornati man mano... ma in questo modo dovrei creare una vista materializzata per ogni annuncio, che contenga gli annunci che gli stanno vicini!! mi sembra una cosa completamente folle, uno si fa un sacco di problemi in fase concettuale per una tabella in più o in meno, e poi a fronte di un numero potenziale di 1 milione di annunci finisco per creare un milione di tabelle? Mi sembra talmente impossibile che penso davvero di aver interpretato male io la consegna, qualcuno mi può per cortesia fare un po' di chiarezza?

27-05-2012 14:59
Click Here to See the Profile for aPiso Click Here to See the Blog of aPiso Click here to Send aPiso a Private Message Find more posts by aPiso Add aPiso to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
pintu
.illuminato.

User info:
Registered: Jul 2010
Posts: 248 (0.05 al dì)
Location: Novara
Corso: informatica
Anno:
Time Online: 2 Days, 0:46:30 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Io sono nella tua stessa situazione. Lasciando stare che non ho idea di come implementare il criterio di similarità geografica, mi sembra comunque una richiesta assurda (soprattutto rispetto alle cose spiegate a lezione) e esposta in modo tutt'altro che chiaro.. Non so se il ragionamento che hai fatto tu sia simile al mio..ti spiego: inserisco il primo annuncio, mettiamo che si trovi a milano, e creo vista che contiene questo annuncio. Al secondo inserimento, se l'annuncio è "simile" al primo (10 km nel raggio di milano) lo inserisco nella stessa vista, altrimenti creo un'altra vista e lo inserisco li... e cosi via! Ho compreso bene?

28-05-2012 10:30
Click Here to See the Profile for pintu Click here to Send pintu a Private Message Find more posts by pintu Add pintu to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Shady90
.fedelissimo.

User info:
Registered: Jun 2010
Posts: 59 (0.01 al dì)
Location:
Corso:
Anno:
Time Online: 7:05:33 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Ciao a tutti,

anche io sono alle prese con il progetto, lo sto cercando di fare per la consegna di luglio e ho ancora un bel pò di dubbi...

1. Cosa si intende per viste materializzate? Se ho capito bene sono tabelle normali che hanno le stesse (o quasi) colonne di un'altra tabella (e che non è vista), all'interno del quale, attraverso dei trigger, vengono inseriti/rimossi/aggiornati i record all'interno .. Voi come le avete fatte?

2. Questa cosa dei cluster mi lascia ancora molto confuso: io credo che sia da sviluppare con l'idea "gli annunci vicini a un dato annuncio", quindi il punto di partenza sono le coordinate di un annuncio dato in parametro... detto questo, come è possibile strutturare qualcosa di questo tipo su un database??? l'unica cosa (assurda) che mi viene in mente è una tabella fatta ad esempio da due colonne, entrambe FK di annunci, dove ogni coppia di id indica annunci vicini.... come avete fatto voi?

@aPiso e @pintu ho gli stessi indentici dubbi vostri (meno male, pensavo di essere l'unico), avete risolto in qualche modo? qualcuno è riuscito a parlare con il professore per capire che diavolo vuole che si realizzi?

Ciao e grazie!

04-06-2012 22:07
Click Here to See the Profile for Shady90 Click here to Send Shady90 a Private Message Find more posts by Shady90 Add Shady90 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 19:39.    Post New Thread    Post A Reply
Pages (12): « First ... « 5 6 7 8 [9] 10 11 12 »   Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread | Add to Bookmarks

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
 

Powered by: vBulletin v2.3.1 - Copyright ©2000 - 2002, Jelsoft Enterprises Limited
Mantained by dsy crew (email) | Collabora con noi | Segnalaci un bug | Archive | Regolamento | Licenze | Thanks | Syndacate
Pagina generata in 0.047 seconds (77.49% PHP - 22.51% MySQL) con 31 query.