0% found this document useful (0 votes)
140 views

Int 306 Ca1

1. The document describes an online assignment for a database management systems course. It includes questions to create tables for a Courses database and perform queries and operations on the tables. 2. It also provides a case study about a woman opening a tea shop and the need for a database to track inventory, suppliers, customers, and sales. It asks to draw an ER diagram for the tea shop database. 3. The third part asks for advice on alternatives and positioning for a new computer product being developed by an electronics company to diversify and increase sales in a competitive market.

Uploaded by

Saurabh Pandey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
140 views

Int 306 Ca1

1. The document describes an online assignment for a database management systems course. It includes questions to create tables for a Courses database and perform queries and operations on the tables. 2. It also provides a case study about a woman opening a tea shop and the need for a database to track inventory, suppliers, customers, and sales. It asks to draw an ER diagram for the tea shop database. 3. The third part asks for advice on alternatives and positioning for a new computer product being developed by an electronics company to diversify and increase sales in a competitive market.

Uploaded by

Saurabh Pandey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Online Assignment-1

INT306: Database Management Systems

Set-A To be done by roll numbers (1,6,11,16,21,26,31,36,41,46,51,56,61,66,71,76)

Q: 1 Create the database “Courses” and within that database create the following tables: Course
(Course_id,Course_name) where course_id is primary key
Teacher (Teacher_id,Teacher_name) where teacher_id is primary key
Assigned_to (Teacher_id, Course_id)

Implement the following queries:

1. a)  Add a new column Credits to Course table.


2. b)  Change the size of the datatype mentioned for course_name
3. c)  Write a relational algebra query to show the teacher’s ID of those teachers who are
teaching course INT306
4. d)  Change the course name from DBMS to Database.
5. e)  Delete the entry of the course DBMS from course table and make sure its corresponding
entry should also get deleted from Assigned_to table.

Q-2 Tina loves tea. She is passionate about brewing and enjoying the perfect cup of tea. Her passion
for tea is so great that she recently decided to quit her job and pursue her dream, of owning her very
own tea shop.

Tina knows that she will need some way of tracking her inventory and suppliers as well as other
important business information, including:

1. The database must keep track of her product inventory, including information such as
product name, product type, description, cost, selling price and supplier

2. She also wishes to track the following customer information: name, contact information,
purchase history

3. For suppliers, she would like to keep their contact information including the company name,
sales representative name, telephone, email, address.

4. Once her database is operational, Tina would like to use it to keep track of sales and manage
her inventory.

Some of the reports that tina would like to produce include:

1. Customer contact list

2. A list of suppliers

3. An inventory report showing all the inventories along with the supplier

4. A sales report showing who bought what for a given period of time

5. Other sales report such as total sales by product, total sales for a date range etc.
Draw an ER Diagram and identify the entities - include all the attributes, relationships (primary and
foreign keys), cardinality ratio and participation constraint.

Q-3 Rotomatic Electronics was a small company with product line in accessories or medium to large
computers. The company specialized in manufacture and sale of magnetic disc drives. The product
being a complex one required extensive electric controls. As the product required high quality
control it has high unit cost and was manufactured to meet customer satisfaction. Rotomatic's
business in computer industry was highly competitive. Many larger companies manufactured their
own magnetic disc drives and also there were quite a large number of small manufacturers who had
entered in the field recently. Rotomatics disc drives offered large capacity and high speed and could
interface with any existing compute/s. The company could expand its operations due to attractive
features and flexibility. However, as the company was not occupying leadership position in the
market, the company had to constantly come up with innovations to increase sales. In order to
attain more corporate ability the management decided to diversify into new product areas. They
asked the R&D department to design the single board efficient computer. As a result of six months
hard efforts the R&D department created the prototype.
Question:
Q: You are requested to suggest the alternatives to reach the customers. Also suggest the ways and
means of positioning the new product in a highly competitive market
Set-B To be done by roll numbers (2,7,12,17,22,27,32,37,42,47,52,57,62,67,72,77,82)

Q-1 Consider the following two tables [10]


Teacher Courses
ID NAME Teacher_ID
ID NAME
10001 Computer Science 142 1234
1234 Krabappel
10002 Computer Science 143 5678
5678 Hoover
10003 Computer Science 9012
9012 Stepp
190M
10004 Informatics 100 1234

Implement the following queries:

1. a)  Retrieve the unique teacher id from course table

2. b)  Delete the detail of the course ‘Informatics 100’ such that it’s entry also gets deleted
from teacher table

3. c)  Write the relational algebra query to show all the details of the teacher(s) who are taking
computer science courses

4. d)  Add a column sitting place in the teacher table

5. e)  Update the name of the teacher to ‘Kewin’ who is taking Computer science 143 course.e

Q-2 Design a database for a college. Many Students seek admission in the college. The college has a
number of department and students can be enrolled to these departments.

 The department also offers a number of course to the students, each with a different
duration from the other.

 Each department has its H.O.D and many teachers under him.

 The syllabus of each course is also defined . Teachers are recruited by the college for
teaching the said course to the students.

 The teacher may have different qualifications and experience . They may also teach different
subjects if required.

 Each student in the college has a unique ID.


 We need to store the information about the college like the name, address, contact number,
reference number, department of the college, name of the HOD, number of teacher and
students in the departments, the syllabus, the duration and the course ID.

 We can also store the information about the teachers like qualification, experience, name
and subject taught.

Q: 3 ''Dye-Gen'' is a medium size, fast growing company. It manufactures mainly the black shade.
Their sales manager was impressed by sudden rise in sale of black hair dye in a rural sales area. For
last ten years, the demand for black hair dye had been steady and evenly spread over the year. Sales
record showed a spurt in the demand in the last year, in one quarter of the year, in that area. Same
thing is happening this year also. Market intelligence has come out with surprising facts: (a) This
rural area is particularly well known for the buffalo breeding and trading. (b) Sudden rise in the
demand for black hair dye in a particular quarter of the year, coincides with the cattle trading
season. (c) Buffalo breeders liberally apply the dye on the buffalo's skin, which then shines, looks
black and attractive to the prospective buyers. The Sales manager is happy because the overall sales
figures are going up. But the marketing manager is worried, about the 'human' market reaction, if
the so far little known 'animal' application becomes public knowledge.
Question
What is your advice to
a) The sales manager and
b) The marketing manager.
Set-C To be done by roll numbers(3,8,13,18,23,28,33,38,43,48,53,58,63,68,73,78)

Q1 Create a table following tables :Employee T1

Employee T2

Implement the following queries:

a) Delete the column zip from the emplyee2 table


b) Show the details of employees who belong to the city whose name starts with ‘A’ and
ends with ‘A’
c) Update the state of the employee whose firstname is ‘Aman’ to ‘Punjab’.
d) Show the schema details of the tables.
e) Write a relational algebra query to show the first name of those employees in
employee T1 whose details is not present in employee T2 table

Q: 2 Construct an ER Diagram for Company having following details :

 Company organized into DEPARTMENT. Each department has unique name and a particular
employee who manages the department. Start date for the manager is recorded. Department may
have several locations.
 A department controls a number of PROJECT. Projects have a unique name, number and a single
location.
 Company’s EMPLOYEE name, ssno, address, salary, sex and birth date are recorded. An employee
is assigned to one department, but may work for several projects (not necessarily controlled by her
dept). Number of hours/week an employee works on each project is recorded; The immediate
supervisor for the employee.
 Employee’s DEPENDENT are tracked for health insurance purposes (dependent name, birthdate,
relationship to employee).
Q: 3 M/s Apple India Limited was launching its Apple juice with extraordinary caution. It first
undertook a year-and-a-half long test marketing run in Bangalore and then followed it up by a test
market launch in May 2006. Meanwhile making up for lost time, the company in just six months,
launched its Apple Juice Hyderabad. The ready-to-use juice is made from fresh apples. The light
brown colour and flavour are 'natural', as the product does not contain artificial colour or
preservatives. Priced at Rs. 10 for a 200 gm tetra pack, it is currently available in Andhra Pradesh.
The product has a shelf life of one year, but once opened, this has to be stored under refrigeration
and used within six days. 'The concept of juice is the same as for both, lemon and mango juice" says
Priya Kumar, Product Manager. Though lemon is used in fairly large quantities in the Southern parts
of India, housewives in other parts of India, under pressure of time, have also stated substituting it
for soft drinks. The company's pre-launch research also revealed that the respondents (working
women and housewives) were positive in product attributes like ease of use, storage and time
saving.
QUESTIONS
(i) What methods of data collection would have been used by you?
(ii) What would have been the questionnaire used by you for the survey?

Set-D To be done by roll numbers (4,9,14,19,24,29,34,39,44,49,54,59,64,69,74,79)

Q-1 Create a table ‘Employee’ with following fields: [10]

Column Name Datatype Description

Emp_Id Numeric It should not accept Null ,


duplicate values, auto_increment
Emp_Name Varchar(30) Employee name
Age Numeric It should not accept age >=30.
Salary Numeric It should not be null.

Implement the following queries:

1. a)  Write a relational algebra query to retrieve the employee whose age is less than 40 and
salary greater than 40000.

2. b)  Calculate the total salary of all employees.

3. c)  Change the datatype size of the column employee name

4. d)  Update the salary of the employee whose name starts with ‘a’ and age greater than 20.

5. e)  Rename the column Emp_Id to ID.

Q: 2 A university registrar’s office maintains data about the following entities:

1. courses, including number, title, credits, syllabus, and prerequisites;


2. course offerings, including course number, year, semester, section number, instructor(s),
timings, and classroom;
3. students, including student-id, name, and program;
4. instructors, including identi-cation number, name, department, and title. Further, the
enrolment of students in courses and grades awarded to students in each course they are
enrolled for must be appropriately modelled.
Construct an E-R diagram for the registrar’s office. Document all assumptions that you make
about the mapping constraints.

Q-3: A three star hotel located in Delhi has been experiencing a decline in its occupancy during the
past one-year. The management has recently reviewed the problem and is seriously considering to
attract business executives as also to provide adequate facilities for holding business conferences,
workshops etc. Since this would involve some renovation of the existing building in addition to new
furniture and equipment, the management wants to be cautious in undertaking such expenditure.
Since its inception several years ago, the hotel has been maintaining a complete record of its guests.
When a person visits the hotel for the first time, details such as his name, age, sex, permanent
address, purpose of 'visit and duration of stay along with dates are entered on a card. The guest file
has expanded tremendously containing over 8,000 cards. The management wants to make use of
this readily available information along with any additional information necessary in this regard.
QUESTION
Q: Specify the nature of data that you would collect from the sample respondents?

Set-E To be done by roll numbers (5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80)

Q: 1 Create a database MOBILE with the following field:


Column Datatype Description
Mob_IMEI varchar NOT NULL, UNIQUE
Mob_Name Char UNIQUE
Mob_BillNo numeric Numeric=10
Mob_Cost Varchar SET DEFAULT = 15000

Implement the followings:


1. ADD a new Column Mob_Col with datatype varchar2.
2. DROP the column Mob_Name.
3. Modify the datatype of Mob_BillNo into varchar2.
4. Show the details of mobile whose color is RED and name is one plus.
5. Update the Mob_name to Mob_Brand.

Q: 2 A library service wants to create a database to store details of its libraries, books and
borrowers.
Details include the following:
1. A book has a unique ISBN number, a title and one or more authors.
2. The library service may own several copies of a given book, each of which is located in one of
the service’s libraries.
3. A given library contains many books, and in order to distinguish different copies of the same
book a library assigns a different copy-number to each of its copies of a given book; the price
that was paid for each copy is also recorded.
4. Every library has a unique name and is either a main library or a branch library. A main
library may have zero or more branch libraries and every branch library is a branch of exactly
one main library.
5. A borrower has a name and a unique ID code. A borrower can have many books on loan, but
each copy of a book can only be on loan to one borrower. A borrower could borrow the
same book on several occasions, but it is assumed that each such loan will take place on a
different date.

Q: 3 In 2005, Rama Store not only had a great year, it also swept the top places at Punjabi Bagh,
winning each of the first ten places except ninth Comfortable in the fact that the company had an
attractive product, the president of Rama Store decided to go directly to the customer. The idea,
instead of concentrating company efforts and resources on improving the relations with the dealers,
was to emphasis improving relations with the ultimate consumer. To implement this tactic, the plan
was to eliminate the dealer completely and replace him or her with agents. To say the plan did not
work well is an understatement. Rama Store distributors, who had represented it in India, initiated
legal action against the Store in four states. All 323 Rama Store — Audio dealers felt betrayed by the
elimination of their franchises. Although they were offered the opportunity to become agents, they
were so opposed that they sued Rama Store. The law suits by these dealers sought damages
exceeding 50 core. Rama Store top management decided that perhaps their original distribution
system wasn't so bad after all.
QUESTION
Do you think that Rama Store failed to properly evaluate the existing distributors? Give your
reasons.

You might also like