Beruflich Dokumente
Kultur Dokumente
Anthony Beltran
Spring 2016
CS 4332
Chapter 1: Introduction
1.1 Motivation
For this project, I chose to implement a system for a bank. The motive behind this decision
was to choose a company in which I would like to learn more about how its database system
works. I also wanted a company that I deal with on a regular basis, and my decision came to be
a bank. Many of my colleagues work in banks as well, and I believe it would be an interesting
choice for me to develop a system and relational database for a bank.
BANK TELLER
Database Developer: What is your role in the company?
Bank Teller:
I process transactions from customers, receive cash and checks for deposit,
and enter customer transactions into computers.
Data Specialist:
I am mostly making sure the data is accurate and there is no errors in our
records.
I also need to be able to read and search for any information that I may
need.
ASSISTANT MANAGER
Database Developer: What is your role in the company?
Assistant Manager: I help the branch manager by helping oversee branch operations.
Database Developer: What data do you work with?
Assistant Manager: I look into employee information, transactions, customer information, and
accounts.
Database Developer: What do you do with the data?
Assistant Manager: I need access to update employee, customer, accounts, and transactions.
Database Developer: What reports do you use?
Assistant Manager: I need to read employee information and search for customers. I also
search for account and transaction information.
Fig 2.1 shows the form that a customer will have to fill out when setting up a new account with
the bank.
Fig 2.2 shows the form that all Bank employees must fill out in order to save their records into
the database.
Fig 2.3 shows the loan application form that a new, or existing, customer must fill out for a loan
from the bank.
Fig 2.4 shows a customer information form filled out by customer, Mary Reese, who is setting up
a checkings account with the bank.
Fig. 2.6: Existing bank customer filling out a loan application form
In Fig 4.1, we see the relation of Employees. This relation stores data for each person that is
employed by the bank. The data that is recorded for each employee is their social security
numbers, their salary, the level access, the branch of the bank they are employed in, and the id
for their job title. We will describe the following attributes in more detail:
Attributes
EMPID
o This attribute stores an ID that uniquely defines each individual employee that
works for the bank.
SSN
o This attribute stores the social security number of an employee.
SALARY
o Each employee also has a salary, which is inserted in this attribute.
LEVELACCESS
o This attribute is a security level set for each employee that limits particular
actions each employee is able to do such as approvals, access permissions, etc.
BRANCHID
o This attribute refers to the ID for a particular branch of the bank. Each employee
belongs to a certain branch of the bank.
TITLEID
o This attribute refers to the ID of the job title for the employee.
Fig 4.2 shows the relation description of Branches. This relation keeps the data for each
individual branch of the bank. Each bank branch has an address and a phone number for
contacting that branch.
Attributes
BRANCHID
o Each branch of the bank is given a unique ID that defines that particular branch.
This attribute stores the ID for a particular branch.
BADDRESS
o This attribute stores the address for each branch of the bank.
PHONE
o This attribute contains the main phone number of contact for that particular
branch.
The JobTitle relation seen in Fig 4.3 keeps data stored for each particular job position in the
bank. Each job position has a unique ID, a name, and a job description of the responsibilities and
duties.
Attributes
TITLEID
o This attribute contains an ID for a particular job position in the bank.
TITLENAME
o This attribute simply contains the name of the job position.
TITLEDESC
o This attribute briefly describes the responsibilities that come with a particular job
position in the bank.
Fig 4.4 shows the relation Accounts of the bank database. This relation contains a unique
account for each customer with other information. It shows the account type for each particular
account, as well as the current balance, status, and bank branch associated with it.
Attributes
ACCID
o This attribute is a unique ID given to each bank account.
ACCTYPE
o A customer can open a checking account or a savings account with the bank.
This attribute contains the type of account a particular customer opened.
BALANCE
o This attribute has the current balance for a certain account.
STATUS
o A bank account can be considered open or temporarily closed depending on
certain circumstances. This attribute contains the status that an account can be in.
BRANCHID
o Each account is associated with a certain branch of the bank. This attribute
contains the ID of the branch associated with the account.
CUSTOMERID
o This attribute holds the ID of the customer that the bank account belongs to.
Fig 4.5 shows the relation that holds a unique ID for each customer of the bank as well as their
social security number.
Attributes
CUSTOMERID
o This attribute contains the unique ID for each customer of the bank.
SSN
o This attribute contains the social security number for every customer.
The relation Persons is shows in Fig 4.6, and it contains additional information for each
employee and customer. This additional information includes first name, last name, pin number,
address, and phone number.
Attributes
PERSONSID
o This attribute contains a unique ID that identifies the customer or employee in the
relation.
PIN
o Each employee and customer with a bank account has a PIN number that they set
up. This attribute holds the PIN number that allows access to their bank account.
FNAME
o This attribute simply contains the persons first name.
LASTNAME
o This attribute simply contains the persons last name.
ADDRESS
o This attribute has the persons primary address given to the bank.
PHONE
o This attribute has the persons primary phone number.
CUSTOMERID
o This attribute holds the ID associated with a customer of the bank.
EMPID
o This attribute holds the ID associated with an employee of the bank.
This relation has information on every transaction of an account associated with the bank. The
transaction information saved includes transaction type, payment type, payment amount, account
associated with the transaction, and the loan ID if applicable.
Attributes
TRANSID
o This attribute is a unique ID for each transaction saved in the relation.
TRANSTYPE
o This attribute contains the type of transaction that was processed. There are
several types of transactions:
Void an approved transaction has been revoked or prevented
Refund a specific amount of money has been returned to an account
Payment a specific amount of money has been charged to an account
LOANID
o This attribute contains a unique ID given to a loan that a customer applied for.
ACCID
o This attribute contains a unique ID that identifies a particular bank account.
PAYMENTTYPE
o A payment can be classified by several types check, credit, and debit.
PAYMENTAMOUNT
o This attribute contains the amount of money that was charged, refunded, or
voided.
Fig 4.8 shows the Loans relation which stores the data for loans. Each loan has a unique ID as
well as the interest rate and amount.
Attributes
LOANID
o This attribute contains the unique ID associated with a loan.
INTERESTRATE
o Each loan comes with an interest rate, and this attribute contains the interest
associated with that loan.
AMOUNT
o This attribute holds the amount of money that a loan was granted to a person.
The relation shown in Fig 4.9 shows additional information on a particular transaction type. A
tuple in this relation is composed of a transaction type followed by its description.
Attributes
TRANSTYPE
o This attribute specifies a particular transaction type, such as: payment, refund, or
void.
DESCRIPTION
o This attribute gives additional information on a transaction type.
EMPLOYEES
Functional dependencies
Normalized entity
BRANCHES
Functional dependencies
Normalized entity
ACCOUNTS
Functional dependencies
Normalized entity
JOBTITLE
Functional dependencies
Normalized entity
CUSTOMERS
Functional dependencies
Normalized entity
PERSONS
Functional dependencies
Normalized entity
TRANSACTIONS
Functional dependencies
Normalized entity
LOANS
Functional dependencies
Normalized entity
TRANSACTIONTYPES
Functional dependencies
Normalized entity
Now that the relations are normalized and they have primary and foreign keys defined,
we will see example tuples for each relation in the database.
EMPLOYEES
Fig. 4.9: Example tuples for Employees relation
BRANCHES
Fig. 4.10: Example tuples for Branches relation
ACCOUNTS
Fig. 4.11: Example tuples for Accounts relation
JOBTITLE
Fig. 4.12: Example tuples for JobTitle relation
PERSONS
Fig. 4.13: Example tuples for Persons relation
TRANSACTIONS
Fig. 4.14: Example tuples for Transactions relation
LOANS
Fig. 4.15: Example tuples for Loans relation
TRANSACTIONTYPES
Fig. 4.16: Example tuples for TransactionTypes relation
In this section, I will show the ER model of the system. The following entities in the ER
diagram will have relationships using the crows feet notation. All primary keys will be
underlined in each entity, and any foreign keys will be labeled (FK) next to the attribute.
E/R MODEL
Fig. 4.17: ER Model of system
ACCOUNTS
BRANCHES
CUSTOMERS
INSERT
INSERT
INSERT
INSERT
INSERT
INSERT
INSERT
INSERT
INSERT
INSERT
INSERT
INSERT
INTO
INTO
INTO
INTO
INTO
INTO
INTO
INTO
INTO
INTO
INTO
INTO
"HR"."CUSTOMERS"
"HR"."CUSTOMERS"
"HR"."CUSTOMERS"
"HR"."CUSTOMERS"
"HR"."CUSTOMERS"
"HR"."CUSTOMERS"
"HR"."CUSTOMERS"
"HR"."CUSTOMERS"
"HR"."CUSTOMERS"
"HR"."CUSTOMERS"
"HR"."CUSTOMERS"
"HR"."CUSTOMERS"
Commit Successful
(CUSTOMERID,
(CUSTOMERID,
(CUSTOMERID,
(CUSTOMERID,
(CUSTOMERID,
(CUSTOMERID,
(CUSTOMERID,
(CUSTOMERID,
(CUSTOMERID,
(CUSTOMERID,
(CUSTOMERID,
(CUSTOMERID,
SSN)
SSN)
SSN)
SSN)
SSN)
SSN)
SSN)
SSN)
SSN)
SSN)
SSN)
SSN)
VALUES
VALUES
VALUES
VALUES
VALUES
VALUES
VALUES
VALUES
VALUES
VALUES
VALUES
VALUES
('C067',
('C088',
('C128',
('C145',
('C175',
('C198',
('C203',
('C234',
('C251',
('C295',
('C344',
('C373',
'681-03-7743')
'548-15-3756')
'390-70-5446')
'523-77-4398')
'636-44-8934')
'168-03-2451')
'259-24-1132')
'120-03-5665')
'250-31-1164')
'619-82-4343')
'456-12-9957')
'044-92-0143')
EMPLOYEES
JOBTITLE
LOANS
PERSONS
INSERT INTO "HR"."PERSONS" (PERSONSID, PIN, FNAME, LNAME, ADDRESS, PHONE, CUSTOMERID)
VALUES ('P001', '1663', 'Mary', 'Reese', '1427 Caynor Circle, Newark, NJ 07102', '908-5431663', 'C067')
INSERT INTO "HR"."PERSONS" (PERSONSID, PIN, FNAME, LNAME, ADDRESS, PHONE, CUSTOMERID)
VALUES ('P002', '1222', 'Marcellus', 'Goodsell', '3476 Penn Street, Van Buren, MO 63965',
'573-323-1222', 'C088')
INSERT INTO "HR"."PERSONS" (PERSONSID, PIN, FNAME, LNAME, ADDRESS, PHONE, CUSTOMERID)
VALUES ('P003', '8390', 'Carol', 'Carrington', '4128 Pursglove Court, Dayton, OH 45402',
'937-310-8390', 'C128')
INSERT INTO "HR"."PERSONS" (PERSONSID, PIN, FNAME, LNAME, ADDRESS, PHONE, CUSTOMERID)
VALUES ('P004', '2010', 'Roland', 'Dawson', '1339 Oakwood Avenue, New York, NY 10011',
'212-675-0201', 'C145')
INSERT INTO "HR"."PERSONS" (PERSONSID, PIN, FNAME, LNAME, ADDRESS, PHONE, CUSTOMERID)
VALUES ('P005', '9591', 'James', 'Yates', '2736 Adamsville Road, Pharr, TX 78577', '956784-9591', 'C175')
INSERT INTO "HR"."PERSONS" (PERSONSID, PIN, FNAME, LNAME, ADDRESS, PHONE, CUSTOMERID)
VALUES ('P017', '8888', 'David', 'Patterson', '3722 Wilson Av, Farmers Branch, TX 75234',
'972-484-8888', 'C198')
INSERT INTO "HR"."PERSONS" (PERSONSID, PIN, FNAME, LNAME, ADDRESS, PHONE, CUSTOMERID)
VALUES ('P006', '3457', 'Arthur', 'Kim', '2041 Union St, Seattle, WA 98101', '206-7973457', 'C203')
INSERT INTO "HR"."PERSONS" (PERSONSID, PIN, FNAME, LNAME, ADDRESS, PHONE, CUSTOMERID)
VALUES ('P007', '1119', 'Ronald', 'Marvin', '1967 Stiles St, Crafton, PA 15205', '412-6134568', 'C234')
INSERT INTO "HR"."PERSONS" (PERSONSID, PIN, FNAME, LNAME, ADDRESS, PHONE, CUSTOMERID)
VALUES ('P008', '5708', 'Michael', 'Dandridge', '1160 Red Dog Rd, Charlotte, NC 28202',
'704-319-1119', 'C251')
INSERT INTO "HR"."PERSONS" (PERSONSID, PIN, FNAME, LNAME, ADDRESS, PHONE, CUSTOMERID)
VALUES ('P009', '7408', 'Paul', 'Paxton', '4603 Angus Rd, New York, NY 10016', '212-4545708', 'C295')
INSERT INTO "HR"."PERSONS" (PERSONSID, PIN, FNAME, LNAME, ADDRESS, PHONE, CUSTOMERID)
VALUES ('P010', '5802', 'Sandy', 'Byrd', '1897 Emily Blvd, San Jose, CA 95134', '831-6007408', 'C344')
INSERT INTO "HR"."PERSONS" (PERSONSID, PIN, FNAME, LNAME, ADDRESS, PHONE, CUSTOMERID)
VALUES ('P011', '2222', 'Caroline', 'Hardy', '1597 Agriculture Ln, Charleston, WV 25301',
'304-989-5802', 'C373')
INSERT INTO "HR"."PERSONS" (PERSONSID, PIN, FNAME, LNAME, ADDRESS, PHONE, EMPID)
VALUES ('P013', '7159', 'Rose', 'Daigle', '2963 Heavner Avenue Carrollton, GA 30117',
'770-838-7159', 'E004')
INSERT INTO "HR"."PERSONS" (PERSONSID, PIN, FNAME, LNAME, ADDRESS, PHONE, EMPID)
VALUES ('P014', '1234', 'Sandra', 'Shorter', '1887 Rainbow Drive Mansfield, OH 44907',
'330-449-3047', 'E024')
INSERT INTO "HR"."PERSONS" (PERSONSID, PIN, FNAME, LNAME, ADDRESS, PHONE, EMPID)
VALUES ('P016', '1977', 'Vincent', 'Nagel', '389 Hall Street Las Vegas, NV 89101', '702553-9728', 'E018')
INSERT INTO "HR"."PERSONS" (PERSONSID, PIN, FNAME, LNAME, ADDRESS, PHONE, EMPID)
VALUES ('P018', '2456', 'Elizabeth', 'Wortham', '1172 Steve Hunt Road Miami, FL 33138',
'305-758-9325', 'E021')
INSERT INTO "HR"."PERSONS" (PERSONSID, PIN, FNAME, LNAME, ADDRESS, PHONE, EMPID)
VALUES ('P019', '1836', 'Donald', 'Jackson', '590 Stuart Street Grove City, PA 16127',
'724-450-1836', 'E008')
INSERT INTO "HR"."PERSONS" (PERSONSID, PIN, FNAME, LNAME, ADDRESS, PHONE, EMPID)
VALUES ('P057', '8934', 'Arlette', 'Salley', '3132 Alpha Avenue Plano, TX 75074', '903943-4908', 'E052')
INSERT INTO "HR"."PERSONS" (PERSONSID, PIN, FNAME, LNAME, ADDRESS, PHONE, EMPID)
VALUES ('P098', '2910', 'Mel', 'Murphy', '4141 Stratford Park Evansville, IN 47708', '812763-2910', 'E060')
INSERT INTO "HR"."PERSONS" (PERSONSID, PIN, FNAME, LNAME, ADDRESS, PHONE, EMPID)
VALUES ('P114', '1989', 'John', 'Reilly', '2149 Chandler Drive Springfield, MO 65806',
'417-726-5439', 'E075')
INSERT INTO "HR"."PERSONS" (PERSONSID, PIN, FNAME, LNAME, ADDRESS, PHONE, EMPID)
VALUES ('P123', '4288', 'Glen', 'Garcia', '970 Gladwell Street Collierville, TN 38017',
'901-861-4285', 'E011')
INSERT INTO "HR"."PERSONS" (PERSONSID, PIN, FNAME, LNAME, ADDRESS, PHONE, EMPID)
VALUES ('P134', '6665', 'Benita', 'Thomas', '4739 Ventura Drive Salinas, CA 93901', '831263-5553', 'E033')
INSERT INTO "HR"."PERSONS" (PERSONSID, PIN, FNAME, LNAME, ADDRESS, PHONE, EMPID)
VALUES ('P146', '3959', 'Bernard', 'Barnes', '2764 Honeysuckle Lane Seattle, WA 98101',
'360-552-8515', 'E045')
INSERT INTO "HR"."PERSONS" (PERSONSID, PIN, FNAME, LNAME, ADDRESS, PHONE, EMPID)
VALUES ('P234', '3687', 'Tressie', 'Quezada', '2228 Steele Street Aurora, IL 60504', '630728-3682', 'E019')
INSERT INTO "HR"."PERSONS" (PERSONSID, PIN, FNAME, LNAME, ADDRESS, PHONE, EMPID)
VALUES ('P321', '4848', 'Nathan', 'Rowell', '3814 Melm Street Providence, RI 02903', '401237-4841', 'E050')
INSERT INTO "HR"."PERSONS" (PERSONSID, PIN, FNAME, LNAME, ADDRESS, PHONE, EMPID)
VALUES ('P345', '3854', 'Sandra', 'Tocco', '1570 White River Way Salt Lake City, UT
84111', '801-478-3951', 'E016')
INSERT INTO "HR"."PERSONS" (PERSONSID, PIN, FNAME, LNAME, ADDRESS, PHONE, EMPID)
VALUES ('P347', '1290', 'Holly', 'Drakes', '2932 Oakdale Avenue Tampa, FL 33634', '863578-0582', 'E030')
INSERT INTO "HR"."PERSONS" (PERSONSID, PIN, FNAME, LNAME, ADDRESS, PHONE, EMPID)
VALUES ('P456', '5553', 'Dorian', 'Allen', '4787 Goldie Lane Middletown, OH 45044', '513422-4165', 'E022')
INSERT INTO "HR"."PERSONS" (PERSONSID, PIN, FNAME, LNAME, ADDRESS, PHONE, EMPID)
VALUES ('P567', '5673', 'Jamie', 'Hanson', '4478 Sand Fork Road Fulton, IN 46975', '574857-7746', 'E039')
INSERT INTO "HR"."PERSONS" (PERSONSID, PIN, FNAME, LNAME, ADDRESS, PHONE, EMPID)
VALUES ('P765', '8278', 'Arthur', 'Merrill', '3907 Timberbrook Lane Wray, CO 80758', '970332-8278', 'E051')
INSERT INTO "HR"."PERSONS" (PERSONSID, PIN, FNAME, LNAME, ADDRESS, PHONE, EMPID)
VALUES ('P789', '7746', 'Octavia', 'Carpenter', '2798 May Street Lexington, KY 40505',
'606-283-0745', 'E040')
INSERT INTO "HR"."PERSONS" (PERSONSID, PIN, FNAME, LNAME, ADDRESS, PHONE, EMPID)
VALUES ('P890', '2109', 'Ben', 'Walton', '1205 Rainbow Road Los Angeles, CA 90017', '626268-2109', 'E066')
Commit Successful
TRANSACTIONS
TRANSACTIONTYPES
SQL query:
o SELECT *
FROM ACCOUNTS
WHERE status = open;
Query 2:
English statement:
o Give Managers 5% raise
SQL query:
o UPDATE EMPLOYEES
SET SALARY = SALARY * 1.05
WHERE TITLEID IN
(SELECT TITLEID
FROM JOBTITLE
WHERE TITLENAME LIKE %Manager%
OR TITLENAME LIKE %manager%);
Query 3:
English statement:
o List transactions with a credit payment
SQL query:
o SELECT ACCID, TRANSTYPE, PAYMENTTYPE, PAYMENTAMOUNT
FROM TRANSACTIONS
WHERE PAYMENTTYPE = credit
ORDER BY PAYMENTAMOUNT;
Query 4:
English statement:
o List employees in a particular branch
SQL query:
o SELECT FNAME, LNAME, PHONE
FROM PERSONS
WHERE EMPID IN
(SELECT EMPID
FROM EMPLOYEES
WHERE BRANCHID = (SELECT BRANCHID
FROM BRANCHES
WHERE BADDRESS LIKE %Jackson%));
Query 5:
English statement:
o List customers with an account balance lower than $50,000
SQL query:
o SELECT FNAME, LNAME, ADDRESS
FROM PERSONS
WHERE CUSTOMERID IN
(SELECT CUSTOMERID
FROM CUSTOMERS
WHERE CUSTOMERID IN
(SELECT CUSTOMERID
FROM ACCOUNTS
WHERE BALANCE < 50000));
Query 6:
English statement:
o List employees with a level access equal to 3
SQL query:
o SELECT FNAME, LNAME, BRANCHID
FROM EMPLOYEES E, PERSONS P
WHERE E.EMPID = P.EMPID AND LEVELACCESS IN
(SELECT LEVELACCESS
FROM EMPLOYEES
WHERE LEVELACCESS = 3);
Query 7:
English statement:
o Insert a new Employee with the necessary information
SQL query:
o INSERT INTO EMPLOYEES
VALUES (E999, 123-12-1234, 77000, 8, B01, T14);
Query 8:
English statement:
o List all accounts from a particular branch
SQL query:
o SELECT *
FROM ACCOUNTS
WHERE BRANCHID = B02;
Query 9:
English statement:
o List all employees with a salary higher than $70,000
SQL query:
o SELECT *
FROM EMPLOYEES
WHERE SALARY > 70000;
Query 10:
English statement:
o List all loans with an amount greater than $2000
SQL query:
o SELECT LOANID, AMOUNT
FROM LOANS
WHERE AMOUNT > 2000;
This section will show the output screens for the implementation of each English/SQL
query seen in the previous section. Each screenshot will show the SQL query and an output
result.
Query 1:
List all open status accounts
Query 2:
Give Managers a 5% raise
Query 3:
List transactions with a credit payment
Query 4:
List employees in a particular branch
Query 5:
List customers with an account balance lower than $50,000
Query 6:
List employees with a level access equal to 3
Query 7:
Insert a new Employee with the necessary information
Query 8:
List all accounts from a particular branch
Query 9:
List all employees with a salary higher than $70,000
Query 10:
List all loans with an amount greater than $2000
ACCOUNTS
BRANCHES
CUSTOMERS
EMPLOYEES
JOBTITLE
LOANS
PERSONS
TRANSACTIONS
TRANSACTIONTYPES
SQL query:
o SELECT *
FROM ACCOUNTS
WHERE status = open;
Query 2:
English statement:
o Give Managers 5% raise
SQL query:
o UPDATE EMPLOYEES
SET SALARY = SALARY * 1.05
WHERE TITLEID IN
(SELECT TITLEID
FROM JOBTITLE
WHERE TITLENAME LIKE %Manager%
OR TITLENAME LIKE %manager%);
Query 3:
English statement:
o List transactions with a credit payment
SQL query:
o SELECT ACCID, TRANSTYPE, PAYMENTTYPE, PAYMENTAMOUNT
FROM TRANSACTIONS
WHERE PAYMENTTYPE = credit
ORDER BY PAYMENTAMOUNT;
Query 4:
English statement:
o List employees in a particular branch
SQL query:
o SELECT FNAME, LNAME, PHONE
FROM PERSONS
WHERE EMPID IN
(SELECT EMPID
FROM EMPLOYEES
WHERE BRANCHID = (SELECT BRANCHID
FROM BRANCHES
WHERE BADDRESS LIKE %Jackson%));
Query 5:
English statement:
o List customers with an account balance lower than $50,000
SQL query:
o SELECT FNAME, LNAME, ADDRESS
FROM PERSONS
WHERE CUSTOMERID IN
(SELECT CUSTOMERID
FROM CUSTOMERS
WHERE CUSTOMERID IN
(SELECT CUSTOMERID
FROM ACCOUNTS
WHERE BALANCE < 50000));
Query 6:
English statement:
o List employees with a level access equal to 3
SQL query:
o SELECT FNAME, LNAME, BRANCHID
FROM EMPLOYEES E, PERSONS P
WHERE E.EMPID = P.EMPID AND LEVELACCESS IN
(SELECT LEVELACCESS
FROM EMPLOYEES
WHERE LEVELACCESS = 3);
Query 7:
English statement:
o Insert a new Employee with the necessary information
SQL query:
o INSERT INTO EMPLOYEES
VALUES (E999, 123-12-1234, 77000, 8, B01, T14);
Query 8:
English statement:
o List all accounts from a particular branch
SQL query:
o SELECT *
FROM ACCOUNTS
WHERE BRANCHID = B02;
Query 10:
English statement:
o List all loans with an amount greater than $2000
SQL query:
o SELECT LOANID, AMOUNT
FROM LOANS
WHERE AMOUNT > 2000;
This section will show the output screens for the implementation of each English/SQL
query seen in the previous section. Each screenshot will show the SQL query and an output
result.
Query 1:
List all open status accounts
Query 2:
Give Managers a 5% raise
Query 3:
List transactions with a credit payment
Query 4:
List employees in a particular branch
Query 5:
List customers with an account balance lower than $50,000
Query 6:
List employees with a level access equal to 3
Query 7:
Insert a new Employee with the necessary information
Query 8:
List all accounts from a particular branch
Query 9:
List all employees with a salary higher than $70,000
Query 10:
List all loans with an amount greater than $2000
Chapter 7: Conclusion
This project began by studying the functional requirements of the system. Interviews
were conducted and data was collected from those interviews. An external schema was designed
of the overall system and users view of the system. A conceptual schema and logical model were
constructed by normalizing relations and developing an E/R Model diagram with relationships of
the system. A database was created by implementing all of the designs and data into two
RDBMSs. Finally, example English queries were conducted and executed by providing the
output of each query.
This project gives me a great amount of insight on how a bank system and relational
database would work. Although not as complex as a big bank, I feel that by implementing this
system I have gained an astonishing amount of knowledge on implementing a relational
database.