Banking Scenario Procedure Database SQL

Added on - Oct 2019

Trusted by 2+ million users,
1000+ happy students everyday
Showing pages 1 to 3 of 9 pages
STUDENT08OCTOBER,2016BANKINGSCENARIOPROCEDURES
ContentsER DIAGRAM...........................................................................................................................2CREATE AND INSERT TABLE COMMANDS....................................................................2SQL PROCEDURES.................................................................................................................31|P a g e
ER DIAGRAMAs mentioned in the mail by you, that you have already drawn the ERD. So ERD is notmissing. You can paste the ERD in this area.CREATE AND INSERT TABLE COMMANDSCREATE SEQUENCE c1MINVALUE 1MAXVALUE 999999START WITH 1INCREMENT BY 1CACHE 20;CREATE SEQUENCE T1MINVALUE 1MAXVALUE 999999START WITH 1INCREMENT BY 1CACHE 20;create table customer(cust_id int primary key,cust_type varchar2(20),fname varchar2(20),lname varchar2(20),street varchar2(30),city varchar2(30),zip number(6,0),state varchar2(30),gender char(1),constraint chk_1 check (cust_type IN ('small business', 'large business', 'personal')),constraint chk_2 check (gender IN ('M', 'F')));INSERT INTO CUSTOMER VALUES (C1.NEXTVAL, 'small business', 'JIA', 'STEVEN','21 PARK STREET', 'ASPEN', 889988, 'CA', 'F');INSERT INTO CUSTOMER VALUES (C1.NEXTVAL, 'large business', 'DIA', 'STONES','212 PARK VIEW ROAD', 'ASPEN', 889908, 'CA', 'F');INSERT INTO CUSTOMER VALUES (C1.NEXTVAL, 'personal', 'LIA', 'DAVID', '41GREEN PARK STREET', 'ASPEN', 889918, 'CA', 'F');create table account( acct_id int primary key,cust_id int,acct_type varchar2(20) not null,acct_num number(16,0)unique ,balance number(10,2),constraint fk_1 foreign key(cust_id) references customer(cust_id),2|P a g e
Desklib Logo
You are reading a preview
Upload your documents to download or

Become a Desklib member to get access