Assignment Document

mysql:>insert into calldetails (type, calldate,starttime,

Pages:

Preview:


  • "mysql:>insert into calldetails (type, calldate,starttime, endtime) values(‘telephone’,’12.06.2016’,’10.55’,’10.56’);mysql:>insert into calldetails (type, calldate,starttime, endtime) values(‘telephone’,’11.04.2017’,’8.48’,’8.49’’);mysql:>up..

Preview Container:


  • "mysql:>insert into calldetails (type, calldate,starttime, endtime) values(‘telephone’,’12.06.2016’,’10.55’,’10.56’);mysql:>insert into calldetails (type, calldate,starttime, endtime) values(‘telephone’,’11.04.2017’,’8.48’,’8.49’’);mysql:>update calldetails set duration= endtime-starttime;j.mysql:>insert into order(orderid, orderdate,type, discountamt, itemquantity,)values(333310,’06.02.2016’,’telephone’,120.75,5);mysql:> insert into order(orderid, orderdate,type, discountamt, itemquantity,)values(333320,’12.06.2016’,’walkin’,111.75,4);mysql:>insert into order(orderid, orderdate,type, discountamt, itemquantity,)values(333330,’18.12.2009’,’walkin’,99.75,15);mysql:>update order set totalamount= itemquantity * (select sellingprice from menu whereitemid=’&itemid’);3. Display the employee detailswhose id= xxx and works on hourly basis.mysql:>select empid,ename,salary from employee where type=’shift’ and empid=’&empid’;4. List the menu item that is mostly ordered in the current mysql:>select itemno, itemname from menuas m INNER JOIN select orderdate from order as or whereor.itemquantity= max(or.itemquantity) and orderdate in(’1-02-2016’,’28-02-2016’);(or)Representing the max value in select as belowMysql>select max(itemquantity), orderdate ,itemname, itemnumber, from order or, menu m whereor.itemid =m.itemid andor.orderdate between (’01-01-2017’ ,’31-01-207’);5.list the ingredients details of the menu item xxxMysql:> select itemid, itemname, ingrdid, ingrdname, type ,quantity from menu ,ingredients wheremenu.ingrid=ingredients.ingrid and menu.itemname=’&itemname’;6.list all the orders that are made by customer xxx via phone between date dates 01-03-2017 and 01- 04-2017.Mysql:>select * from order where customerid =(select customerid from customer wherecustname=’&custname’) and type = (select type from calldetails where duration>10) having orderdatebetween (’01-03-2017’,’01-04-2017’);7.print the salary paid to delivery staff named xxx in current month.Mysql:>select salaryfromemp where type=delivery havingempname= ‘&empname’ andempid=(select empid from order where order.empid=employee.empid and orderdate in (’01-04- 2017’,’20-04-2017’);8. List the ingredients supplied by a supplier xxx on date yyyyMysql:>select * from ingredientswhere supplierid=(select supplierid from supplier wheresuplname=’&suplname’) and date =(select presentdate from inventory);Map EER Model to relational model: Relational data model is the primary data model, which is used widely for data storage and processing.This model is simple and it has all the properties and capabilities required to process data with storageefficiency.ConceptsTables - In relational data model, relations are saved in the format of Tables. This format stores therelation among entities. A table has rows and columns, where rows represent records and columnsrepresent the attributes.Tuple - A single row of a table, which contains a single record for that relation is called a tuple.Relation instance - A finite set of tuples in the relational database system represents relation instance.Relation instances do not have duplicate tuples.Relation schema - A relation schema describes the relation name (table name), attributes, and theirnames.Relation key - each row has one or more attributes, known as relation key, which can identify the rowin the relation (table) uniquely.Attribute domain - every attribute has some pre-defined value scope, known as attribute domain.ConstraintsEvery relation has some conditions that must hold for it to be a valid relation. These conditions arecalled Relational Integrity Constraints. There are three main integrity constraints -? Key constraints? Domain constraints "

Why US?

Because we aim to spread high-quality education or digital products, thus our services are used worldwide.
Few Reasons to Build Trust with Students.

128+

Countries

24x7

Hours of Working

89.2 %

Customer Retention

9521+

Experts Team

7+

Years of Business

9,67,789 +

Solved Problems

Search Solved Classroom Assignments & Textbook Solutions

A huge collection of quality study resources. More than 18,98,789 solved problems, classroom assignments, textbooks solutions.

Scroll to Top