2010 Create the following table with the given attributes: BOOK: (b_nbr, title, subject, author, quantity, price)
Perform the following task:
1. Enter at least 10 data in each table.
2. Display the table structure. 3. List the different subjects of books. 4. List the name of the books having more than 5 copies. 5. Count the number of books for each subject. 6. Give the name of the subject having maximum copies of books
Assignment : 2 Library database 13.9.2010
Create the following tables with the given attributes: BOOK: (b_nbr, title, subject, author, quantity, price) MEMBER: (card_id, name, address, membership_date, dob) BORROW: (card_id, book_id, date_of_issue, date_of_return)
Perform the following task:
1. Enter at least 10 data in each table.
2. List all the member details who have not borrowed any book 3. List the name of the authors who have maximum number of books. 4. List all the members of age greater than 60. 5. Prepare a report containing member details with their book access details
Assignment : 3 Shipment database 12.11.2010
Create the following tables with the given attributes: CUSTOMER: (cust_id, cust_name, annual_revenue, cust_type) SHIPMENT: (shipment_no, cust_id, weight, truck_no, ship_date ) TRUCK: (truck_no, driver_name) CITY: (city_name, population)
Perform the following task:
1. Enter at least 10 data in each table.
2. List all the dealers(customer type) who have send a shipment to Mumbai 3. List the name and annual revenue of customers whose shipments have been delivered by Truck no – “WB – 02- 9044”. 4. Give the name of city with largest population. 5. List the name and annual revenue of the customer whose shipment is deliverded by truck driver “Raju”.
Assignment : 4 Artist database 6.12.2010
Create the following tables with the given attributes: ARTIST: (artist_id ,name) SIMILAR_ARTIST: (artist_id , simartist_id , weight) ALBUMS: (albums , artist_id , name) TRACKLIST: (album_id , truck_id , track_id , track_num) TRACKS: (track_id , artist_id , name , length)
Perform the following task:
1. Enter at least 10 data in each table.
2. Find the name of all track that are more than 10 minutes long 3. Find the name of all artists who have recorded self titled album 4. Find the names of all artists who have recorded an album on which the 1st track is named as “intro”. 5. Find the name of all artists who have recorded an album on who are more similar to “Mogawai” than “Nirvana”. 6. Find the names of all the artists who do not have similarity rating >5 to any other artists.
Assignment : 5 Student database 11.1.2011
Create the following tables with the given attributes: STUDENT: (sid , sname , age , year , GPA) DEPARTMENT: (dname , num_phds) PROFESSOR: (pname , dname ) COURRSE: (cno, cname , dname ) MAJOR: (dname , sid) SECTION: (dname , cno , sec_no , pname) ENROLL: (sid , cno , sec_no, grade , dname ,)
Perform the following task:
1. Enter at least 10 data in each table.
2. Print the name of all professors who work in departments that have fewer than 50 phd students. 3. Print the name of students with the lowest GPA. 4. Print the section number and name of all course with more than 6 students 5. Print the names of students who are studying both Computer Science and Mathematics 6. Print the ids , names and GPA’s of the students who are currently taking civil Engineering course. Assignment : 6 Address book database 07.2.2011 Create the following tables with the given attributes: PEOPLE: (people_id, name, **category, dob, meet_on_date) **category(family, friend, collegue, bussiness) TELEPHONE: (tel-id, people_id, number, **type-of_number) **type-of_number(home, office, cell) ADDRESS: (people_id, street_name, city, zipcode, **type_of_address) **type_of_address(office,home) APPIONTMENT: (app_id, people_id, address_id, app_date)
Perform the following task:
1. Enter at least 10 data in each table.
2. Find the name of all the people whose zipcode is not known. 3. Show all the distinct telephone numbers associated with each of them. 4. Find the name of all the people marked as friend, who do not have a cell phone number. 5. Find the appointments that have dates same as that of birthday of some family members 6. Show the date and time spent in appointments with business contacts.