0% found this document useful (0 votes)
14 views56 pages

ISM Practical

The document outlines various assignments related to Information Systems Management, focusing on Database Management Systems (DBMS) and Relational Database Management Systems (RDBMS). It includes detailed instructions on creating tables in MS Access, data types, field properties, and DML commands for manipulating data. The assignments cover practical applications such as creating tables, inserting data, and querying information from a database.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views56 pages

ISM Practical

The document outlines various assignments related to Information Systems Management, focusing on Database Management Systems (DBMS) and Relational Database Management Systems (RDBMS). It includes detailed instructions on creating tables in MS Access, data types, field properties, and DML commands for manipulating data. The assignments cover practical applications such as creating tables, inserting data, and querying information from a database.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 56

MAHARAJA SURAJMAL INSTITUTE

DEPARTMENT OF BUSINESS ADMINISTRATION


FIRST SHIFT

PAPER CODE: BBA (GEN) 307


PAPER NAME: Information Systems Management Lab

Submitted By: Submitted To:


Sahil Halder Ms. Priyanka
05114901721 (Assistant Professor)
INDEX

S NO. Title Date Page No.


1 Assignment 1 1-14
(DBMS & RDMS)
2 Assignment 2 15-19
(Create Table)
3 Assignment 3 20-26
(DML Commands)
4 Assignment 4 27-33
(Advanced DML Commands)
5 Assignment 5 34-42
(Aggregate/Grouping Functions)
6 Assignment 6 43-49
(E-R Diagram)
7 Assignment 7 50-54
(Reports)
ASSIGNMENT 1

Q: Define DBMS and RDMS.

ANS. DBMS: It stands for database management system. It is a


computerized data-keeping system.

Users of DBMS are allowed to manipulate the data inside the database, as
well as the structure of the database.
There are different types of DBMS.

There are different types of databases for different purposes.

3
RDBMS: A relational database management system (RDBMS) is a
collection of programs and capabilities that enable users to create, update,
administer and otherwise interact with a relational database.

A relational database is a type of database that stores and provides access


to data points that are related to one another.
It is stored in the form of tables.

DBMS RDBMS

DBMS stores data as a file. RDBMS stores data in tabular form.

Data elements need to be accessed Multiple data elements can be accessed


individually. at the same time

No relationship between data. Data is stored in the form of tables


which are related to each other.

It stores data in either a navigational or It uses a tabular structure where the


hierarchical form headers are the column names, and the
rows contain corresponding values.

It deals with a small quantity of data. It deals with large amounts of data.

4
DIFFERENT WAYS OF CREATING TABLES IN MS ACCESS :-
Step 1: Click on search window @ taskbar.

Step 2: Type MS Access.

5
Step 3: Double click on the icon.
Step 4: Click create and then click table icon.

Step 5: Click and rename fields.


Step 6: Insert the required data.

Step 7: Go to design view.

Step 8: Change properties if necessary.

6
7
DIFFERENT WAYS OF CREATING TABLES IN MS ACCESS AND
DIFFERENT DATA TYPES USED IN TABLES IN MS ACCESS.
Steps-
Step 1: Open MS Access, click on create and then click on table icon.(Here you
can see Various Types of VIEWS OF CREATING A TABLES IN MS
ACCESS).

There are different DATA TYPES used in Tables in MS ACCESS

1. TEXT: when we need to enter textual information such as name, address


we use this data type.
2. NUMBER: when we need to enter number-based data such as marks, roll
number, account number etc we use this data type.
3. DATE/TIME: We use this data type to specify date and time.
For example: date of transaction, time of attendance
4. Currency: basically, is used when we need to show amounts in different
currency.
For example: in a multicurrency account, we need information on the
type of currency used.
5. Auto number: is used when we need to enter sequential number for
example: id, roll number, serial number.
6. Yes/No: is used when we need data in the form of yes/no, true/false etc.
8
7. Memo: when we need enter lengthy text and numbers, such as notes and
descriptions.
8. OLE object is object Linking and Embedding to store images and
documents. it stores file in bitmap version.
9. Hyperlink: it is a textual location of an object such as a file.
10.Attachment: is used when you to attach files to database.

FOR EXAMPLE.

9
AN EXAMPLE.

10
DIFFERENT FIELD PROPERTIES OF MS ACCESS TABLES

Field Size

In the Field Size box for Text fields, enter the maximum number of characters
that can be entered in the field. Suppose that the field you’re dealing with is ZIP
code, and you want to enter five-number ZIP codes. By entering 5 in the Field
Size text box, only five characters can be entered in the field. A sleepy data-
entry clerk couldn’t enter a six-character ZIP code by accident.
For Number fields, select a value for the field size from the drop-down list. The
table below describes these field sizes.

11
Access Numeric Field Sizes
Field Size Description

Byte An integer that holds values from 0–255.

Integer An integer that holds values from –32,768– +32,767.

Long An integer that holds values from –2,147,483,648–


Integer +2,147,483,647.

Single A floating point number that holds large values up to 7


significant digits.

Double A floating point number that holds large values up to 15


significant digits.

Replication A globally unique identifier (GUID) required for replication;


ID* this number is generated randomly.

Decimal A number with defined decimal precision. The default


precision is 0, but you can set the scale up to 28.
*Not supported by the .accdb file format.
The Single, Double, and Decimal field size options hold different ranges of
numbers. For now, if you need to store numbers after the decimal point, choose
the Double field size so that you cover most situations.

Format
Click the drop-down list and choose the format in which text, numbers, and
dates and times are displayed.

Decimal Places
For a field that holds numbers, open the Decimal Places drop-down list and
choose how many numbers can appear to the right of the decimal point. This
property affects how numbers and currency values are displayed, not their real
value. Numbers are rounded to the nearest decimal point. The Auto option
displays the number of decimal places permitted by the format you chose on the
Format drop-down list.

Input Mask

12
For Text and Date field types, this feature provides a template with punctuation
marks to make entering the data easier. Telephone numbers, social security
numbers, and other numbers that typically are entered along with dashes and
parentheses are ideal candidates for an input mask (another ridiculous database
term!). On the datasheet, blank spaces appear where the numbers go, and the
punctuation marks stand at the ready to receive numbers.
Input masks make data entry easier.
In the Input Mask text box, enter a 0 where numbers go and enter the
punctuation marks where they go. For example, enter (000) 000-0000 or
000/000-0000 to enter an input mask for a telephone number. You can also
create input masks by clicking the three dots beside the Input Mask text box.
Doing so opens the Input Mask Wizard dialog box, where you can fashion a
very sophisticated input mask.

Caption
If the field you're working on has a cryptic or hard-to-understand name, enter a
more descriptive name in the Caption text box. The value in the Caption
property appears as the column heading in Datasheet view, as a label on forms,
and on reports in place of the field name. People entering data understand what
to enter after reading the descriptive caption.

Default Value
When you know that the majority of records require a certain value, number, or
abbreviation, enter it in the Default Value text box. That way, you save yourself
the trouble of entering the value, number, or abbreviation most of the time
because the default value appears already in each record when you enter it. You
can always override the default value by entering something different.

Validation Rule
As long as you know your way around operators and Boolean expressions, you
can establish a rule for entering data in a field. For example, you can enter an
expression that requires dates to be entered in a certain time frame. Or you can
require currency figures to be above or below a certain value. To establish a
validation rule, enter an expression in the Validation Rule text box. To use dates
in an expression, the dates must be enclosed by number signs (#). Here are some
examples of validation rules:

13
>1000 The value you enter must be over 1,000.

<1000 The value you enter must be less than 1,000.

>=10 The value you enter must be greater than or


equal to ten.

<>0 The value you enter cannot be zero.

>=#1/1/2019# The date you enter must be January 1, 2019,


or later.

>=#1/1/2019# And The date you enter must be in the year 2019.
<#1/1/2020#

To get help forming expressions, click the three dots beside the Validation Rule
text box to open the Expression Builder and build an expression there. Try
clicking the Help button in the Expression Builder dialog box. Doing so opens
the Access Help program, where you can get advice about building expressions.
Creating a validation rule.

Validation Text

If someone enters data that violates a validation rule that you enter in the
Validation Rule text box, Access displays a standard error message. The
message reads, “One or more values are prohibited by the validation rule set for
[this field]. Enter a value that the expression for this field can accept.” If this
message is too cold and impersonal for you, you can create a message of your
own for the error message dialog box. Enter your friendly message in the
Validation Text box.

Required
By default, no entry has to be made in a field, but if you choose Yes instead of
No in the Required box and you fail to make an entry in the field, a message
box tells you to be sure to make an entry.

Allow Zero Length


This property allows you to enter zero-length strings in a field. A zero-length
string — two quotation marks with no text or spaces between them (“”) —
indicates that no value exists for a field. To see how zero-length strings work,
suppose that your database table calls for entering email addresses. If you didn’t

14
know whether one person has an email address, you would leave the E-Mail
Address field blank. If, however, you knew that the person didn’t have an email
address, you could indicate as much by entering a zero-length string. Choose
Yes on the drop-down list to permit zero-length strings to be entered in the
field.

Indexed
This property indicates whether the field has been indexed. Indexes make
sorting a field and searching through a field go faster. The word No appears in
this text box if the field has not been indexed.

Unicode Expression
Choose Yes from the Unicode Expression drop-down list if you want to
compress data that is now stored in Unicode format. Storing data this way saves
on disk space, and you probably don't want to change this property.

Smart Tags
If you intend to enter Smart Tags in the field, indicate which kind you enter by
clicking the three dots next to the Smart Tags box and choosing an option in the
Action Tags dialog box.

Text Align
This property determines how the text is aligned in a column or on a form or
report. Select General to let Access determine the alignment, or select Left,
Right, Center, or Distribute.

Text Format
Available on Long Text fields, this drop-down list lets you choose to allow rich
text in the field. With this property set to Rich Text, you can make different
words bold, italic, underline, and change font sizes and colors. Set it to Plain
Text for plain, boring text with no formatting.

Append Only
Available on Long Text fields, this property lets you add data only to a Long
Text field to collect a history of comments.

Show Date Picker

15
This property is available on Date/Time fields. Choose For Dates to place a
button next to the column that data-entry clerks can click to open a calendar and
select a date instead of typing numbers.

IME Mode/IME Sentence mode


These options are for converting characters and sentences from East Asian
versions of Access.

16
Assignment 2

Ques 1: CREATE TABLE D


(snoVARCHAR(5) NOT NULL PRIMARY KEY, name VARCHAR(16), city
VARCHAR(16))

Output:

Ques 2:CREATE TABLE p


(pnoVARCHAR(5) NOT NULL PRIMARY KEY,
descrVARCHAR(16),
color VARCHAR(8))

17
Quest 3:CREATE TABLE sp
(snoVARCHAR(5) NOT NULL REFERENCES s.
pnoVARCHAR(5) NOT NUILL REFERENCES p.
qty INT
PRIMARY KEY (sno, pno))

18
Quest 4: Alter the Table D.
Drop column city

19
Quest 5: Alter Table statement
Alter column name Varchar(25)

20
21
Assignment 3 DML Commands Create table customer

Insert 5 rows each using all the


three methods
Display the contents
Display CID and Fname
Display Fname, Lname and
state
Display all records where state
is Delhi
Display fname, lname
concatenated with state
Display the records whose pin is
not entered
Display the states to which the
customer belongs
Select records of Delhi having
name Rajiv
Display records Delhi or
Karnataka
Display details of Customer
with
CID=98
Display details of Customer
except
CID=98
Use Alias Name to display CID
Retrieve all rows where CID is
between 98 and 100

22
Display those rows where state
name begins with „D‟
Retrieve all rows where first
name
contains the word‟RAJ‟
Retrieve all rows where name
field contains the word‟RA
ESH‟
Retrieve all rows where city is
Delhi, Karnataka or Bangalore
Rename the table customer to
cust
Delete all those rows of
customers who stay in
Bangalore
Delete those customers who do
not have Pin Code
Rename column city to address

23
ASSIGNMENT-3
DML COMMANDS

Question 1: Create Table Customer


Step 1 – Open MS Access
Step 2 – Click on “Blank Document”
Step 3 – Go to “Create” and click on “Query Design” and then on “SQL”
Syntax: Create table Customer(
CID int,
Fname varchar(20),
Lname varchar(20),
State varchar(15),
PinCode int)

Question 2 -Insert
Values in the table

Syntax: Insert into Customer


Values (105,"Dhwani","Kapoor","UP",110095)
Output:

Question 3 – Display all contents


Syntax: Select * from Customer
Output:

24
Question 4 – Display CID and Fname
Syntax: Select CID, Fname from Customer
Output:

Question 5 – Display Fname, Lname and State


Syntax: Select Fname, Lname, State from Customer
Output:

Question 6 – Display all records where state is Delhi


Syntax: Select * from customer
where state = "delhi"
Output:

25
Question 7 – Display the states to which the customer belongs
Syntax: Select Distinct State from Customer
Output:

Question 8 – Select records of Delhi having name Rajiv


Syntax: Select * from Customer
where state = "Delhi" and Fname = "Rajiv"

Question 9 – Display records of Delhi and Karnataka


Syntax: Select * from Customer
where state = "Delhi" and "Karnataka"
Output:

26
Question 10 – Display details of customer where CID is 102
Syntax: Select * from customer
where CID = 102
Output:

Question 11 – Retrieve all rows where CID is between 102 and 104
Syntax: Select * from Customer
where CID >= 102 and CID <= 104
Output:

Question 12 – Display data of those where state name begins with “D”
Syntax: Select * from Customer
where State LIKE "D%"
Output:

27
Question 13 – Retrieve all rows where state is Delhi, Karnataka, or Bangalore
Syntax: Select * from Customer
where State = "Delhi" or "Karnataka" or "Bangalore"
Output:

Question 14 – Rename Table “Customer” to “Cust”


In the Tables column right click on Table “Customer” and then on Rename and change the
Table name to “Cust”
Output:

28
ASSIGNMENT-4
ADVANCED DML COMMANDS

Create EMPLOYEE Database in SQL & perform following queries in the


same.
Step1: Open MS Access & open Blank Database.
Step2: Start creating Employee_detail table with SQL commands. With
following fields: -
● D_No
● F_NAME
● L_NAME
● Gender
● Salary
● City

29
Step 3: Enter values corresponding to their field name.

Now perform the following Queries on the database (Employee_detail)

● List name of all the employee whose Department no. is 5.

30
● Find names and salary of all the employees sorted according to salary

● List names of employees having salary between 30,000 and 50,000

31
● List name of employees who live in Janakpuri

● List name of all female employees

32
● List all employees whose F_name is “Ram” and L_Name is “Kapoor”

● Sort the employees in descending order of city

● Display those employees whose salary is not equal to 20,000

33
● Update the person named “Ram” to “Vikas”

34
● Update city of empid 101 to Jaipur

35
ASSIGNMENT 5

AGGREGATE/GROUPING FUNCTIONS
Step 1 – Open MS Access

Step 2 – Click on “Blank Document”

Step 3 – Go to “Create” and click on “Query Design” and then on “SQL”

Question 1 – Create Table Employee

Syntax: CREATE TABLE EMPLOYEE

(NAME VARCHAR(20),

DESIGNATION VARCHAR(20),

SALARY INT,

COMMISION INT,

DEPT VARCHAR(20)

Output:

Question 2 – Insert 5 records in employee table

Syntax: Insert into Employee

values ("Ken","Intern",10000,2000,"HR")

Output:

36
Question 3 – Find average and total salaries of employees

Syntax: SELECT SUM(SALARY), AVG(SALARY)

FROM EMPLOYEE;

Output:

Question 4 – Find average and total salary of each employee

Syntax: Select Avg (Salary) as "Average Salary", Sum (Salary + Commision) as "Total
Salary"

from Employee

Output:

37
Question 5 – Find Minimum Salary of a Manager

Syntax: Select Min (Salary) from Employee

where Designation = "Manager"

Output:

Question 6 – Find Maximum Salary of the Manager

Syntax: Select Max (Salary) from Employee

where Designation = "Manager"

Output:

38
Question 7 – How many employees are managers?

Syntax: Select Count (*) from Employee

where Designation = "Manager"

Output:

Question 8 – Add 50% Salary to Salary Column and name it HRA

Step 1 -

Syntax: Alter Table Employee

Add HRA int

Output:

39
Step 2 –

Syntax: Update Employee Set HRA = SALARY*0.50

Output:

Question 9 – Count the total number of employees

Syntax: Select Count (*) from Employee

Output:

Question 10 – Count the number of departments available

40
Syntax: Select Count (*) from
(Select Distinct Dept from Employee)

Output:

Question 11 – Update the commission to 10% Salary for all the employees having salary
greater than 50000

Syntax: Update EMPLOYEE Set Commision = (Salary*0.10)

Where Salary > 50000

Output:

Question 12 – Update the Salaries of all employees in Finance Department by hiking it

41
15%

Update Employee Set Salary = (Salary + Salary*0.15)

Where DEPT = "Finance"

Output:

Question 13 – Find the difference between highest and lowest salaries for each
department

Syntax: Select Max (Salary) - Min (Salary) as DIFFERENCE

From Employee

Group by Dept

Output:

42
Question 14 – List Designation of all employees where Salary is more than 40000

Syntax: Select Name, Designation from Employee

where Salary > 40000

Output:

Question 15 – List Average Salary of each Designation excluding Managers

Syntax: Select AVG (Salary) as "Average" from Employee

where Designation <> "Manager"

Output:

Question 16 – List Total, Max, Min, and Average Salary of employees Department wise

Syntax: Select Sum (Salary), Max (Salary), Min (Salary), AVG (Salary) from Employee

43
Group by Dept

Output:

44
ASSIGNMENT-6
E-R DIAGRAM
Q. What is E-R diagram & Notations for representing ER
diagrams?E-R Diagram
An entity relationship diagram (ERD) helps database designers review and
verify links between tables in a database. An ERD shows a visual representation
of primary and foreign keys, which are the columns used to link tables.
Microsoft Access includes a diagram utility that lets you create and view an
ERD for your Access database. You can also use this diagram to reverse
engineer any database.

ER Diagram stands for Entity Relationship Diagram, also known as ERD is a


diagram that displays the relationship of entity sets stored in a database. In other
words, ER diagrams help to explain the logical structure of databases. ER
diagrams are created based on three basic concepts: entities, attributes and
relationships.

ER Diagrams contain different symbols that use rectangles to represent entities,


ovals to define attributes and diamond shapes to represent relationships.

At first look, an ER diagram looks very similar to the flowchart. However, ER


Diagram includes many specialized symbols, and its meanings make this model
unique. The purpose of ER Diagram is to represent the entity framework
infrastructure.

Notations

Entity Relationship Diagram Symbols & Notations mainly contains three


basic symbols which are rectangle, oval and diamond to represent relationships
between elements, entities and attributes. There are some sub-elements which
are based on main elements in ERD Diagram. ER Diagram is a visual
representation of data that describes how data is related to each other using
different ERD Symbols and Notations.

Following are the main components and its symbols in ER Diagrams:

o Rectangle
This Entity Relationship Diagram symbol represents entity types

45
o Ellipses
This symbol represents attributes
o Diamonds
This symbol represents relationship types
o Lines
It links attributes to entity types and entity types with other relationship
types
o Primary key
Attributes are underlined
o Double ellipses
Represent multi-valued attributes

Step1. Create ER diagram for Student management system


o Open ms-access, create tables in design view.

46
47
Step2. Click on database tools, select relationships.

E-R DIAGRAM RELATIONSHIP:-


A relationship in Access helps you combine data from two different tables.
Each relationship consists of fields in two tables with corresponding data. For
example, you might have a ProductID field in a Products table and in an
OrderDetails table.
Step1. Click the Database Tools tab.

Step2. Click the Relationships button.

48
Step3. Click the Show Table button.

Step4. Double click the tables(s) you want add.

Step5. Click Close.


Step6. Click the related field in the first table and drag it to the related field in
the second table.

49
Note: Whenever you link a primary key from one table to a field from another
table, you create a foreign key.

Step7. Check the Enforce Referential Integrity option.

Note: Referential integrity helps you avoid “orphan” records and maintains
database accuracy.

Step8. Click Create.

50
51
ASSIGNMENT-7
REPORTS
Reports organize and summarize data for viewing online or for printing. A detail
report displays all of the selected records. You can include summary data such as
totals, counts, and percentages in a detail report. A summary report does not list the
selected records but instead summarizes the data and presents totals, counts,
percentages, or other summary data only. Access has several report generation tools
that you can use to create both detail and summary reports quickly.

Ways To Create Reports Using MS Access

You can create a report either by using the Report Wizard, if you want to use more
than one table, or the Report button, if you already have a table or query open.

1. Select the table or query you want to base the report on.

2. Click the Create tab on the ribbon.

3. Click the Report button.

You can also select either the Blank Report button (to create and display the report
in Layout View) or the Report Design button (to create and display a blank report
in Design View).

52
A report is instantly created based on the active table or query, and appears in Layout
View.

4. Click the Save button.

5. Give the report a name and click OK.

The report is saved and appears in the Navigation Pane.

There are several ways to create reports in Access, they're listed in this table.

53
Report Buttons on the Home tab

Creates a basic report of the data in the current table or query.


Report
You can then add features, such as groups and totals.

Report Creates a new blank report in Design view, where you can make
Design more advanced changes to the report.

Blank
Creates a blank report with no fields or formatting.
Report

Report Shows the Report Wizard that helps you create simple,
Wizard customizable reports.

Labels Shows the Label Wizard to create standard or custom labels.

Question- Create a Student Performance Report.

Step 1) Open MS Access � Click on Create � Table

Step 2) On left side, Right click on table � Click on Design View

54
Step 3) Now name the various fields related to students’ performance in the table in design
view � Right click on Table section to save it with any name you would like to give to table.

Step 4) Now click on saved table from the navigation panel & edit the details of students
under different fields assigned to the table.

Step 5) After completing the table with all its fields � Click on create � Report.

55
Step 6) Finally check the output of student performance report in Report view.

56

You might also like