100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4.2 TrustPilot
logo-home
Overig

INF assignment 3 solutions

Beoordeling
-
Verkocht
6
Pagina's
8
Geüpload op
04-07-2023
Geschreven in
2022/2023

Contains precise solutions for the 3rd assignment

Instelling
Vak









Oeps! We kunnen je document nu niet laden. Probeer het nog eens of neem contact op met support.

Gekoppeld boek

Geschreven voor

Instelling
Vak

Documentinformatie

Geüpload op
4 juli 2023
Aantal pagina's
8
Geschreven in
2022/2023
Type
Overig
Persoon
Onbekend

Onderwerpen

Voorbeeld van de inhoud

INF3707 2023 ASSIGNMENT 3
SOLUTIONS

Crystal Indigo!
Crystal Indigo!
Providing all solutions you need anytime
+27 76 626 8187

, Question 1 Chapter 6
1.1 Create a sequence that generates integers starting with the value
5. Each value should be three less than the previous value generated.
The lowest value should be 0, and the sequence should not be allowed
to cycle. Name the sequence MY_FIRST_SEQ.
CREATE SEQUENCE MY_FIRST_SEQ
INCREMENT BY -3
START WITH 5
MAXVALUE 5
MINVALUE 0
NOCYCLE;

1.2 Issue a SELECT statement that displays NEXTVAL for
MY_FIRST_SEQ three times. Since the value is not being stored in the
table, use dual table in the FROM clause of the SELECT statement. What
caused the error on the third SELECT?
SELECT MY_FIRST_SEQ.NEXTVAL
FROM DUAL;
you would encounter an error similar to "ORA-08002: sequence MY_FIRST_SEQ.NEXTVAL
exceeds MAXVALUE and cannot be instantiated." This error occurs because the sequence has
reached its maximum value and cannot generate a new value.

1.3 Evaluate the SQL commands


Generally the error is being caused when working with SYSDATE, the table is checking the
expiry_date with SYSDATE. So each time when the system date change it will not be validated.
create table ord_items
(ord_no NUMBER(4) DEFAULT ord_seq.ord_seq.NEXTVAL NOT NULL,
Item_no NUMBER(3),
qty NUMBER(3) CHECK (qty BETWEEN 100 AND 200),
todays_date date DEFAULT SYSDATE,
expiry_date date ,
CONSTRAINT its_pky PRIMARY KEY (ord_no,Item_no),
CONSTRAINT ord_fky FOREIGN KEY (ord_no) references orders(order#),
CONSTRAINT check_expiry CHECK(expiry_date> todays_date));

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
CrystalIndigo University of South Africa (Unisa)
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
486
Lid sinds
5 jaar
Aantal volgers
226
Documenten
73
Laatst verkocht
1 maand geleden
CrystalIndigo Solutions

providing all solutions to all computer science modules

4,1

51 beoordelingen

5
27
4
13
3
6
2
1
1
4

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Veelgestelde vragen