100% de satisfacción garantizada Inmediatamente disponible después del pago Tanto en línea como en PDF No estas atado a nada 4.2 TrustPilot
logo-home
Otro

INF assignment 3 solutions

Puntuación
-
Vendido
6
Páginas
8
Subido en
04-07-2023
Escrito en
2022/2023

Contains precise solutions for the 3rd assignment

Institución
Grado









Ups! No podemos cargar tu documento ahora. Inténtalo de nuevo o contacta con soporte.

Libro relacionado

Escuela, estudio y materia

Institución
Grado

Información del documento

Subido en
4 de julio de 2023
Número de páginas
8
Escrito en
2022/2023
Tipo
Otro
Personaje
Desconocido

Temas

Vista previa del contenido

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));
$5.15
Accede al documento completo:

100% de satisfacción garantizada
Inmediatamente disponible después del pago
Tanto en línea como en PDF
No estas atado a nada

Conoce al vendedor

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
CrystalIndigo University of South Africa (Unisa)
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
486
Miembro desde
5 año
Número de seguidores
226
Documentos
73
Última venta
2 meses hace
CrystalIndigo Solutions

providing all solutions to all computer science modules

4.1

51 reseñas

5
27
4
13
3
6
2
1
1
4

Recientemente visto por ti

Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes