In a Bank’s database, there are two tables ‘Customer’ and ‘Transaction’ as shown below. Write a query to display customer’s name who has -Technology

1 Answer

Answer :

(i) Select cust_name from customer c,transaction t where c.Acc_No=t.Acc_No and Transaction_Type= 'Debit';(ii)Select cust_name, t.* from customer c, transaction t where c.Acc_No=t.Acc_No;(iii) Select cust_name from customer c,transaction t where c.Acc_No!=t.Acc_No;(iv) Cartesian Product:Number of Rows: 20Number of Columns: 9Degree: 9Cardinality: 20(v) 2301003 650002201002 20000(vi) Sometimes we do not want to see the whole output produced by a statement with Group By clause. We want to see the output only for those groups which satisfy some condition. It means we want to put some condition on individual groups (and not on individual records). A condition on groups is applied by Having clause.For example consider the following query:select Acc_No, sum(Amount) from Customer c, Transaction t where c.Acc_No=t.Acc_No group by c.Acc_No having Transaction_Type='Credit';This query will create account number wise groups and instead of displaying the total amount of all type of transactions, it will only display the total of credit transactions only.

Related questions

Description : In a Bank’s database, there are two tables ‘Customer’ and ‘Transaction’ as shown below. -Technology

Last Answer : (i)Acc_No, Cust_Phone(ii)All the columns having capability to become Primary Key are known as Candidate Keys.(iii)Acc_No(iv)Trans_Id

Description : Write a query to display customer’s name along with their transaction details. -Technology

Last Answer : Select cust_name, t.* from customer c, transaction t where c.Acc_No=t.Acc_No;

Description : Write a query to display customer’s name who have not done any transaction yet. -Technology

Last Answer : Select cust_name from customer c,transaction t where c.Acc_No!=t.Acc_No;

Description : Write a query to display customer’s name who has withdrawn the money. -Technology

Last Answer : Select cust_name from customer c,transaction t where c.Acc_No=t.Acc_No and Transaction_Type= 'Debit';

Description : Which of the following is/are the Database server functions? i) Data management ii) Transaction management iii) Compile queries iv) Query optimization A) i, ii, and iv only B) i, ii and iii only C) ii, iii and iv only D) All i, ii, iii, and iv

Last Answer : A) i, ii, and iv only

Description : Define query in the context of database. -Technology

Last Answer : A query is an inquiry into the database using the SELECT statement. These statements give you filtered data according to your conditions and specifications indicating the fields, records, and summaries which a user wants to fetch from a database.

Description : A query is used to retrieve data from the database based on one or more criteria. -Technology

Last Answer : False Because MS-Access 2007 supports the database object query.

Description : Database is made up of all the following components except (a) tables (b) queries -Technology

Last Answer : (d) A database is made up of tables, queries, and forms.

Description : A database that contains tables linked by common fields is called a (a) Centralized database (b) Flat file database -Technology

Last Answer : (c) Relational database stores data in the form of tables which are linked by common fields.

Description : In a MS_Access database, which component is not present? (a) Formula Bar (b) Tables -Technology

Last Answer : (a) MS-Access contains various components, i.e. Tables, Queries, Forms, Reports, Macros and Modules.

Description : Consider the following schemas: Branch = (Branch-name, Assets, Branch-city) Customer = (Customer-name, Bank-name, Customer-city) Borrow = (Branch-name, loan-number, customer account-number) Deposit = ... )) (C) πcustomer-name(σbalance> 10000(Borrow)) (D) σcustomer-name(σbalance> 10000(Borrow))

Last Answer : (A) πcustomer-name(σbalance> 10000(Deposit)) 

Description : With reference to the above given tables, write commands in SQL for (i) and (ii) and output for (iii) below: -Technology

Last Answer : (i) select TName, Passenger from Train T, Reservation R where T.TrainId=R.TrainId;(ii) select T.* from Train T, Reservation R where T.TrainId!=R.TrainId;(iii)TrainIdTNameSourceDestination3424Lucknow MailLucknowNew Delhi5400Century ExpressNew DelhiKanpur

Description : Select Acc_No, sum(Amount) from Customer c, Transaction t where c.Acc_No=t.Acc_No group by c.Acc_No having Transaction_Type='Credit'; -Technology

Last Answer : 2301003 650002201002 20000

Description : Consider the tables given below. Salesperson -Technology

Last Answer : (i) Primary, Foreign(ii) Salespersons cannot be set as the primary key in the table Orders because table Orders has already primary key and one table cannot have more than one primary key column.

Description : Consider the following database: Product Code Product Name Date of sale QtySold Customer Name Amount -Technology

Last Answer : 1. Qty Sold and Amount fields2. ProductCode field3. Date/Time data type4. ProductCode, ProductName and CustomerName fields5. 6 fields and 5 records6. Validation Rule

Description : Why banks having less focus on customer although they use direct marketing ? 1. Due to lack of appreciation of need for marketing in banking 2. Banks do not need customers much 3. Direct marketing never gives importance to customers 4. Banks need money than customers 5. None of these

Last Answer : Due to lack of appreciation of need for marketing in banking

Description : Write SQL query to create a table “BOOKS” with the following structure: Table: BOOKS -Technology

Last Answer : Create table Books(BOOK_ID Integer (2) Primary Key,BOOK_NAME Varchar (20),CATEGORY Varchar (20),ISSUE_DATE Date);

Description : Write SQL query to create a table “Registration” with the following structure: -Technology

Last Answer : Create table Registration(Reg_Id Integer(2) Primary Key,Name varchar(20),Course varchar(10),Join_Dt date);

Description : Write SQL query to create a table Inventory with the following structure : -Technology

Last Answer : CREATE TABLE Inventory(Material Id Integer Primary Key,Material Varchar (50) NOT NULL,Category Char,DatePurchase Date) :

Description : Write SQL query to create a table Player with the following structure : -Technology

Last Answer : CREATE TABLE Player(};

Description : Write SQL Query commands based on the following table: -Technology

Last Answer : This answer was deleted by our moderators...

Description : Write the HTML code to generate the following table on a Web page with the contents and alignment exactly as shown below: -Technology

Last Answer : The HTML code is

Description : Write a code to plot the speed of a passenger train as shown in the figure given below: -Technology

Last Answer : import matplotlib.pyplot as pltimport numpy as npx = np.arange(1, 5)plt.plot(x, x*1.5, label='Normal')plt.plot(x, x*3.0, label='Fast')plt.plot(x, x/3.0, label='Slow')plt.legend()plt.show()

Description : Identify the topology shown below. Write 2 advantages of this topology. -Technology

Last Answer : Star Topology Two advantages of star topology are as follows :1. Easy to detect faults and remove It.2. Failure to single system will not bring down the entire network.

Description : Four square table-tops of the same dimensions are shown below. Only the designs of their supports are different from each other. If a person stands upright on the red mark on each of the table, which of the tables will topple?  

Last Answer : B C D

Description : Below is the list of various types of application softwares: A. Database B. Desktop publishing C. Drawing -Technology

Last Answer : 1. Drawing2. Word processing3. Desktop publishing4. Spreadsheet5. Database

Description : The director of a company uses a database to store data about job title. This is a part of the database given below: -Technology

Last Answer : 1. 62. 63. Secretary4. Finance department and their Payroll Numbers are A621 and M502.

Description : Answer the following questions based on the database given below: Prod_Id Prod_Name Category -Technology

Last Answer : 1. The primary key of the given table Product will be Prod _Id because no two products have the same Product_Id. So, it will be uniquely identified for each record in the table.2. The suitable data ... = 88. The data type OLE Object is suitable for adding the photograph of the product to the table.

Description : Sub-prime lending refers to ________ A. lending done by banks at rates below PLR B. Funds raised by the banks at sub-libor rates C. Group of banks which are not rated as ... institutions including banks to customers not meeting with normally required credit appraisal standards E. All of the Above

Last Answer : D. lending done by financing institutions including banks to customers not meeting with normally required credit appraisal standards Explanation: In finance, subprime lending (also referred to ... schedule, sometimes reflecting setbacks, such as unemployment, divorce, medical emergencies, etc.

Description : Data is stored in RDBMS in the form of (a) table (b) query -Technology

Last Answer : (a) Relational Database Management System stores data in the form of relation. As we know, relations are known as table.

Description : Help him in writing SQL query for the following purpose: (i) To count how many female candidates will be attending the training. -Technology

Last Answer : (i)Select count(name) from training where name like ‘Ms.%’;(ii) Select * from training where fee is NULL;(iii) Select city, fee from training where topic = ‘Cyber Security’;(iv) Alter table training add feedback varchar(20);

Description : Mr. Suman, a programmer in New Era Programming World has designed a registration page for a hobby club as shown below: -Technology

Last Answer : (i) int x=c1.getSelectedIndex();int fee=0;if(x==0)fee=1000;else if(x==1)fee=1500;else if(x==2)fee=2000;else if(x==3)fee=2500;t2.setText(''+fee);(ii) double disc=0;int fee=Integer.parseInt(t2. ... (t2.getText());double net=fee-disc;t4.setText(''+net);(iv) System.exit(0);(v) c1.addItem('Reading');

Description : Transparency A . The large set of candidate solutions possible for a problem B. The information stored in a database that can be retrieved with a single query C. Worth of the output of a machine learning program that makes it understandable for humans D . None of these

Last Answer : C. Worth of the output of a machine learning program that makes it understandable for humans

Description : Quantitative attributes are A. A reference to the speed of an algorithm, which is quadratically dependent on the size of the data B. Attributes of a database table that can take only numerical values C. Tools designed to query a database D. None of these

Last Answer : B. Attributes of a database table that can take only numerical values

Description : Shallow knowledge A . The large set of candidate solutions possible for a problem B. The information stored in a database that can be, retrieved with a single query C. Worth of the output of a machine learning program that makes it understandable for humans D . None of these

Last Answer : B. The information stored in a database that can be, retrieved with a single query

Description : Search space A . The large set of candidate solutions possible for a problem B. The information stored in a database that can be, retrieved with a single query. C. Worth of the output of a machine learning program that makes it understandable for humans D . None of these

Last Answer : A . The large set of candidate solutions possible for a problem

Description : Semi-join strategies are techniques for query processing in distributed database system. Which of the following is a semi-join technique? (A) Only the joining attributes are sent from one site to ... the attributes are sent from one site to another and then only the required rows are returned.

Last Answer : (C) Only the joining attributes are sent from one site to another and then only the required rows are returned.

Description : In distributed databases, location transparency allows for database users, programmers and administrators to treat the data as if it is at one location. A SQL query with location transparency needs to specify: (A) Inheritances (B) Fragments (C) Locations (D) Local formats 

Last Answer : (B) Fragments

Description : Relational database schema normalization is NOT for: (A) reducing the number of joins required to satisfy a query. (B) eliminating uncontrolled redundancy of data stored in the database. (C) ... could otherwise occur with inserts and deletes. (D) ensuring that functional dependencies are enforced. 

Last Answer : reducing the number of joins required to satisfy a query.

Description : Write the HTML code to display horizontal line of red color. -Technology

Last Answer :

Description : Write HTML code to display various bullet types. -Technology

Last Answer : LotusRoseSunHoonoutput

Description : Write HTML code to display ordered lists. -Technology

Last Answer : Many Ordered ListNumbered listSunMoonLetters 1is t SunMoonLowercase letters starting from 3rd 1etter

Description : Write the HTML command to display the following in your Web page. -Technology

Last Answer : The HTML command is – A2 + B2

Description : Write the HTML code to display an image on the right side of the page. -Technology

Last Answer :

Description : Write the HTML code to display an inline image named pencil.jpg located at C:\ in the center of your Web page. -Technology

Last Answer :

Description : Write HTML code to display a table with border of 5px. -Technology

Last Answer : l2 „

Description : Write the HTML code to display links of a web page in yellow colour. -Technology

Last Answer :

Description : Write HTML code to display the following table : -Technology

Last Answer : scheduleDuty Chart8 AM10AM12 AM KEVIN KHUSHBOO AMARJEET

Description : Write the SQL command that will display the current time and date. -Technology

Last Answer : Select now();