Вы находитесь на странице: 1из 8

Table 1 Customer Master

Sno Field Name Data Type


1 CustomerId Int
2 Customer Name Varchar(50)
3 Gender Char(1)
4 DOB Datetime
5 Nationality Varchar(25)
6 Blood Group Varchar(10)
7 Passport Number Varchar(25)
8 Profession Varchar(25)
9 IT/PAN Number Varchar(25)
10 Fathers Name Varchar(50)
11 Mothers Name Varchra(50)
12 Username varchar(50)
13 password varchar(50)
14 Active Bit

Table 2 Customer Contact Details

Sno Field Name Data Type


1 CustomerDetailsid int
2 CustomerId int
3 Residence Address varchar(500)
4 Phone Number varchar(25)
5 Mobile Number varchar(20)
6 Office Address varchar(500)
7 Office Phone Number varchar(25)
8 Personal Mail Id varchar(50)
9 Officiall e-Mail Id varchar(50)

Table 4 Login Details

Sno Field Name Data Type


1 LoginDetailsid int
2 CustomerId int
3 Login date datetime
4 login time varchar(10)
5 Logout Time varchar(10)
Table 5 Branch Details

Sno Field Name Data Type


1 Branchid int
2 Branch name varchar(50)
3 Branch Address varchar(500)
4 Branch Phone Number varchar(25)
5 Branch Manager varchar(25)
6 No of Atm centres int
7 No of employees int

Table 6 Account Type

Sno Field Name Data Type


1 AccoutTypeid Int
2 Account Type varchar(50)
3 Min Balance money
4 Branchid int
5 Opening Balance money

Table 7 Transactions

Sno Field name Data Type


1 TransactionId int
2 transaction Type varchar(50)

Table 8 Customer Account Details

Sno Field name Data Type


1 Accountid int
2 Account Number varchar(15)
3 Customer Id int
4 Account Type int
5 Account Opening Date datetime
6 Branch id int
7 Current Balance money

Table 9 Customer Transaction

Sno Field Name Data Type


1 CustomerTransactionId Int
2 Transaction id Int
3 Amount Money
4 Transaction Date DateTime
5 AccountId Int
6 Tax Amount Money

Table 10 Tax Master

Sno Field Name Data Type


1 TaxId int
2 Transaction id int
3 Min Amount money
4 Max Amount money
4 Tax percentage float
Contraints
Identity, Primary key Column

check 'M' or 'F'

Default Indian

Constraints
Identity, Primey Key Column
Foreign Key Column

Contraints
identity, primary key column
foreign key references to Customer Master
Contraints
Identity Column, Primary Key

Contraints
Identity Primary Key Column

Foreign Key For Bench Details id

Contraints
Identity Column, Primary key

Contraints
identity Primary key Column
unique
Foreign Key references to Customer master
Foreign Key references to Account Type

Foreign key references to Branch master

Contraints
identity Column,Primary key
Foreign Key references to Transaction
Foreign Key references to Customer Account Details

Contraints
identity Column,Primary key
Foreign Key references to Transaction
Sno

10

11

12

13

14

15
Questions

Write a trigger for customer master. If the user delete the value in customer details and corresponding contact details. Then ma
a record both tables deleted records in one table. And delete the value in this table
Write a trigger for account type that the minimum balance of all the account type should not be lesser than the minimum balanc
the salary account

Write a trigger for customer account details. Check the account opening date should not be in weekends

Write a trigger to avoid deleting the account type master

Write a trigger to avoid updating the customer transaction from last month and before. The user can only update the transaction
this month transactions
Write a procedure to get the day,year,month. Check it is not Sunday, If it is Sunday display "Holiday " or some message releva
and if it is not Sunday display the customer name who opened the account on that day. If none of them opened the account Dis
the message

Write a procedure to display the Customer details who maintains the account for past 3 years

Write a procedure to get the account type and display the customer and the current balance he possess

Write a procedure to get the customer name as input parameter and display the number of transaction done as an output param

Write a procedure to insert,update and delete the tax master

Write a cursor to display the customer and beneath it display the transactions made by that customer

Write a cursor to diaply the customer who logged in with in 2 months and display the customer and beneath it display the login
log in time and log out time

Write a cusror to display the branch name and the sum of current balance of its customer

Write a cursor to update the tax percentage for each minimum and maximum balance for each account type

Write a cursor to display the username and password of the customer and display that number of times the user loggs every m

Вам также может понравиться