Ideal Institute of Management And Technology

DBMS LAB FILE
ON

Submitted To: Mr. Anil Sharma (Asst. Professor) Submitted By: Karan Malhotra 02621001709 BBA-Gen (Eve)

02621001709

Page 2

An undertaking such as this is never the work of a single person and this study is no exception. I, at the very outset, thank and express my gratitude to all those who directly or indirectly helped me a lot in completion of the present practical work and encouraged, inspired and enthusiasts me in the moments of despair and made it possible for this report to be in your hand today. First of all, I wish to express my profound feeling of gratitude and indebtedness to my Project Guide Mr. Anil Sharma, Asst. Professor, IIMT (Delhi) for his advice and guidance
02621001709 Page 3

during various stages of this practical. In spite of his pre-occupations and job responsibilities he has spared his time during the completion of this work. I thank him wholeheartedly. I wish to record my sincere gratitude to Dr. Sunil Kr. Niranjan, HOD (BBA), who provides constant support to me during my work.

02621001709

Page 4

02621001709 Page 5 .

02621001709 Page 6 .

02621001709 Page 7 .

He has taken care of all necessary aspects and shown interest and sincerity during the completion of computer fundamental file to my full satisfaction. Karan Malhotra pursuing BBA GEN from IDEAL INSTITUTE OF MANAGEMENT AND TECHNOLOGY has completed his DBMS Practical file under my supervision and guidance. 02621001709 Page 8 .This is to certify that Mr.

02621001709 Page 9 .I certify that the file is up to my expectations as per the guidelines laid by the Guru Gobind Singh Indraprastha University.

Professor.ANIL SHARMA ( Asst. IIMT) 02621001709 Page 10 .

02621001709 Page 11 .

02621001709 Page 12 .

. 1. introduction 5 02621001709 Page 13 .

2 Database creation 7 3. Table creation 9 02621001709 Page 14 .

Table preview 15 5.4. Entering records into table 16 02621001709 Page 15 .

6.1 selection 18 02621001709 Page 16 . Queries 18 6.

6.2 addition of coloumn 22 6.3 inserting values in coloumn 23 02621001709 Page 17 .

4 greater then condition 24 6.6.5 delete 26 02621001709 Page 18 .

6insert 28 6.6.7orderby 30 02621001709 Page 19 .

6. Formes 38 02621001709 Page 20 .8 update 34 7.

8. Reports 42

02621001709

Page 21

02621001709

Page 22

Microsoft Access is a computer application used to create and manage computer-based databases on desktop computers and/or on connected computers (a network). Microsoft Access can be used for personal information management (PIM), in a small business to organize and manage data, or in an enterprise to communicate with servers.
02621001709 Page 23

Like any other computer application, in order to use Microsoft Access, you must first install it. After installing Microsoft Access, then you can open it. There are various ways you can open Microsoft Access. It gets launched like the usual products you have probably been using. As such, to start this program, you could click Start -> (All) Programs -> Microsoft Office -> Microsoft Office Access 2007. You can also launch it from Windows Explorer or My Computer. To do this, locate its shortcut in Windows
02621001709 Page 24

Explorer or My Computer. By default, Microsoft Access 2007 is located in C:\Program Files\Microsoft Office\Office12 and its shortcut is called MSACCESS.EXE. Once you have located it, you can then double-click it.

02621001709

Page 25

02621001709

Page 26

1.Features Of Ms-Access

02621001709

Page 27

Users can create tables, queries, forms and reports, and connect them together with macros. Advanced users can use VBA to write rich solutions with advanced data manipulation and user control. The original concept of Access was for end users to be able to “access” data from any source. Other uses include: the import and export of data to many formats including Excel, Outlook, ASCII, dBase,Paradox, FoxPro, SQL Server, Oracle, ODBC, etc. It also has the ability to link to data in its existing location and use it for viewing, querying, editing, and reporting. This allows the existing data
02621001709 Page 28

to change and the Access platform to always use the latest data. analysis. It can perform heterogeneous joins between data sets stored across different platforms. This makes it very convenient to distribute the entire application to another user. There is also the Jet Database format (MDB or ACCDB in Access 2007) which can contain the application and data in one file. and reporting locally. Access is often used by people downloading data from enterprise level databases for manipulation. who can run it in disconnected environments. 02621001709 Page 29 .

NET through DAO or ADO. 02621001709 Page 30 . VBA can also be included in queries. Users can mix and use both VBA and "Macros" for programming forms and logic and offers objectoriented possibilities. Microsoft Access offers parameterized queries. These queries and Access tables can be referenced from other programs like VB6 and .One of the benefits of Access from a programmer's perspective is its relative compatibility with SQL (structured query language) — queries can be viewed graphically or edited as SQL statements. and SQL statements can be used directly in Macros and VBA Modules to manipulate Access tables.

From Microsoft Access. VBA can reference parameterized stored procedures via ADO. 02621001709 Page 31 .

1. History of Ms-access Date 02621001709 Version Version Supported OS Page 32 Office suite version .

3 Pro 02621001709 Page 33 .1 Access 2.number 1992 1993 Access 1.0 Windows 3.0 Windows 3.0 1 2.1x Office 4.

0 Office 95 Professional 1997 Access 97 8.0 Windows 95 Windows 9x. NT 3. Page 34 Office 2000 Professional.0.51/4.1995 Access for Windows 95 7.0 Office 97 Professional and Developer 1999 02621001709 Access 2000 9.0 Windows 9x. Premium and . NT 4.

2000. XP Windows 2000. Page 35 Developer 2001 Access 2002 10 Office XP Professional and Developer 2003 02621001709 Access 2003 11 Office 2003 Professional and Professional . Me.2000 Windows 98.

Professional Plus. Vista Enterprise Office 2007 Professional.XP. Ultimate and Enterprise 2007 12 02621001709 Page 36 .Vista Microsoft Office Access 2007 Windows XP SP2.

Vista Office 2007 Service Pack 2 02621001709 Page 37 .Microsoft Office Access 2009 2007 SP2 12 Windows XP SP2.24-Apr.

02621001709 Page 38 .

1. 02621001709 Page 39 . Click File->new.

02621001709 Page 40 . Select blank database.2.

02621001709 Page 41 .

Type the name of database & press create.3. 02621001709 Page 42 .

02621001709 Page 43 .

02621001709 Page 44 .

4. 02621001709 Page 45 . Database is created.

02621001709 Page 46 .

02621001709 Page 47 .

DESIGN VIEW 02621001709 Page 48 .In Access tables can be created either by 1.

1. Click on the “create table using Design View”. 02621001709 Page 49 .

02621001709 Page 50 .

02621001709 Page 51 .

02621001709 Page 52 .

02621001709 Page 53 .Enter the required field name and there data types.2.

02621001709 Page 54 .

3. Assign primary key to a field by right clicking on the field and selecting primary key or selecting primary key from 02621001709 Page 55 .

02621001709 Page 56 .edit menu.

02621001709 Page 57 .

5. 02621001709 Page 58 . Select file->save to save the design of table.

02621001709 Page 59 .

6. 02621001709 Page 60 . Enter the mane for the table and press Ok.

Table will be created. 02621001709 Page 61 .7.

02621001709 Page 62 .

02621001709 Page 63 .

02621001709 Page 64 .2. 1. Creating table using SQL command. Select Queries from objects.

02621001709 Page 65 .

2. Select “create query in design view”. 02621001709 Page 66 .

02621001709 Page 67 .

02621001709 Page 68 .

3. 02621001709 Page 69 . Close this window & select view->SQL view.

02621001709 Page 70 .

02621001709 Page 71 .4. Enter the create query.

02621001709 Page 72 .

! 02621001709 Page 73 .5. Press run button.

02621001709 Page 74 .

02621001709 Page 75 .

Table created using design view. 02621001709 Page 76 .

02621001709 Page 77 .

02621001709 Page 78 .Table created using SQL query.

02621001709 Page 79 .

02621001709 Page 80 .

02621001709 Page 81 . Select the table in which you want to enter the records.1.

02621001709 Page 82 .

02621001709 Page 83 .

Enter the desired records.2. 02621001709 Page 84 .

02621001709 Page 85 .

3. Save the table 02621001709 Page 86 .

02621001709 Page 87 .

02621001709 Page 88 .

02621001709 Page 89 .

1. a) 1. 02621001709 using design view Select “create query in design view”. Page 90 . To show all records where city is Delhi.

02621001709 Page 91 .

02621001709 Page 92 .

02621001709 Page 93 .

02621001709 Page 94 . Select the tables. Click add & then close above window.2.

02621001709 Page 95 .

02621001709 Page 96 .3.Drag and drop the fields required in query.

02621001709 Page 97 .

4. Press run button. ! 02621001709 Page 98 .

02621001709 Page 99 .

Save the query by file->save 02621001709 Page 100 .5.

Press ok. 02621001709 Page 101 .6.

02621001709 Page 102 .

b. Enter the SQL query & press run.(using SQL command) 1. 02621001709 Page 103 .

02621001709 Page 104 .

Output 02621001709 Page 105 .

02621001709 Page 106 .

02621001709 Page 107 .

2. Adding new coloumn 1. 02621001709 Page 108 . Select “create query using design view”-> SQL.

02621001709 Page 109 .2. Enter the Alter SQL query.

02621001709 Page 110 .

Run !. output 4.3. 02621001709 Page 111 .

02621001709 Page 112 .

3. Insert the values in table Page 113 02621001709 .

Click on the table in which you want to insert values and enter the values. 02621001709 Page 114 .

02621001709 Page 115 .

02621001709 Page 116 .

02621001709 Page 117 .

02621001709 Page 118 .

select “create query in design view”. 02621001709 Page 119 .4. Select the tables needed for the query To show students above 75 marks. a. (using design view) 1.

02621001709 Page 120 .

2.drag and drop all the required fields and enter the 02621001709 Page 121 .

02621001709 Page 122 condition. .

! 02621001709 Page 123 .3. Press the run button.

02621001709 Page 124 .

(using SQL query) 02621001709 Page 125 . b. Save the query. File->save->enter name->ok.4.

1. Select “create query in design view”->SQL 02621001709 Page 126 .

02621001709 Page 127 .

Press the run button.! 02621001709 Page 128 .2.

02621001709 Page 129 .

5. To delete the record of the student a. (using design view) 02621001709 Page 130 .

1. 02621001709 Page 131 . Select “create query in design view”.

02621001709 Page 132 .

2. Select the tables needed for the query 02621001709 Page 133 .

02621001709 Page 134 . Select query->Delete query.3.

02621001709 Page 135 .

4. 02621001709 Page 136 . Drag and drop all the required fields and enter the condition.

specify the condition in criteria.5. 02621001709 Page 137 .

02621001709 Page 138 .

02621001709 Page 139 .! And press yes .6. Press the run button.

02621001709 Page 140 .

(using SQL Query) 02621001709 Page 141 .b.

1. Select “create query in design view”->SQL 02621001709 Page 142 .

! 02621001709 Page 143 .2. Press the run button.

02621001709 Page 144 .

3. 6. Insertion of new record Using SQL query 1. 02621001709 Page 145 . click yes. Select “create query in design view”.

02621001709 Page 146 .

02621001709 Page 147 .

2. 02621001709 Page 148 . Click on close.

02621001709 Page 149 .

Right click on screen and select SQL view.3. 02621001709 Page 150 .

02621001709 Page 151 .

02621001709 Page 152 .4. Enter the insert query.

02621001709 Page 153 .

! 02621001709 Page 154 . Press the run button.5.

6. Save the query. 7. 02621001709 Page 155 . Click Yes.

using design view 02621001709 Page 156 . Ordering the records a.7.

1. Select “create query in design view”. 02621001709 Page 157 .

02621001709 Page 158 .

02621001709 Page 159 .

02621001709 Page 160 .2. Select the required table and press add.

02621001709 Page 161 .

02621001709 Page 162 .3. Drag and drop the fields.

Select ascending or descending in the sort row. 02621001709 Page 163 .4.

02621001709 Page 164 .

02621001709 Page 165 .

Press run button! 02621001709 Page 166 .5.

02621001709 Page 167 .

b. using sql query 02621001709 Page 168 .

02621001709 Page 169 . Select “create query in design view”.1.

02621001709 Page 170 .

2. 02621001709 Page 171 . Click on close.

02621001709 Page 172 .

3. Page 173 . 02621001709 Right click on screen and select SQL view.

02621001709 Page 174 .

4. Enter the order by query. 02621001709 Page 175 .

02621001709 Page 176 .

5. Press run button! 02621001709 Page 177 .

02621001709 Page 178 .

Select “create query in design view”. Updating a record a.8. 02621001709 Page 179 . Using Design view 1.

02621001709 Page 180 .

02621001709 Page 181 .

Select the required table and press add.2. 02621001709 Page 182 .

02621001709 Page 183 .

Select query from menu bar->Update Query 02621001709 Page 184 .3.

02621001709 Page 185 .

02621001709 Page 186 .Drag and Drop required fields.4.

02621001709 Page 187 .

5. Press run button ! 02621001709 Page 188 .

b. 02621001709 Page 189 . Using SQL View Select “create query in design view”. 1.

02621001709 Page 190 .

02621001709 Page 191 . Click on close.2.

02621001709 Page 192 .

Right click on screen and select SQL view. 02621001709 Page 193 .3.

02621001709 Page 194 .

4. Enter the update query. 02621001709 Page 195 .

02621001709 Page 196 .

5. Press run button! 02621001709 Page 197 .

02621001709 Page 198 .

02621001709 Page 199 .

1. Select forms from object. 02621001709 Page 200 .

02621001709 Page 201 .

2. Select “Create forms by using wizard”. 02621001709 Page 202 .

02621001709 Page 203 .

02621001709 Page 204 . Select table or query from drop down menu.3.

02621001709 Page 205 .

02621001709 Page 206 .

02621001709 Page 207 . select the fields to be included in the form.4.

02621001709 Page 208 .

02621001709 click next.5. Page 209 .

02621001709 Page 210 .

02621001709 Page 211 .

6. 02621001709 Page 212 . Select the type of form and press next.

02621001709 Page 213 .

02621001709 Page 214 .

Select the style of form. 02621001709 Page 215 .7.press next.

02621001709 Page 216 .

02621001709 Page 217 .

8. Press Finish. 02621001709 Page 218 . Select the title.

02621001709 Page 219 .

02621001709 Page 220 .

02621001709 Page 221 .

1. Select Reports from object menu. 02621001709 Page 222 .

02621001709 Page 223 .

2.

Select “create report by using wizard”.

02621001709

Page 224

02621001709

Page 225

3.

Select the table or query from drop down menu.

02621001709

Page 226

02621001709

Page 227

02621001709

Page 228

4.

Select the fields required for report.

02621001709

Page 229

02621001709

Page 230

02621001709

Page 231

Press next.5. 02621001709 Page 232 .

02621001709 Page 233 .

02621001709 Page 234 .

02621001709 Page 235 . Select the group which is to be added.6. Click next.

02621001709 Page 236 .

02621001709 Page 237 .

02621001709 Page 238 . select wether sort the records.7.press next.

02621001709 Page 239 .

02621001709 Page 240 .

Select the layout. 02621001709 Page 241 .8. press next.

02621001709 Page 242 .

02621001709 Page 243 .

02621001709 Page 244 .

Press next. 02621001709 Page 245 .9. Select the layout style.

02621001709 Page 246 .

02621001709 Page 247 .10. Select the repot name and click on finish.

02621001709 Page 248 .

02621001709 Page 249 .

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master Your Semester with a Special Offer from Scribd & The New York Times

Cancel anytime.