Untitled
CREATEBALANCE63SQL> CREATE TABLE BRANCH_SCHEMA(BRANCH_NAME VARCHAR(20) PRIMARY KEY, BRANCH_CITY VARCHAR(20), ASSET INT); Table created. SQL> CREATE TABLE CUSTOMER029(CUSTOMER_NAME VARCHAR(20), CUSTOMER_STREET VARCHAR (20), CUSTOMER_CITY VARCHAR(20), PRIMARY KEY(CUSTOMER_NAME)); Table created. SQL> CREATE TABLE LOAN29(LOAN_NO INT, BRANCH_NAME NOT NULL, AMOUNT INT NOT NULL, PRIMARY KEY(LOAN_NO), FOREIGN KEY(BRANCH_NAME) REFERENCES BRANCH_SCHEMA(BRANCH_ NAME)); Table created. SQL> CREATE TABLE LOAN029(LOAN_NO INT, BRANCH_NAME VARCHAR(20) NOT NULL, AMOUNT INT NOT NULL, PRIMARY KEY(LOAN_NO), FOREIGN KEY(BRANCH_NAME) REFERENCES BRANCH_S CHEMA(BRANCH_NAME)); Table created. CREATEBALANCE63SQL> CREATE TABLE BRANCH_SCHEMA(BRANCH_NAME VARCHAR(20) PRIMARY KEY, BRANCH_CITY VARCHAR(20), ASSET INT); Table created. SQL> CREATE TABLE CUSTOMER029(CUSTOMER_NAME VARCHAR(20), CUSTOMER_STREET VARCHAR (20), CUSTOMER_CITY VARCHAR(20), PRIMARY KEY(CUSTOMER_NAME)); Table created. SQL> CREATE TABLE LOAN29(LOAN_NO INT, BRANCH_NAME NOT NULL, AMOUNT INT NOT NULL, PRIMARY KEY(LOAN_NO), FOREIGN KEY(BRANCH_NAME) REFERENCES BRANCH_SCHEMA(BRANCH_ NAME)); Table created. SQL> CREATE TABLE LOAN029(LOAN_NO INT, BRANCH_NAME VARCHAR(20) NOT NULL, AMOUNT INT NOT NULL, PRIMARY KEY(LOAN_NO), FOREIGN KEY(BRANCH_NAME) REFERENCES BRANCH_S CHEMA(BRANCH_NAME)); Table created. SQL> CREATE TABLE BORROWER029(CUSTOMER_NAME VARCHAR(20) NOT NULL, LOAN_NO INT NO T NULL, FOREIGN KEY(CUSTOMER_NAME) REFERENCES CUSTOMER029(CUSTOMER_NAME), FOREIG N KEY(LOAN_NO) REFERENCES LOAN029(LOAN_NO)); Table created. SQL> CREATE TABLE ACCOUNT029(ACC_NO INT, BRANCH_NAME VARCHAR(20) NOT NULL, BALAN CE INT NOT NULL, PRIMARY KEY(ACC_NO), FOREIGN KEY(BRANCH_NAME) REFERENCES BRANCH _SCHEMA(BRANCH_NAME)); Table created. SQL> CREATE TABLE DEPOSIT029(CUSTOMER_NAME VARCHAR(20) NOT NULL, ACC_NO INT NOT NULL, FOREIGN KEY(CUSTOMER_NAME) REFERENCES CUSTOMER029(CUSTOMER_NAME), FOREIGN KEY(ACC_NO) REFERENCES ACCOUNT029(ACC_NO)); Table created. QUERY SQL> CREATE TABLE BORROWER029(CUSTOMER_NAME VARCHAR(20) NOT NULL, LOAN_NO INT NO T NULL, FOREIGN KEY(CUSTOMER_NAME) REFERENCES CUSTOMER029(CUSTOMER_NAME), FOREIG N KEY(LOAN_NO) REFERENCES LOAN029(LOAN_NO)); Table created. SQL> CREATE TABLE ACCOUNT029(ACC_NO INT, BRANCH_NAME VARCHAR(20) NOT NULL, BALAN CE INT NOT NULL, PRIMARY KEY(ACC_NO), FOREIGN KEY(BRANCH_NAME) REFERENCES BRANCH _SCHEMA(BRANCH_NAME)); Table created. SQL> CREATE TABLE DEPOSIT029(CUSTOMER_NAME VARCHAR(20) NOT NULL, ACC_NO INT NOT NULL, FOREIGN KEY(CUSTOMER_NAME) REFERENCES CUSTOMER029(CUSTOMER_NAME), FOREIGN KEY(ACC_NO) REFERENCES ACCOUNT029(ACC_NO)); Table created. QUERY
Leave a Comment