DBMS Lab Questions
DBMS Lab Questions
Affiliated to GGSIP University & Govt. of NCT of Delhi A grade NAAC Accredited Institution
D B M S Lab File
BBA 108
Semester 2nd
2013
Submitted By: Roll NO: Section: Branch: MADHUL LAMBA 07119201712 A BBA
SUBMITTED
TO:
D B M S
Lab File
DBMS LAB QUESTIONS
Q1. Create a database using database templates. Q2. Create a new database Student from scratch (Blank Database).
Attributes 1. 2. 3. 4. 5. 6. 7. Stud_ID (primary key) Stud_Name Stud_Sur_Name Stud_Semester Stud_contact Stud_Address Stud_E-mail Data Type Number Text Text Memo Number Memo Memo
Q3. Create a Employee Database contains Employee entity with following attributes?
Attributes Emp_Id (primary key) Emp_ Name Emp_Last_Name Emp_Dept Emp_Designation Emp_Contact Emp_E-mail id Emp_Address
Data Type Number Text Text Text Text Number Memo Memo
Description ID of Employees First name of the Employees Last name of the Employees Department of the Employees Designation of the Employees Contact number of the Employees E-mail of the Employees Address of the Employees
Q4. Create a new Entity Project in Employee database and create lookup-column projects in Project.
Attributes 1. 2. 3. 4. Emp_Id (Foreign Key) Project_Id (Primary Key Project Type Projects(Lookup- Column ) Data Type Number Number Text Text
D B M S
Lab File
Q5. Continue with the Employee Database and where each record consists of the following attributes: Attributes
Description Pay scale of employee Employees basic pay Employees deduction Employees gross pay
Set emp_Id as primary key Set the validation rule for basic_pay as ( >8000 ) and the validation text as Basic pay should be greater than 8000 Set the caption value of the field Emp_Name as Employee Name Set the field pay_scale as a required(mandatory) field Enter 10 records.
Q6. Create a relationship in Employee Database between two tables. Q7. Create a Database of Library Management System. Q8. Create a Database of Hospital Management System. Q9. Create a Database of Company contains 4 different departments and applies the password. Q10. Create a query through query wizard. Q11. Create a query using design view: Table name- student, Database name student database.
Student Roll_name Stu_name Course Fees_Paid Address BBA Yes #2234 City Gurgaon Mobile_no
101 student a. b. c. d. e.
Set the criteria for roll_no of student as >102 Sort the student names in ascending order Set the criteria showing students who has not paid their fees. Set the criteria showing the courses BBA or BJMC Set the criteria for the course B* and city Ba*
D B M S
i. Columnar ii. Tabular iii. Datasheet
Lab File
Q14. Create a report using report wizard. Q15. . Create auto report using: i) Columnar ii) Tabular Q16. . Create a macro performing following actions: i) Open form ii) Open Query iii) Open Report
D B M S
Lab File
D B M S
Lab File
D B M S
Lab File
OUTPUT
D B M S
Lab File
Q2. Create a new database Student from scratch (Blank Database). Attributes Data Type 8. Stud_ ID (primary key) 9. Stud_ Name 10. Stud_ Sur_ Name 11. Stud_ Semester 12. Stud_ contact 13. Stud _Address 14. Stud _E-mail ANS. Number Text Text Memo Number Memo Memo
D B M S
Lab File
10
D B M S
Lab File
10
11
D B M S
Lab File
OUTPUT
11
12
D B M S
Lab File
Q3. Create a Employee Database contains Employee entity with following attributes?
Attributes Emp_Id (primary key) Emp_ Name Emp_Last_Name Emp_Dept Emp_Designation Emp_Contact Emp_E-mail id Emp_Address Data Type Number Text Text Text Text Number Memo Memo Description ID of Employees First name of the Employees Last name of the Employees Department of the Employees Designation of the Employees Contact number of the Employees E-mail of the Employees Address of the Employees
ANS.
12
13
D B M S
Lab File
13
14
D B M S
Lab File
OUTPUT
14
15
D B M S
Lab File
Q4. Create a new Entity Project in Employee database and create lookup-column projects in Project. Attributes 1.Emp_Id (Foreign Key) 2.Project_Id (Primary Key 3.Project Type 4.Projects(Lookup- Column ) ANS. Data Type Number Number Text Text
15
16
D B M S
Lab File
16
17
D B M S
Lab File
OUTPUT
17
18
D B M S
Lab File
18
19
D B M S
Lab File
19
20
D B M S
Lab File
Q5. Continue with the Employee Database and where each record consists of the following attributes: Attributes 1. Pay_scale 2. Basic_pay 3. Net Pay 4. Gross Pay Data Type Number Number Number Number Description Pay scale of employee Employees basic pay Employees deduction Employees gross pay
5.Set emp_Id as primary key 6.Set the validation rule for basic_pay as ( >8000 ) and the validation text as Basic pay should be greater than 8000 7.Set the caption value of the field Emp_Name as Employee Name 8.Set the field pay_scale as a required(mandatory) field 9.Enter 10 records. ANS.
20
21
D B M S
Lab File
21
22
D B M S
Lab File
OUTPUT
22
23
D B M S
Lab File
23
24
D B M S
Lab File
24
25
D B M S
Lab File
25
26
D B M S
Lab File
26
27
D B M S
Lab File
27
28
D B M S
Lab File
OUTPUT
28
29
D B M S
Lab File
29
30
D B M S
Lab File
30
31
D B M S
Lab File
31
32
D B M S
Lab File
32
33
D B M S
Lab File
33
34
D B M S
Lab File
34
35
D B M S
Lab File
35
36
D B M S
Lab File
36
37
D B M S
Lab File
37
38
D B M S
Lab File
Q8. Create a Database of Hospital Management System. ANS. ENTITY ATTRIBUTES DOCTER DOC_ID,DOC_NAME,DOC_SURNAME, DOC_SPECIALIST, DOC_ADDRESS PATIENT PAT_ID,DOC_ID,PAT_NAME, PAT_CONTACT,PAT_GENDER,PAT_AGE STAFF STAFF_ID,STAFF_NAME,STAFF_DEPERT. STAFF_CONTACT,STAFF_ADDRESS MEDISINE MED_ID,MED_MANUDATE,MED_EXP MED_MANUFTUER
38
39
D B M S
Lab File
39
40
D B M S
Lab File
40
41
D B M S
Lab File
41
42
D B M S
Lab File
42
43
D B M S
Lab File
43
44
D B M S
Lab File
44
45
D B M S
Lab File
45
46
D B M S
Lab File
OUTPUT
46
47
D B M S
Lab File
Q9. Create a Database of Company contains 4 different departments and applies the password. ANS. ENTITY ATTRIBUTES COMPANY COM_ID,COM_NAME,COM_CONTACT, COM_ADDRESS EMPLOYEES EMP_ID,EMP_NAME,EMP_EMAIL EMP_CONTACT,EMP_ADDRESS PROJECT PRO_ID,PRO_TYPE,PRO_CONTENT, PRO_DATE CLIENT CLI_ID,CLI_NAME,CLI_ADD,CLI_CONTACT
47
48
D B M S
Lab File
48
49
D B M S
Lab File
49
50
D B M S
Lab File
50
51
D B M S
Lab File
51
52
D B M S
Lab File
52
53
D B M S
Lab File
OUTPUT.
53
54
D B M S
Lab File
54
55
D B M S
Lab File
55
56
D B M S
Lab File
56