DAM Journal 1
DAM Journal 1
DAM Journal 1
Objectives:
Install Microsoft SQL server and performed all the commands & quarries which we used in
the previous subject of Database. Also described the Transactions, Subquery, Basic SQL
DBA operations, and the difference between MDF & LDF memory?
By the end of this lab students will be able
Revision of all DBMS Concepts, installation.
Lab Tasks:
Task 1:
Difference between the Software types of standards? How many types of Microsoft SQL
servers, Facilities, and prices of licenses?
Answer:
A software standard is a standard, protocol, or other common format of a document,
file, or data transfer accepted and used by one or more software developers while
working on one or more than one computer programs. Software standards enable
interoperability between different programs created by different developers.
Microsoft offers SQL Server in five editions that provide different levels of the
bundled services.
Enterprise
Standard
Web
developer
Express
Enterprise:
The premium offering, SQL Server Enterprise edition delivers comprehensive high-
end datacenter capabilities with blazing-fast performance, unlimited virtualization 1,
and end-to-end business intelligence - enabling high service levels for mission-
critical workloads and end-user access to data insights. The license fee of Enterprise
sql server is $13,748.
Standard:
%
Enrollment Number: ____________________________
SQL Server Standard edition delivers basic data management and business
intelligence database for departments and small organizations to run their
applications and supports common development tools for on-premises and cloud -
enabling effective database management with minimal IT resources. The license fee
of standard sql server is $3.586 per core.
Web:
SQL Server Web edition is a low total-cost-of-ownership option for Web
hosters and Web VAPs to provide scalability, affordability, and manageability
capabilities for small to large scale Web properties. SQL Server Developer edition
lets developers build any kind of application on top of SQL Server. The web server is
free only pricing for the hosting.
Express:
SQL Server Express w/ Tools – contains the core SQL Server database along
with the tools to manage SQL Server instances, including SQL Server Express,
LocalDB, and SQL Azure. This version of sql server is free to download.
Developer:
SQL Server Developer edition lets developers build any kind of application on
top of SQL Server. It includes all the functionality of Enterprise edition, but is
licensed for use as a development and test system, not as a production server. This
version of sql server is free for download.
Task 2:
Install Microsoft SQL server and take all the screenshots of installing and write the steps in
two to three lines? (Problems, Query, Result Screen)
Answer:
Page 2 of 8
%
Enrollment Number: ____________________________
Page 3 of 8
%
Enrollment Number: ____________________________
Page 4 of 8
%
Enrollment Number: ____________________________
Page 5 of 8
%
Enrollment Number: ____________________________
Task 3:
Performed all the commands and queries which we used in the Database subject during the
using SQL server?
(DML, DDL, DQL, DCL, TCL, Logical operators, set operations, ERD, Normalization,
Joins, Views).
Answer:
CREATE: CREATE TABLE employee
(
id int primary key,
name varchar(30),
dob datetime,
email varchar(40)
);
Page 6 of 8
%
Enrollment Number: ____________________________
Select id from employee
Where salary=(select MAX(salary) from employee)
begin tran
delete from employee
where id=1920
commit
Task 4:
Explain in two to three lines for the following and provide any one example in form of query
with its result
- (DDL - Data Definition Language (CREATE, DROP, ALTER)
DDL is a computer language used to create and modify the structure of database
objects in a database. These database objects include views, schemas, tables, indexes,
etc.
- DML- Data Manipulation Language (INSERT, DELETE, UPDATE)
- The SQL commands that deals with the manipulation of data present in the database
belong to DML or Data Manipulation Language and this includes most of the SQL
statements.
- DCL- Data Control Language (GRANT, REVOKE)
- DCL includes commands such as GRANT and REVOKE which mainly deal with the
rights, permissions, and other controls of the database system.
- DQL- Data Query Language (SELECT)
- DQL statements are used for performing queries on the data within schema objects.
The purpose of the DQL Command is to get some schema relation based on the query
passed to it.
- Transactions
- A transaction is a sequence of operations performed on a database as a single logical
unit of work. The effects of all the SQL statements in a transaction can be either all
committed or all rolled back (undone from the database).
- Subquery
- A Subquery is a query within another SQL query and embedded within the WHERE
clause.
- Joins
- SQL Join statement is used to combine data or rows from two or more tables based on
a common field between them. Different types of Joins are as follows:
- INNER JOIN
- LEFT JOIN
- RIGHT JOIN
- FULL JOIN
- Set Operations
- Set operators combine the results of two component queries into a single result.
Queries containing set operators are called compound queries.
- Logical Operations
- SQL logical operators are used to test for the truth of the condition. A logical operator
like the Comparison operator returns a Boolean value of TRUE, FALSE, or
UNKNOWN.
- Normalization
Page 7 of 8
%
Enrollment Number: ____________________________
- Normalization is the process to eliminate data redundancy and enhance data integrity
in the table. Normalization also helps to organize the data in the database.
- ERD
- Entity-Relationship (ER) model is a visual representation of the table’s structure and
the relationships between logically related tables.
- Views
- In SQL, a view is a virtual table based on the result-set of an SQL statement. A view
contains rows and columns, just like a real table. The fields in a view are fields from
one or more real tables in the database.
Task 5:
Difference between MDF & LDF files.
MDF:
MDF stands for main database files. MDF is the primary data file for MSSQL. MDF contains
all the vital and necessary information in databases. The MDF file can maintain or a change
in file size depending on the actual changes made to the file itself.
LDF:
LDF stand for log database files. LDF is the supporting file and is characterized as a server
transaction log file. LDF contains all the actions which include transactions and changes
made in the MDF file. The LDF file size can take up a lot of space due to the numerous
changes and the information details ascribed to the changes.
Total 50 Signature
Note : Attempt all tasks and get them checked by your Lab. Instructor
Page 8 of 8