Professional Documents
Culture Documents
Dbms - Assignment by Devendra Darji
Dbms - Assignment by Devendra Darji
Q1) What is the use of SQL and Non SQL databases? When to use which
one? Specify with scenarios?
Answer: SQL stands for Structured Query Language. It's used for
relational databases. A SQL database is a collection of tables that stores
a specific set of structured data. We can use it in:
● Creating a new database with SQL and inserting new data in the
database,
Q2)
Table :- Employee
fname mname Inam ssn badate sex address salary sssn dno
e (f-ssn) (f-dnumber)
Table :- Department
dname dnumber mgrssn (f-ssn) mgrstart date
Table :- Dept_loacation
dnumber (f-number) dlocation
Table :- Project
pname pnumber plocation pnum
Table :- Works_on
esssn (f-ssn) pno hrs
Table :- Dependent
essn dapentdentnam sex bdate rel
e
Answer :
Answer :
Q4. Consider the relation R, which has attributes that hold schedules of
courses and sections at a university; R = {Course_no, Sec_no,
Offering_dept, Credit_hours, Course_level, Instructor_ssn, Semester,
Year, Days_hours, Room_no, No_of_students}. Suppose that the
following functional dependencies hold on R: {Course_no} →
{Offering_dept, Credit_hours, Course_level} {Course_no, Sec_no,
Semester, Year} → {Days_hours, Room_no, No_of_students,
Instructor_ssn} {Room_no, Days_hours, Semester, Year} →
{Instructor_ssn, Course_no, Sec_no}. Try to determine which sets of
attributes form keys of R. How would you normalize this relation?
Answer :