Anda di halaman 1dari 11

For IGNOU Solved Assignments Visit : http://www.ignousolvedassignments.

com

T HE N E W S I G N O F S U C C E S S, W E P R O V I D E W H A T Y O U W A N For More Ignou Solved Assignments Please Visit - www.ignousolvedassignments.com Connect on Facebook : http://www.facebook.com/pages/IgnouSolvedAssignmentscom/346544145433550 Subscribe and Get Solved Assignments Direct to your Inbox : http://feedburner.google.com/fb/a/mailverify?uri=ignousolvedassignments_com Request Any Solved Assignment at : http://ignousolvedassignments.com/request-and-share-solved-assignments/ S
Course Code Course Title Assignment Number Maximum Marks Weightage Last Dates for Submission : Session) Session) This assignment has five questions. Answer all questions of total 80 marks. Rest 20 marks are for viva voce. You may use illustrations and diagrams to enhance explanations. Please go through the guidelines regarding assignments given in the Programme Guide for the format of presentation. Answer to each part of the question should be confined to about 300 words : : : : 100 : 25% 15th October, 2012 (For July 2012 15th April, 2013 (For January 2013 MCS-023 Introduction to Database Management Systems MCA (2)/023/Assign /12-13

Question 1: Describe briefly all the possible applications of a database system in a University?

For IGNOU Solved Assignments Visit : http://www.ignousolvedassignments.com

Ans:-There can be many applications of a database system can be possible like a university can have colleges or study center, For example - like in IGNOU there are many regional center, which have their study center's Enrollment No. of student managed by regional center as well as IGNOU study center manages exams, particles, counseling sessions and attendance ,study material etc, So we are creating a list of all applications which can be performed with university database system. New Registration Study center allotment Study material details Exam center details Regional center details Student results Enquiry

For IGNOU Solved Assignments Visit : http://www.ignousolvedassignments.com

Question 2: Identify all the associated entities for a Study Centre Management System,their corresponding attributes, relationships and cardinality and design an ER diagram for it. Ans:-E-R Diagram

Student_ID

Student_name
Student_address

Student_enrol

Prog-id

Prog-code Prog-name

Program
Faculty_ID

enrolled

StudentDtls

Course_ID

mark have attends

Practical

Courses

Theory

Attendance

Course_ID Faculty_ID Course_name Course_code Course_ID Course_ID Teach by Remarks Student_I D


Attendance_ID

Faculties
Phone No.

Faculty_ID Faculty_name Address

Qualification

For IGNOU Solved Assignments Visit : http://www.ignousolvedassignments.com

Question 3: Consider the E-R diagram of Question 2 and design the tables. Perform Normalization till the required normal form. Implement it using MS-Access. (25 Marks) Ans:Program:Prog -Id Prog -Code Prog - Name Create - date Student details:Stud -Id Stud-Eno. Stud- Name Student Address Create - date Courses:Course -Id Course-Code Course - Name Create - date Attendance:Attendance-Id Course-Code Stud-Id Create - date Remarks

Integer varchar varchar Date

Integer Big Integer varchar Varchar Date

Integer varchar varchar Date

Integer Integer Integer Date Varchar

For IGNOU Solved Assignments Visit : http://www.ignousolvedassignments.com

Faculties:Faculty-Id Faculty-Name Faculty-Add Qualification Phone No. Create-date

Integer Integer Integer Date Varchar Varchar

Question 4: Consider a "Project Management System" that maintains the database using the following tables: (10 Marks)

Project (pid, ptitle, startdate, enddate, duration_in_months, cid, Cost) Clients (cid, cname, caddress, cphone) Employee (eid, name, address, phone) Project-person (pid, eid)

Please note that an employee may be working on more than one project in the organization at any given time. Write and run the following SQL queries on the tables:

Ans:Create table Project(Pid Integer primary key,ptille varchar(50),startdate Date,enddate Date,duration-in-months Integer,cid Int ,cost int); Create table clients (cid int Primary key,cname varchar(50),c-address varchar(50),c-phone BigInt); Create table Employee(eid Int Primary key, name varchar(50),address varchar(50),phone BigInt); Create table Project-Person(Pid Int,cid Int);

For IGNOU Solved Assignments Visit : http://www.ignousolvedassignments.com

a) Find the cid and cname of the clients who have given only one project to the company. Ans:- Select cid ,cname from clients INNER JOIN Project ON clients.cid=project.cid WHERE cid=(select count(cid)from Project); (b) List the details of all the employees whoever are working on the project with project code (pid) = 111. Ans:- Select * from Employee INNERJOIN Project-Person ON Employe.eid=Project-Person.eid WHERE Project-Person.pid=111; (c) List all the project details those are currently under development. Ans:- Select * from Project WHERE end-date=NULL; (d) Find the projects whose cost is more than 11 lakhs. Ans:- Select * from Project WHERE cost>11,00,000; (e) Find the employee who is not working on any of the project. Note: Make suitable assumptions, if any. Ans:- Select * from Employee INNER JOIN Project-Person ON Employee.eid=Project-Person.eid WHERE Employee.eid NOT NULL Question 5: Consider the Relation R={A, B, C, D, E, F, G, H } and the set of functional dependencies. A C B CG AD EH C DF A H What is the key for R? Decompose R into 2NF, 3NF and finally in BCNF relation. Ans:-A functional dependency (FD) is a constraint between two sets of attributes in a relation from a database. Given a relation R, a set of attributes X in R is said to functionally determine another attribute Y, also in R, (written X Y) if, and only if, each X value is associated with precisely one Y value. Customarily we call X the determinant set and Y the dependent attribute. Thus, given a tuple and the values of the attributes in X, one can determine the corresponding value of the Y attribute. In simple words, if X value is known, Y value is certainly known. For the purposes of simplicity, given that X and Y are sets of attributes in R, X Y denotes that X functionally determines each of the members of Yin this

case Y is known as the dependent set. Thus, a candidate key is a minimal set of attributes that functionally determine all of the attributes in a relation. The concept

For IGNOU Solved Assignments Visit : http://www.ignousolvedassignments.com

of functional dependency arises when one attribute is dependent on another attribute and it also uniquely determines the other attribute. (Note: the "function" being discussed in "functional dependency" is the function of identification.) A functional dependency FD: X Y is called trivial if Y is a subset of X.

The determination of functional dependencies is an important part of designing databases in the relational model, and in database normalization and demoralization. The functional dependencies, along with the attribute domains, are selected so as to generate constraints that would exclude as much data inappropriate to the user domain from the system as possible. For example, suppose one is designing a system to track vehicles and the capacity of their engines. Each vehicle has a unique vehicle identification number (VIN). One would write VIN EngineCapacity because it would be inappropriate for a vehicle's engine to have more than one capacity. (Assuming, in this case, that vehicles only have one engine.) However, EngineCapacity VIN, is incorrect because there could be many vehicles with the same engine capacity. This functional dependency may suggest that the attribute EngineCapacity be placed in a relation with candidate key VIN. However, that may not always be appropriate. For example, if that functional dependency occurs as a result of the transitive functional dependencies VIN VehicleModel and VehicleModel EngineCapacity then that would not result in a normalized relation. a

relation is in BOC normal form if all its determinant are candidate keys, in other words each determinant can be used as a primary key. Because relation R has only one determinant (a, b, c),, which is the composite primary, key and since the primary is a candidate key therefore R is in BOC normal form. Now R may or may not be in fourth normal form. 1. If R contains no multi value dependency then R will be in Fourth normal form. 2. Assume R has the following two-multi value dependencies: a ------->> b and a ---------->> c

In this case R will be in the fourth normal form if b and c dependent on each other. However if b and c are independent of each other then R is not in fourth normal form and the relation has to be projected to following two non-loss projections. These non-loss projections will be in fourth normal form.

For IGNOU Solved Assignments Visit : http://www.ignousolvedassignments.com

Example: Case 1: Assume the following relation: Employee (Eid:pk1, Language:pk2, Skill:pk3) No multi value dependency, therefore R is in fourth normal form.

case 2: Assume the following relation with multi-value dependency: Employee (Eid:pk1, Languages:pk2, Skills:pk3) Eid ---->> Languages Languages and Skills are dependent. This says an employee speak several languages and has several skills. However for each skill a specific language is used when that skill is practiced. Eid ------>> Skills

Eid 100 100 100 200 200

Language English Kurdish French English Arabic

S k ill Teaching Politic cooking cooking Singing

Thus employee 100 when he/she teaches speaks English but when he cooks speaks French. This relation is in fourth normal form and does not suffer from any anomalies. case 3: Assume the following relation with multi-value dependency: Employee (Eid:pk1, Languages:pk2, Skills:pk3) Eid ---->> Languages Languages and Skills are independent. Eid ------>> Skills

For IGNOU Solved Assignments Visit : http://www.ignousolvedassignments.com

Eid 100 100 100 100 200

Language English Kurdish English Kurdish Arabic

S k ill Teaching Politic politic Teaching Singing

This relation is not in fourth normal form and suffers from all three types of anomalies. Insertion anomaly: To insert row (200 English Cooking) we have to insert two extra rows (200 Arabic cooking), and (200 English Singing) otherwise the database will be inconsistent. Note the table will be as follow: Eid 100 100 100 100 200 200 200 200 Language English Kurdish English Kurdish Arabic English Arabic English S k ill Teaching Politic politic Teaching Singing Cooking Cooking Singing

Deletion anomaly: If employee 100 discontinue politic skill we have to delete two rows (100 Kurdish Politic), and (100 English Politic) otherwise the database will be inconsistent.

Update anomaly: If employee 200 changes his skill from singing to dancing we have to make changes in more than one place The relation is projected to the following two non-loss projections which are in forth normal form

For IGNOU Solved Assignments Visit : http://www.ignousolvedassignments.com

Emplyee_Language(Eid:pk1, Languages:pk2) Eid 100 100 200 Language English Kurdish Arabic

Emplyee_Language(Eid:pk1, Skills:pk2) Eid 100 100 200 S k ill Teaching Politic Singing

For IGNOU Solved Assignments Visit : http://www.ignousolvedassignments.com

Anda mungkin juga menyukai