SHARE
TWEET

table.sql

rotno98 Feb 23rd, 2020 102 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. CREATE TABLE Customer
  3. (
  4.     Cust_id     VARCHAR2(12)  NOT NULL,
  5.     Cust_name   VARCHAR2(12),
  6.     Cust_dob    DATE,
  7.     Cust_street VARCHAR2(12),
  8.     Cust_city   VARCHAR2(12)
  9. );
  10.  
  11. CREATE TABLE Account
  12. (
  13.     Account_id  VARCHAR2(12)  NOT NULL,
  14.     Balance     NUMBER(20,5),
  15.     TYPE        VARCHAR2(8)
  16. );
  17.  
  18. CREATE TABLE Branch
  19. (
  20.     Branch_name VARCHAR2(14)  NOT NULL,
  21.     Branch_city VARCHAR2(10),
  22.     Assets      NUMBER(20,5)
  23. );
  24.  
  25. CREATE TABLE Employee
  26. (
  27.     Employee_id VARCHAR2(12),
  28.     Employee_name   VARCHAR2(20),
  29.     Employee_dob    DATE,
  30.     Employee_street VARCHAR2(20),
  31.     Employee_city   VARCHAR2(20),
  32.     Employee_startdate DATE,
  33.     Salary      NUMBER(10,3),
  34.     MGR     VARCHAR2(12)
  35. );
  36.  
  37. CREATE TABLE SALGRADE
  38. (
  39.     GRADE   VARCHAR2(5)  NOT NULL,
  40.     LOSAL   NUMBER(10,3),
  41.     HISAL   NUMBER(10,3)   
  42. );
  43.  
  44. CREATE TABLE Loan
  45. (
  46.     Loan_id     VARCHAR2(12)  NOT NULL,
  47.     Amount      NUMBER(20,5)               
  48. );
  49. CREATE TABLE RETURN
  50. (
  51.     Payment_id  VARCHAR2(12)  NOT NULL,
  52.     Loan_id     VARCHAR2(12)  NOT NULL
  53. );
  54.  
  55. CREATE TABLE Loan_return
  56. (
  57.     Payment_id  VARCHAR2(12)  NOT NULL,
  58.     Payment_amount  NUMBER(20,5),              
  59.     Payment_date    DATE
  60. );
  61.  
  62. CREATE TABLE InfoTran
  63. (
  64.     Transaction_id   VARCHAR2(20) NOT NULL,
  65.     Transaction_date DATE,
  66.     TYPE         VARCHAR2(8),
  67.     Amount       NUMBER(20,5)
  68. );
  69.  
  70. CREATE TABLE TRANSACTION
  71. (
  72.     Transaction_id   VARCHAR2(20) NOT NULL,
  73.     Account_id   VARCHAR2(12) NOT NULL
  74. );
  75. CREATE TABLE Borrower
  76. (
  77.     Cust_id     VARCHAR2(12)  NOT NULL,
  78.     Loan_id     VARCHAR2(12)  NOT NULL
  79. );
  80. CREATE TABLE Depositor
  81. (
  82.     Cust_id     VARCHAR2(12)  NOT NULL,
  83.     Account_id   VARCHAR2(12) NOT NULL
  84. );
  85.  
  86. CREATE TABLE Cust_banker
  87. (
  88.     Customer_id     VARCHAR2(12)  NOT NULL,
  89.     Employee_id VARCHAR2(12)  NOT NULL     
  90. );
  91. CREATE TABLE Loan_Branch
  92. (
  93.     Loan_id     VARCHAR2(12)  NOT NULL,
  94.     Branch_name VARCHAR2(14)  NOT NULL
  95. );
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top