NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

/*BANCO DE DADOS
II EXERCICIO DE PL/SQL PARA O DIA 23/08/2016
PROF ISRAEL GERALDI
Declarar a tabela CONTAS, MOVIMENTOSIMENTOs E AGENCIAS com as colunas:

CONTAS - 6 linhas
"nr_conta" do tipo number (chave primária)
"nr_agencia" do tipo number (chave estrangeira)
"Saldo" do tipo number (15,2);

MOVIMENTOS - 12 linhas
"nr_mov" do tipo number (chave primária)
"nr conta" do tipo number (chave estrangeira)
"dt mov" do tipo date
"tp_movimento" do tipo char ("C" p/ crédito e "S" pl débito)
"nr_agencia_mov" do tipo number (chave estrangeira)
"valor" do tipo number(15,2);

AGENCIAS - 4 linhas
"nr_agencia" do tipo number, (chave primária)
"cidade" varchar2(20);

2)Inserir pelo menos 6 linhas na tabela CONTAS. Para a coluna "saldo" considerar sempre "0"
3)Inserir pelo menos 12 linhas na tabela MOVIMENTOS
4)Criar uma Trigger que, utilizando uma sequence previamente declarada, gere automaticamente a coluna "nr_mov"
5)Criar uma Trigger para atualizar automaticamente a coluna "saldo" da tabela CONTAS, toda vez que uma linha for inserida na tabela MOVIMENTOS.
6)Criar uma função para, dada uma cidade retornar o total (em valor) de movimentos créditos nela ocorrido. A cidade considerada é aquela da agência onde ocorreu o movimento e não da agência da conta.
7)Criar outra função para, dada uma cidade, retornar a quantidade de movimentos e crédito nela ocorrido. Idem consideração do local da agência acima
8)Criar uma PROCEDURE para gerar o relatório de ITOS ocorridos em cada cidade, conforme o layout abaixo:
CIDADE || TOTAL CREDITOS || QTDE MOV CREDITOS || VALOR MEDIO CREDITO
(Obs: Também, aqui, a cidade considerada é aquela da agência onde ocorreu o movimento e não da agência da conta. Utilizar as FUNÇÕES criadas nos exercícios anteriores)*/

     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.