The document discusses drum brakes, including their components, operation, advantages, and disadvantages. It describes drum brake parts such as the backing plate, shoe anchors, wheel cylinders, brake shoes, and linings. It explains the differences between primary and secondary brake shoes and how drum brakes use self-energizing and servo action to provide stopping power. The document also discusses drum brake fade issues and methods for adjusting drum brakes.
Electromagnetic braking system group 14Nitesh Prasad
This document presents an electromagnetic braking system as an alternative to conventional friction-based braking systems. It describes how electromagnetic brakes work by creating a magnetic field within a rotating metal disc that induces eddy currents, generating a torque that opposes the disc's rotation. The key advantages are that electromagnetic brakes do not involve friction or wear, require low maintenance, are quieter and simpler than friction brakes. Potential applications include railway systems, vehicles, aircraft and industrial equipment. The conclusion is that electromagnetic braking is superior to friction braking due to the lack of heat and friction.
This document provides an overview of Indian Railways, including its history, size, operations, and key signaling and communication systems. It notes that Indian Railways was founded in 1853, is the fourth largest railway network in the world comprising over 115,000 km of track, and employs over 1.3 million people, making it one of the largest employers globally. The document then describes the different types of railway signals, the purpose of interlocking systems, and how communication systems like microwave transmission and optical fiber networks are used to manage train traffic control across India's extensive rail network.
Contraception where have we been and where are we going is a presentation made by Dr.Laxmi Shrikhande who is a Fertility Specialist, Laparoscopic Surgeon & no scar Hysterectomy Specialist and a leading Gynaecologist from Nagpur
seminar presentation on summer training at indian railway Mohammad Adnan
The document summarizes the presenter's summer training at the East Central Railway workshop in Dhanbad, describing the history and operations of the workshop including coach maintenance processes like washing, inspection, brake testing, and repair work. Key aspects of train operations and safety checks performed during platform duties are also outlined.
This document provides an introduction and examples for testing internal combustion engines. It begins with definitions of testing and its purpose, which is to determine information that cannot be obtained through calculations, confirm design data, and satisfy customers regarding engine performance. Several examples of brake power and torque calculations for engines are shown. The learning outcomes of the document are not specified.
Training ppt on Chittaranjan Locomotive WorksDhruv Upadhaya
This training presentation provides an overview of Chittaranjan Locomotive Works (CLW). It discusses the history of CLW including key dates of its establishment and production milestones. It then describes various types of locomotives produced at CLW, including diesel, electric, DC, and three-phase locomotives. Key components of electric locomotives such as traction motors, transformers, and static equipment are also explained. Finally, it summarizes the advantages of electric locomotives over diesel locomotives.
The Northern Railways is one of the 16 zones and the northernmost zone of the Indian Railways. Its headquarter is New Delhi Railway Station.
Northern Railways is one of nine old zones of Indian Railways and also the biggest in terms of network having 6807 kilometre route.[1] It covers the states of Jammu and Kashmir, Punjab, Haryana, Himachal Pradesh, Uttarakhand and Uttar Pradesh and the Union territories of Delhi and Chandigarh.
The document discusses drum brakes, including their components, operation, advantages, and disadvantages. It describes drum brake parts such as the backing plate, shoe anchors, wheel cylinders, brake shoes, and linings. It explains the differences between primary and secondary brake shoes and how drum brakes use self-energizing and servo action to provide stopping power. The document also discusses drum brake fade issues and methods for adjusting drum brakes.
Electromagnetic braking system group 14Nitesh Prasad
This document presents an electromagnetic braking system as an alternative to conventional friction-based braking systems. It describes how electromagnetic brakes work by creating a magnetic field within a rotating metal disc that induces eddy currents, generating a torque that opposes the disc's rotation. The key advantages are that electromagnetic brakes do not involve friction or wear, require low maintenance, are quieter and simpler than friction brakes. Potential applications include railway systems, vehicles, aircraft and industrial equipment. The conclusion is that electromagnetic braking is superior to friction braking due to the lack of heat and friction.
This document provides an overview of Indian Railways, including its history, size, operations, and key signaling and communication systems. It notes that Indian Railways was founded in 1853, is the fourth largest railway network in the world comprising over 115,000 km of track, and employs over 1.3 million people, making it one of the largest employers globally. The document then describes the different types of railway signals, the purpose of interlocking systems, and how communication systems like microwave transmission and optical fiber networks are used to manage train traffic control across India's extensive rail network.
Contraception where have we been and where are we going is a presentation made by Dr.Laxmi Shrikhande who is a Fertility Specialist, Laparoscopic Surgeon & no scar Hysterectomy Specialist and a leading Gynaecologist from Nagpur
seminar presentation on summer training at indian railway Mohammad Adnan
The document summarizes the presenter's summer training at the East Central Railway workshop in Dhanbad, describing the history and operations of the workshop including coach maintenance processes like washing, inspection, brake testing, and repair work. Key aspects of train operations and safety checks performed during platform duties are also outlined.
This document provides an introduction and examples for testing internal combustion engines. It begins with definitions of testing and its purpose, which is to determine information that cannot be obtained through calculations, confirm design data, and satisfy customers regarding engine performance. Several examples of brake power and torque calculations for engines are shown. The learning outcomes of the document are not specified.
Training ppt on Chittaranjan Locomotive WorksDhruv Upadhaya
This training presentation provides an overview of Chittaranjan Locomotive Works (CLW). It discusses the history of CLW including key dates of its establishment and production milestones. It then describes various types of locomotives produced at CLW, including diesel, electric, DC, and three-phase locomotives. Key components of electric locomotives such as traction motors, transformers, and static equipment are also explained. Finally, it summarizes the advantages of electric locomotives over diesel locomotives.
The Northern Railways is one of the 16 zones and the northernmost zone of the Indian Railways. Its headquarter is New Delhi Railway Station.
Northern Railways is one of nine old zones of Indian Railways and also the biggest in terms of network having 6807 kilometre route.[1] It covers the states of Jammu and Kashmir, Punjab, Haryana, Himachal Pradesh, Uttarakhand and Uttar Pradesh and the Union territories of Delhi and Chandigarh.
This is the hand book made by Jhansi Division of Indian Railways for the benefit of Railwaymen in particular to the staff involved in C&W maintenance. Excellent effort by the team.
This document contains 25 multiple choice questions related to mathematics, probability, and logic. The questions cover a range of topics including arithmetic, algebra, geometry, time/work problems, and word problems. Sample questions include finding the minimum number of mice required to identify a poisoned barrel of beer, calculating average speed given a change in distance and time, and determining the number of handshakes that would occur if 20 men shook hands without repetition. The document also provides links to additional resources for frequently asked placement questions.
djan 1-5 GENERATION OF ELECTRICITY THROUGH WASTEAlex Boakye
This document presents a project to generate electricity from plastic waste. It discusses the increasing global demand for energy and need for alternative sources. The objectives are to design a power plant that uses heat from incinerating plastic waste to run turbines and generate electricity. It describes the system design, testing, and results showing electricity can be produced this way. It concludes that generating power from plastic waste is possible and has environmental benefits, and recommends siting plants near waste sources and for small communities.
Emily goes on a week-long journey into space with her father and the crew of his shuttle. They visit Mercury, Venus, Mars, and Jupiter, where Emily learns interesting facts about each planet. However, on the way back they run out of gas and begin drifting dangerously close to the sun. After narrowly avoiding burning up, the crew is able to set a course back to Earth, though it will take a few days to return. In the end, Emily and her father safely land back at the NASA station.
This document summarizes different bioconjugation chemistries used to prepare antibody-drug conjugates (ADCs), including lysine-mediated and cysteine-mediated conjugation. For lysine-mediated conjugation of an IgG1 antibody, the average drug-to-antibody ratio was 4.3 with 2.5% unconjugated antibody and 3.9% aggregates. For cysteine-mediated conjugation using a non-cleavable linker-payload, parameters like the stoichiometry of the reducing agent TCEP and linker-payload, reaction pH, antibody concentration, and buffer concentration were evaluated. Higher TCEP amounts increased drug loading but reduced aggregates and unconjugated antibody. Optimal pH was 6
This document is a report submitted by Sandeep Kr. Singh for his summer training project at the electric loco shed in Ghaziabad, India. It includes sections on the history of Indian Railways, classifications of locomotives, power transmission systems, and components of electric locomotives. The report was submitted in partial fulfillment of the requirements for an MTech degree from Gautam Buddha University under the guidance of Dr. Yogesh Kr. Chauhan.
Indian railways mechanical vocational training report 2 haxxo24 i~ihaxxo24
This document provides information about an industrial training report completed at the Diesel Loco Shed in Tughlakabad. It includes an acknowledgement, introduction to the history of Indian Railways, details about the Diesel Shed in Tughlakabad including its inception, current locomotives, facilities, and innovations. It also summarizes several key sections and functions within the shed like the fuel section, control room, CTA cell, and turbo supercharger.
This document describes the design and fabrication of an electromagnetic braking system. It uses magnetic force to engage the brake by applying electricity to an electromagnetic coil. When current flows through the coil, a magnetic field is created that attracts a plunger. The plunger then moves the brake shoe against the rotating drum, slowing the vehicle. The objectives are to control vehicle speed and stop quickly using electromagnetic braking to reduce braking reaction time. It provides calculations for the required braking force and shaft diameter. A CAD model and conclusions on improved braking performance are also included.
The document discusses normalization in database design. Normalization is the process of organizing data to avoid redundancy and dependency. It involves splitting tables and restructuring relationships between tables. The document outlines various normal forms including 1NF, 2NF, 3NF, BCNF, 4NF and 5NF and provides examples to illustrate how to normalize tables to conform to each form.
Dina Milone, Corso di Storia e Didattica della Shoah, Università della Calabr...paolo coen
Fortunata Adele Milone's contribution to Università della Calabria 2015's Course on Shoah's History and Didactics consisted basically in transmitting to the audience her experience. Milone, currently an English teacher in Calabria's primary schools, started to deepen her knowledge of the Shoah some years ago, after a seminary at the Yad Vashem. Today she is focussing mainly on children texts dedicated to the Shoah.
Preparazione alla Prova di Matematca dell’Esame di Qualifca
della Regione Lombardia
Una raccolta di esercizi, suddivisi per argomento, tratti dalle prove d’esame dall’a.f. 2009/10 all’a.f. 2013/14
a cura di Alessandra Vaghi
This is the hand book made by Jhansi Division of Indian Railways for the benefit of Railwaymen in particular to the staff involved in C&W maintenance. Excellent effort by the team.
This document contains 25 multiple choice questions related to mathematics, probability, and logic. The questions cover a range of topics including arithmetic, algebra, geometry, time/work problems, and word problems. Sample questions include finding the minimum number of mice required to identify a poisoned barrel of beer, calculating average speed given a change in distance and time, and determining the number of handshakes that would occur if 20 men shook hands without repetition. The document also provides links to additional resources for frequently asked placement questions.
djan 1-5 GENERATION OF ELECTRICITY THROUGH WASTEAlex Boakye
This document presents a project to generate electricity from plastic waste. It discusses the increasing global demand for energy and need for alternative sources. The objectives are to design a power plant that uses heat from incinerating plastic waste to run turbines and generate electricity. It describes the system design, testing, and results showing electricity can be produced this way. It concludes that generating power from plastic waste is possible and has environmental benefits, and recommends siting plants near waste sources and for small communities.
Emily goes on a week-long journey into space with her father and the crew of his shuttle. They visit Mercury, Venus, Mars, and Jupiter, where Emily learns interesting facts about each planet. However, on the way back they run out of gas and begin drifting dangerously close to the sun. After narrowly avoiding burning up, the crew is able to set a course back to Earth, though it will take a few days to return. In the end, Emily and her father safely land back at the NASA station.
This document summarizes different bioconjugation chemistries used to prepare antibody-drug conjugates (ADCs), including lysine-mediated and cysteine-mediated conjugation. For lysine-mediated conjugation of an IgG1 antibody, the average drug-to-antibody ratio was 4.3 with 2.5% unconjugated antibody and 3.9% aggregates. For cysteine-mediated conjugation using a non-cleavable linker-payload, parameters like the stoichiometry of the reducing agent TCEP and linker-payload, reaction pH, antibody concentration, and buffer concentration were evaluated. Higher TCEP amounts increased drug loading but reduced aggregates and unconjugated antibody. Optimal pH was 6
This document is a report submitted by Sandeep Kr. Singh for his summer training project at the electric loco shed in Ghaziabad, India. It includes sections on the history of Indian Railways, classifications of locomotives, power transmission systems, and components of electric locomotives. The report was submitted in partial fulfillment of the requirements for an MTech degree from Gautam Buddha University under the guidance of Dr. Yogesh Kr. Chauhan.
Indian railways mechanical vocational training report 2 haxxo24 i~ihaxxo24
This document provides information about an industrial training report completed at the Diesel Loco Shed in Tughlakabad. It includes an acknowledgement, introduction to the history of Indian Railways, details about the Diesel Shed in Tughlakabad including its inception, current locomotives, facilities, and innovations. It also summarizes several key sections and functions within the shed like the fuel section, control room, CTA cell, and turbo supercharger.
This document describes the design and fabrication of an electromagnetic braking system. It uses magnetic force to engage the brake by applying electricity to an electromagnetic coil. When current flows through the coil, a magnetic field is created that attracts a plunger. The plunger then moves the brake shoe against the rotating drum, slowing the vehicle. The objectives are to control vehicle speed and stop quickly using electromagnetic braking to reduce braking reaction time. It provides calculations for the required braking force and shaft diameter. A CAD model and conclusions on improved braking performance are also included.
The document discusses normalization in database design. Normalization is the process of organizing data to avoid redundancy and dependency. It involves splitting tables and restructuring relationships between tables. The document outlines various normal forms including 1NF, 2NF, 3NF, BCNF, 4NF and 5NF and provides examples to illustrate how to normalize tables to conform to each form.
Dina Milone, Corso di Storia e Didattica della Shoah, Università della Calabr...paolo coen
Fortunata Adele Milone's contribution to Università della Calabria 2015's Course on Shoah's History and Didactics consisted basically in transmitting to the audience her experience. Milone, currently an English teacher in Calabria's primary schools, started to deepen her knowledge of the Shoah some years ago, after a seminary at the Yad Vashem. Today she is focussing mainly on children texts dedicated to the Shoah.
Preparazione alla Prova di Matematca dell’Esame di Qualifca
della Regione Lombardia
Una raccolta di esercizi, suddivisi per argomento, tratti dalle prove d’esame dall’a.f. 2009/10 all’a.f. 2013/14
a cura di Alessandra Vaghi
Nell’ambito del Progetto di Legalità e Cittadinanza, anche la celebrazione della Giornata della Memoria quest’anno nella nostra Scuola è stata un’occasione corale per docenti di Lettere e studenti delle terze classi e non solo, per mettersi in ascolto della Storia, lasciando parlare l’evento Shoah perché risuonasse nelle nostre coscienze spesso distratte
Insegnare e apprendere la geometria s. sbaraglitodeschinimarta
Con questa presentazione la prof. Sbaragli ci ha confermato nella nostra convinzione dell'importanza della geometria nella storia della matematica e quindi anche nell'educazione.
1. ESERCIZI NORMALIZZAZIONE
Es 1
Si consideri lo schema di relazione R = (A,B,C,D) e il seguente insieme di dipendenze funzionali:
1. A -> B
2. BC -> D
3. A -> C
Rispondere ai seguenti quesiti motivando le risposte date:
a) Determinare la chiave o le chiavi dello schema di relazione R.
b) Determinare se R e’ in 3NF o BCNF.
c) Produrre eventuali decomposizioni e discutere la preservazione dei dati e delle dipendenze
funzionali
Es 2
Si consideri R(A,B,C,D); per ciascuno dei seguenti gruppi di dipendenze funzionali
1. ABC→D, D→A;
2. AB→C, AB→D, C→A, D→B;
determinare:
a) Tutte le chiavi di R.
b) Se R è in 3NF.
c) Se R è in BCNF; nel caso in cui non lo fosse, discutere l’esistenza (ed eventualmente proporre)
di una decomposizione che preservi le dipendenze funzionali.
Es 3
Si consideri lo schema di relazione R(A,B,C,D,E,F) e il seguente insieme di dipendenze funzionali F su tale
schema:
A→ B
1.
ABCD → EF
2.
EF → C
3.
a) Mostrare una relazione su tale schema che contenga almeno due tuple e verifichi le dipendenze, ed una
relazione che contenga almeno due tuple e non le verifichi.
b) Determinare se l’insieme delle dipendenze è minimale. Se non lo è, generare l’insieme di dipendenze
minimale equivalente a quello dato.
c) Determinare le chiavi della relazione.
d) Lo schema è in BCNF? È il 3NF? Giustificare le risposte.
e) Mostrare una decomposizione lossless join dello schema in 3NF che preservi le dipendenze.
f) Mostrare una decomposizione lossless join dello schema in BCNF che preservi le dipendenze.
g) Mostrare una decomposizione lossless join dello schema in BCNF che non preservi le dipendenze.
SOLUZIONE ESERCIZI NORMALIZZAZIONE
Sol1
Si consideri lo schema di relazione R = (A,B,C,D) e il seguente insieme di dipendenze funzionali:
1. A -> B
2. BC -> D
3. A -> C
Rispondere ai seguenti quesiti motivando le risposte date:
a) Determinare la chiave o le chiavi dello schema di relazione R.
Lo schema ha come chiave l’attributo A (A+=ABCD)
b) Determinare se R e’ in 3NF o BCNF.
2. La relazione non è in 3NF (dunque neanche in BCNF) a causa di BC -> D
c) Produrre eventuali decomposizioni e discutere la preservazione dei dati e delle dipendenze
funzionali
Una possibile decomposizione che preserva i dati e conserva le dipendenze funzionali è R1(A,B,C)
e R2(B,C,D) (applicare algoritmo scomposizione)
Sol2
Si consideri R(A,B,C,D); per ciascuno dei seguenti gruppi di dipendenze funzionali
1. ABC→D, D→A;
2. AB→C, AB→D, C→A, D→B;
determinare:
a) Tutte le chiavi di R.
1:abc, bcd
2:ab, bc, cd, ad
b) Se R è in 3NF.
1:Sì (verificare la definizione)
2:Sì
c) Se R è in BCNF; nel caso in cui non lo fosse, discutere l’esistenza (ed eventualmente proporre) di
una decomposizione che preservi le dipendenze funzionali.
1:No per D→A; spezzando R in AD e BCD non si preserva ABC→D quindi non esiste una
decomposizione BCNF
2:No per C→A e D→B; spezzando R in AC e BCD non si preservano AB→C e AB→D, inoltre BCD
non e’ in BCNF per D→B; spezzando R in AC, BD e CD dovremmo considerare anche ABC e ABD
per preservare le dipendenze ma sia ABC che ABD non sono in BCNF. Quindi non esiste una
scomposizione BCNF
Sol3
Si consideri lo schema di relazione R(A,B,C,D,E,F) e il seguente insieme di dipendenze funzionali F su tale
schema:
A→ B
1.
ABCD → EF
2.
EF → C
3.
a) Mostrare una relazione su tale schema che contenga almeno due tuple e verifichi le dipendenze, ed una
relazione che contenga almeno due tuple e non le verifichi.
A B C D E F
a1 b1 c1 d1 e1 f1
a2 b2 c2 d2 e2 f2
verifica
A B C D E F
a1 b1 ... ... ... …
a1 b2 ... ... ... ...
viola A B
b) Determinare se l’insieme delle dipendenze è minimale. Se non lo è, generare l’insieme di dipendenze
minimale equivalente a quello dato.
Non ci sono dipendenze ridondanti
B è ridondante in ABCD EF (B ∈ACD+), quindi la sostituisco con ACD EF
L’insieme minimale è {A B, ACD E, ACD F, EF C}
3. c) Determinare le chiavi della relazione.
AD non compare mai a dx, quindi ogni chiave contiene AD
AD+= ABD (AD da solo non è chiave)
ACD+= ABCDEF (ACD è chiave)
ADEF+= ABCDEF (ADEF è chiave)
Le uniche due chiavi sono ACD e ADEF
d) Lo schema è in BCNF? È il 3NF? Giustificare le risposte.
A B viola BCNF perché A non è (super) chiave
A B viola anche la 3NF perché B non è un attributo primo
Quindi lo schema non e’ 3NF né BCNF
e) Mostrare una decomposizione lossless join dello schema in 3NF che preservi le dipendenze.
Applico algoritmo per 3NF (la scomposizione risultate preserverà sempre le dipendenze – proprietà
dell’algoritmo)
Lo schema risultate è
AB AB chiave A
ACDE ACD E chiave ACD
ACDF ACD F chiave ACD
EFC EF C chiave EF
Questo schema è BCNF
f) Mostrare una decomposizione lossless join dello schema in BCNF che preservi le dipendenze.
Lo schema proposto al punto e)
g) Mostrare una decomposizione lossless join dello schema in BCNF che non preservi le dipendenze.
Applico algoritmo per BCNF
ABCDEF
ACDEF
AB
ACD --> EF EF --> C viola
A-->B
EF --> C
K: A
K:ACD
CEF ADEF
EF --> C 0
K: EF K: ADEF
La decomposizione non preserva le dipendenze. Perdo la dipendenza ACD EF.
Infatti, se F e’ l’insieme delle dipendenze associate alle foglie dell’albero precedente, in F, ACD+ non
contiene EF
4. ESERCIZI SQL + RELAZIONALE
Es 1
Si consideri il seguente schema relazionale, relativo agli spot pubblicitari proposti da varie emittenti
televisive (pk sottolineate, Attru: attributo soggetto al vincolo unique, Attrnn: attributo soggetto al vincolo not
null):
EMITTENTE(CodE, NomeEu,Tipo)
SPOT(CodS,NomeSnn,Prodottonn,TipoProdottonn)
TRASMETTE(CodEfk->Emittente.CodE,CodSfk->Spot.CodS,duratann)
Nello schema precedente, l’unità di misura del campo durata è in secondi.
Rispondere ai seguenti quesiti:
• Posso avere due emittenti con lo stesso nome ?
• Posso avere due spot relativi allo stesso prodotto ?
• Posso avere due spot relativi allo stesso tipo di prodotto ?
• Posso avere due spot della stessa durata ?
• Può uno stesso spot essere trasmesso da emittenti diverse ?
• Può uno stesso spot essere trasmesso dalla stessa emittente ?
Formulare le seguenti operazioni in SQL:
a) Determinare le emittenti regionali che trasmettono almeno uno spot sulla pasta Barilla, di durata
superiore a 30 secondi.
b) Determinare per ogni spot il numero totale di emittenti che lo trasmettono e la durata media.
c) Determinare per ogni emittente il nome dello spot trasmesso più lungo, insieme al prodotto a cui si
riferisce.
d) Determinare per ogni emittente i nomi degli spot relativi ad autovetture, di durata superiore alla durata
media degli spot trasmessi dall’emittente.
e) Si supponga che venga vietata la trasmissione di spot di telefonia cellulare di durata superiore a 40
secondi. Aggiornare la base di dati per tenere conto di questa nuova normativa.
Es 2
Si consideri il seguente schema relazionale:
Aereo(ACodice, Modello, Autonomia)
Impiegato(ICodice, Nome, Mansione, Stipendio)
Abilitazione(ICodice,ACodice)
Voli(VCodice, Da, A, Distanza, OraPartenza, OraArrivo)
Si formulino le seguenti interrogazioni sia in algebra relazionale che in SQL:
a) trovare i nomi dei piloti abilitati a pilotare aerei il cui modello è “Boeing”
b) trovare i codici degli impiegati con il salario più alto
c) trovare i codici degli impiegati con il secondo salario più alto
d) trovare il nome dei piloti abilitati a pilotare aeroplani con autonomia maggiore di 2000 miglia
che non siano abilitati a pilotare alcun aereo il cui modello è “Boeing”
Es 3
Si consideri il seguente schema relazionale:
MUSEI (Nome, Cittànn, Nazionenn, GiornoChiusurann)
ARTISTI (Nome, Nazionalitànn, DataNascitann, DataMorte)
5. OPERE (Codice, Titolonn, Statonn, Artistann, Museonnfk->Musei.Nome)
Rispondere ai seguenti quesiti utilizzando il linguaggio SQL:
a) trovare il codice, il titolo e lo stato delle opere di Leonardo conservate alla “National Gallery”
b) trovare il nome dell’artista ed il titolo delle opere conservate alla “Galleria degli Uffizi” o alla
“National Gallery”
c) trovare le città in cui son conservate opere di Leonardo
d) trovare il nome dell’artista ed il titolo delle opere di artisti italiani contemporanei conservate nei
musei di Londra
e) trovare il numero di opere di artisti italiani conservate in ciascun museo di Londra
f) trovare il nome dei musei di Londra che non conservano opere di Leonardo
g) trovare il nome dei musei di Londra che conservano solo opere di Leonardo
h) trovare i musei che conservano almeno 10 opere di artisti spagnoli del ventesimo secolo
i) trovare per ogni museo il numero di opere divise per la nazionalità degli artisti
SOLUZIONE ESERCIZI SQL + RELAZIONALE
Sol 1
SOLUZIONE QUESITI
• Posso avere due emittenti con lo stesso nome ? No a causa del vincolo unique su NomeE
• Posso avere due spot relativi allo stesso prodotto ? Sì
• Posso avere due spot relativi allo stesso tipo di prodotto ? Sì
• Posso avere due spot della stessa durata ? Sì
• Può uno stesso spot essere trasmesso da emittenti diverse ? Sì
• Può uno stesso spot essere trasmesso dalla stessa emittente ? No in quanto dovrei inserire una seconda tupla
con lo stesso valore di chiave primaria CodE,CodS nella relazione Trasmette
SOLUZIONE SQL
a) Determinare le emittenti regionali che trasmettono almeno uno spot sulla pasta Barilla, di durata
superiore a 30 secondi.
SELECT DISTINCT NomeE
FROM Emittente NATURAL JOIN Spot NATURAL JOIN Trasmette
WHERE Prodotto=’Pasta Barilla’ AND Durata > 30 AND Tipo = ‘Regionale’;
b) Determinare per ogni spot il numero totale di emittenti che lo trasmettono e la durata media.
SELECT CodS, COUNT(*), AVG(Durata)
FROM Trasmette
GROUP BY CodS;
c) Determinare per ogni emittente il nome dello spot trasmesso più lungo, insieme al prodotto a cui si
riferisce.
SELECT NomeE, NomeS, Prodotto
FROM Trasmette NATURAL JOIN Spot NATURAL JOIN Emittente E
WHERE Durata > = (SELECT MAX(Durata)
FROM Trasmette
WHERE CodE=E.CodE);
6. d) Determinare per ogni emittente i nomi degli spot relativi ad autovetture, di durata superiore alla durata
media degli spot trasmessi dall’emittente.
SELECT NomeE, NomeS
FROM Trasmette NATURAL JOIN Spot NATURAL JOIN Emittente E
WHERE TipoProdotto = ‘auto’ AND Durata > = (SELECT AVG(Durata)
FROM Trasmette
WHERE CodE=E.CodE);
e) Si supponga che venga vietata la trasmissione di spot di telefonia cellulare di durata superiore a 40
secondi. Aggiornare la base di dati per tenere conto di questa nuova normativa.
DELETE TRASMETTE
WHERE durata >= 40 AND CodS IN (SELECT CodS
FROM Spot
WHERE TipoProdotto=’Telefonia Cellulare’);
Sol 2
Si consideri il seguente schema relazionale:
Aereo(ACodice, Modello, Autonomia)
Impiegato(ICodice, Nome, Mansione, Stipendio)
Abilitazione(ICodice,ACodice)
Voli(VCodice, Da, A, Distanza, OraPartenza, OraArrivo)
Si formulino le seguenti interrogazioni sia in algebra relazionale (P=proiezione, S=selezione) che in SQL:
a) trovare i nomi dei piloti abilitati a pilotare aerei il cui modello è “Boeing”
R1:Picodice(Smodello=’boeing’(Aereo|><|Abilitazione))
R2:Pnome(R1|><|Impiegato)
select i.nome
from impiegato i, aereo a, abilitazione b
where a.acodice=b.acodice and i.icodice=b.icodice and a.modello=’boeing’
b) trovare i codici degli impiegati con il salario più alto
I1:Impiegato
I2:Impiegato
R1:PI2.icodice(I1|><|I1.stipendio>I2.stipendioI2)
Picodice(Impiegato)-R1
select i.icodice
from impiegato i
where i.stipendio=(select max(j.stipendio) from impiegato j)
c) trovare i codici degli impiegati con il secondo salario più alto
I1:Impiegato
I2:Impiegato
R1:PI2.icodice(I1|><|I1.stipendio>I2.stipendioI2)
I3:Impiegato|><|R1
7. I4:Impiegato|><|R1
R2:PI4.icodice(I3|><|I3.stipendio>I4.stipendioI4)
R1-R2
select i.icodice
from impiegato i
where i.stipendio=(select max(j.stipendio)
from impiegato j
where j.stipendio<>(select max(k.stipendio)
from impiegato k))
d) trovare il nome dei piloti abilitati a pilotare aeroplani con autonomia maggiore di 2000 miglia che non
siano abilitati a pilotare alcun aereo il cui modello è “Boeing”
R1:Picodice(Sautonomia>2000(Aereo|><|Abilitazione))
Pnome(Impiegato|><|(R1-(Picodice(Smodello=’boeing’(Aereo|><|Abilitazione)))))
select i.icodice, i.nome
from impiegato i, aereo a, abilitazione b
where a.acodice=b.acodice and i.icodice=b.icodice and a.autonomia>2000 and
i.icodice not in (select k.icodice
from aereo j, abilitazione k
where j.acodice=k.acodice and j.modello=’boeing’)
Sol3
Si consideri il seguente schema relazionale:
MUSEI (Nome, Cittànn, Nazionenn, GiornoChiusurann)
ARTISTI (Nome, Nazionalitànn, DataNascitann, DataMorte)
OPERE (Codice, Titolonn, Statonn, Artistannfk->Artisti.Nome, Museonnfk->Musei.Nome)
Rispondere ai seguenti quesiti utilizzando il linguaggio SQL:
a) trovare il codice, il titolo e lo stato delle opere di Leonardo conservate alla “National Gallery”
select o.codice, o.titolo, o.stato
from opere o
where o.artista=’leonardo’ and o.museo=’national gallery’;
b) trovare il nome dell’artista ed il titolo delle opere conservate alla “Galleria degli Uffizi” o alla
“National Gallery”
select o.artista, o.titolo
from opere o
where o.museo=’galleria degli uffizi’ or o.museo=’national gallery’;
c) trovare le città in cui son conservate opere di Leonardo
select distinct m.città
from opere o, musei m
where o.artista=’leonardo’ and o.museo=m.nome
d) trovare il nome dell’artista ed il titolo delle opere di artisti italiani contemporanei conservate nei
musei di Londra
8. select a.nome, o.titolo
from artisti a, opere o, musei m
where a.nome=o.artista and o.museo=m.nome and a.nazionalità=’italia’ and m.città=’londra’
and a.datamorte is null;
e) trovare il numero di opere di artisti italiani conservate in ciascun museo di Londra
select m.nome, count(*) as numopere
from artisti a, opere o, musei m
where a.nome=o.artista and o.museo=m.nome and a.nazionalità=’italia’ and m.città=’londra’
group by m.nome;
f) trovare il nome dei musei di Londra che non conservano opere di Leonardo
select m.nome
from musei m
where m.città=’londra’ and not exist (select * from opere o where o.nome=’leonardo’ and m.nome=o.museo);
g) trovare il nome dei musei di Londra che conservano solo opere di Leonardo
select m.nome
from musei m
where m.città=’londra’ and not exist (select * from opere o where o.nome<>’leonardo’ and m.nome=o.museo);
h) trovare i musei che conservano almeno 10 opere di artisti spagnoli del ventesimo secolo
select o.museo
from artisti a, opere o
where a.nome=o.artista and a.nazionalità=’spagna’ and a.datanascita>=’1/1/1900’
group by o.museo
having count(*)>9;
i) trovare per ogni museo il numero di opere divise per la nazionalità degli artisti
select o.museo, a.nazionalità, count(*) as numopere
from artisti a, opere o
where a.nome=o.artista
group by o.museo, a.nazionalità;
9. ESERCIZI PROGETTAZIONE
Si vuole sviluppare una base di dati per gestire la vendita di biglietti per concerti e spettacoli teatrali.
Ogni concerto è caratterizzato da un identificatore, il nome del cantante e alcune informazioni generali.
Ogni spettacolo teatrale è caratterizzato da un identificatore, il titolo dello spettacolo, la durata, il nome del
regista e il nome del protagonista.
Concerti e spettacoli teatrali sono tenuti in luoghi che possono essere teatri o stadio. Ogni teatro o stadio è
caratterizzato da un identificatore, un nome, un indirizzo, un numero di telefono e il numero complessivo di
posti disponibili. Per i teatri, si vuole inoltre mantenere informazioni circa l’orario di apertura del
botteghino. Mentre i concerti possono essere tenuti in stadi e teatri, gli spettacoli teatrali si svolgono
esclusivamente nei teatri.
Le performance (concerto o spettacolo teatrale) si svolgono in un certo luogo (teatro o stadio) in una certa
data, con una certa ora di inizio. La stessa performance può essere svolta nello stesso luogo o luoghi diversi,
in date e/o orari diversi.
Per ogni performance tenuta in un certo luogo in una certa data, ad una certa ora, si mantengono
informazioni circa i posti disponibili. In particolare, per ogni luogo (teatro o stadio), un posto è
caratterizzato da un numero di fila e un numero di posto. Per ogni posto si vuole inoltre sapere se il posto è
libero o occupato.
Motivando adeguatamente le scelte:
a) Effettuare la progettazione concettuale dello scenario descritto producendo il relativo schema ER.
b) Precisare eventuali vincoli di integrità non rappresentabili nello schema ER proposto e la tipologia delle
eventuali generalizzazioni.
c) Generare lo schema ristrutturato corrispondente allo schema ER definito al punto a).
d) Tradurre lo schema concettuale in uno schema logico del modello relazionale evidenziando
esplicitamente ogni tipo di vincolo utile a rappresentare lo scenario in esame.
SOLUZIONE ESERCIZI PROGETTAZIONE
NumFila NumPosto
Data OraI
Libero/occupato
(1,1)
POSTI PER PERFORMANCE IN
(1,1) (0,N)
(0,N)
(1,1)
TotPosti ID
Info (1,n)
SI FA Nome
Indirizzo
LUOGHI
CONCERTO (1,N) Telefono
(t,e)
(t,e)
SPETTACOLO
S. TEATRALE TEATRO STADIO
ID
Protagonista
OraABott
Titolo Regista
Durata
10. Vincoli:
• se uno spettacolo è teatrale allora il luogo in cui si svolge è un teatro
• i posti assegnati per una performance devono essere minore o uguale del totale dei posti del luogo
in cui la performance si deve tenere
La ristrutturazione considerata consiste nell’eliminazione delle entità figlie delle gerarchie di
generalizzazione totale ed esclusive presenti nello schema e nell’eliminazione dell’attributo multivalore Info
dell’entità concerto.
NumFila NumPosto Data OraI
Libero/occupato
(1,1)
POSTI PER PERFORMANCE IN
(1,1) (0,N)
(0,N)
(1,1)
SI FA
ID
(1,N)
TotPosti Nome
Indirizzo
LUOGHI
Tipo
Telefono
OraABott (0,1)
Titolo (0,1) (0,N) (1,N)
SPETTACOLO PER INFO
Durata (0,1) Nota
Regista (0,1)
ID
Protagonista Tipo
Vincoli aggiuntivi su schema ristrutturato
• Spettacolo.Tipo ∈ {‘concerto’,’teatrale’}
• Spettacolo.Titolo ≠ NULL sse Spettacolo.Tipo = ‘teatrale’. Stessa cosa per Durata e Regista
• Luoghi.Tipo Tipo ∈ {‘teatro,stadio}
• Luoghi.OraABott ≠ NULL sse Luoghi.Tipo = ‘teatro’
Luoghi(ID,Tiponn,TotPostinn,Nomenn,Indirizzonn,Telefononn,OraABott)
Performance(Luogofk->Luoghi.ID,Data,OraI,Spettacolonnfk->Spettacolo.ID)
Posti(Datafk->Performance.Data,Luogofk->Performance.Luogo,OraIfk->Performance.OraI,NumPosto,NumFila,Libero/Occupatonn)
Spettacolo(ID,Tiponn,Titolo,Durata,Regista,Protagonistann)
InfoPer(Spettacolofk->Spettacolo.ID,Notafk->Info.Nota)
Info(Nota)
Vincoli aggiuntivi su schema relazionale
∀i ∈ INFO, ∃p ∈ INFOPER | i.nota = p.nota
•
∀s ∈ SPETTACOLO, ∃p ∈ PERFORMANCE | s.ID = p.Spettacolo
•