ANNU, BBA (GEN), 04721201719, ISM LAB (1) - Compressed
ANNU, BBA (GEN), 04721201719, ISM LAB (1) - Compressed
INSTITUTE
INFORMATION MANAGEMENT SYSTEMS BBA 210 LAB FILE
‘Database’?
information can later be used for a website, an application or any other client
to store for future purpose. The most common information is User information
2. Database (DB) are organized, they have a structure, and all the data they store
3. Information is stimuli that have meaning in some context for its receiver. When
as data. After processing (such as formatting and printing), output data can
4. Database Management System (DBMS) is the software that interacts with end
users, applications, and the database itself to capture and analyze the data. The
DBMS software additionally encompasses the core facilities provided to
administer the database. The sum total of the database, the DBMS and the
SQL, and for all modern database systems like MS SQL Server, IBM DB2, Oracle,
QUES 2. Write steps to open Microsoft Access. Write steps to create a database.
What are the various elements/objects of a database? What are the various ways to
1) Table
A table is the primary unit of physical storage for data in a database. When a user
accesses the database, a table is usually referenced for the desired data. Multiple
tables. Because tables store data, a table requires physical storage on the host
Types of table:
Join tables are tables used to create a relationship between two tables that
Validation tables, often referred to as code tables, are used to validate data
entered into other database tables.
Tables are used to store the data that the user needs to access. Tables might also
have constraints attached to them, which control the data allowed to be entered into
the table. An entity from the business model is eventually converted into a database
table.
2) Columns
is converted into a database model, entities become tables and attributes become
columns. A column represents one related part of a table and is the smallest logical
structure of storage in a database. Each column in a table is assigned a data type. The
assigned data type determines what type of values that can populate a column.
When visualizing a table, a column is a vertical structure in the table that contains
3) Rows
A row of data is the collection of all the columns in a table associated with a single
occurrence. Simply speaking, a row of data is a single record in a table. For example, if
there are 25,000 book titles with which a bookstore deals, there will be 25,000
records, or rows of data, in the book titles table once the table is populated. The
number of rows within the table will obviously change as books' titles are added and
removed. See Figure 3 for an illustration of a row of data in a table.
4) Data Types
A data type determines the type of data that can be stored in a database column.
Although many data types are available, three of the most commonly used data types
are
Alphanumeric
Numeric
Alphanumeric data types are used to store characters, numbers, special characters, or
value is treated as a character, not a number. In other words, you should not attempt
Design techniques such as this will be discussed in more detail throughout the book.
Numeric data types are used to store only numeric values. Date and time data types
are used to store date and time values, which widely vary depending on the relational
Datasheet view
DESIGN VIEW
DATASHEET VIEW
QUES 3. What are the features of SQL?
2. Are easy to implement, because they use a simple high-level, strongly typed
language.
variables.
QUES 4. Write steps to create table in design view and datasheet view.
Answer.
DESIGN VIEW
Step 3: Enter ‘Field Name’ and ‘Data Type’, as per the data.
DATASHEET VIEW
Answer.
Field name:
employee, perhaps the employee's name, hire date or social security number.
Data type:
A data type is a type of data. Data type is a data storage format that can
contain a specific type or range of values. When computer programs store data
Field Size:
The space for each record in the table. It can be adjusted with the help of “field
size property” of the “number fields” in the table. The size of the record field
Description:
fields. For a database object, click Properties on the view menu and enter the
description text in the Description box. For tables or queries, you can also enter
Answer.
database file.
QUES 7. What are the various data types in Database (One line description of
FIRST NAME
LAST NAME
AGE
ADDRESS
Create another table using datasheet view as STUDENT_COURSE with the field
name as
ID
COURSE CODE
COURSE NAME.
Answer.
property.
mathematical calculations,
1, 2, 4, or 8 bytes. 16 bytes for
except calculations involving
Number Replication ID (GUID) only.
money (use Currency type). Set
TABLE 1: STUDENT_DETAILS
TABLE 2: STUDENT_COURSE
QUES 8. Write steps to create a database, save the database and open the database.
Create a student database with S1 as table containing the field names as SERIAL NO,
ENROLLMENT NO, NAME, AGE and ADDRESS. Insert at least 10 records using the
Answer.
Step 3: Type a file name for the database which you want to create.
Step 3: Click the format you want to use for the new copy.
Step 1: Choose File. Click ‘Open’. Open dialogue box will open.
Step 2: Click to select the filename of the database you want to open.
Create a database DB1 with a table T1 with the following fields as:
ST_NO.
ST_ID
ST_NAME
ST_ADD
ST_PHONE NO.
ST_HOBBIES
Answer.
QUES 10. Create a database named EMPLOYEE with the following fields as
EMPLOYEE NAME, EMPLOYEE CODE, EMPLOYEE DESIGNATION, EMPLOYEE
DEPARTMENT, DATE OF JOINING and YEAR OF EXPERIENCE. Delete any two records
Step 1: Select the records which you want to delete. Options will open. Click on
‘Delete Record’
Step 2: A dialogue will open, asking for confirmation.
Step 1: Select the field which you want to delete. Options will open. Click on
‘Delete Column’
Step 2: A dialogue will open, asking for confirmation.
FINAL OUTPUT
QUES 11. Create an EMPOYEE database with the following fields as
Emp_code
Emp_ssn
Emp_name
DOB
Emp_design
Emp_dept
DOJ
E_SAL
Years of experience
For the above created database set the following fields properties:
1. Employee names should be in upper case with field size equal to10
Answer.
Step 2: Type ‘=Date()’ in ‘Default value’. For entering current date as default
E-SAL should be in dollars.
Emp_code
Emp_ssn
Emp_name
Emp-dob
For the above created database set the input mask for the field property for
Answer
EMPLOYEE database
EMP_SSN:
Step 2: In “Input Mask’’ of ‘General Field Properties’, click for opening ‘Input
Mask Wizard’
The input mask will show the change made. The number will be stored in Database
Step 2: In “Input Mask’’ of ‘General Field Properties’, click for opening ‘Input
Mask Wizard’.
Step 3: In ‘Input Mask Wizard’. Select ‘Short Date’. Then click ‘Next’.
Step 4: Select ‘How to store data?’ and click ‘Next’. Click on ‘Finish’
The input mask will show the change made. The number will be stored in Database
St_id
St_roll no.
St_name
St_age
St_dob
St_course
St_add
St_contact
St_phone no.
A. What is a primary key? Make a field stu_id as the primary key in the
no and st_dob as a composite key also write the steps for the same.
Answer.
STUDENT DATABASE
A. Primary Key: A primary key is a field in a table which uniquely identifies each
row/record in a database table. Primary keys must contain unique values. A primary
key column cannot have NULL values. A table can have only one primary key, which
Step 1: Select the ‘stu_id’ record. Right click, options will be shown.
Step 2: Select ‘Primary Key’. A key sign will be shown in front of ‘stu_id’.
guarantee uniqueness.
Step 1: Select the ‘stu_roll no’ and ‘st_dob’ record. Right click, options will be
shown.
Step 2: Select ‘Primary Key’. A key sign will be shown in front of ‘stu_roll no’
and ‘st_dob’.