You are on page 1of 3

Sandubaev Erjan(190113013)

Lecture(04-N)
1) I imported CSV file in MSSQL without
Query because of some mistakes,
but I imported XML file by query:
CREATE TABLE Aid(
CountryName VARCHAR(200),
CountryCode VARCHAR(20),
ActionYear VARCHAR(20),
IndicatorName VARCHAR(200),
IndicatorCode VARCHAR(200),
Vals nvarchar(50)
);

DECLARE @eff xml


SELECT @eff = C
FROM OPENROWSET (BULK 'C:\oraclexe\app\oracle\tables\aid.xml', SINGLE_BLOB) AS Eff(C)
SELECT @eff
DECLARE @hdoc int
EXEC sp_xml_preparedocument @hdoc OUTPUT, @eff
SELECT *
FROM OPENXML (@hdoc, '/root/row' , 2)
WITH(
CountryName VARCHAR(200),
CountryCode VARCHAR(20),
ActionYear VARCHAR(20),
IndicatorName VARCHAR(200),
IndicatorCode VARCHAR(200),
Vals nvarchar(50)
)
EXEC sp_xml_removedocument @hdoc
2) I used select count(Vals) from Aid where Vals is null; query in order to count
the nulls
3) My special commands which relate to my dataset:
/*Mortality rate under 5 years old, the maximum*/

Select MAX(Vals), IndicatorName FROM [Assignment 1].[dbo].[eff]


WHERE IndicatorName = 'Mortality rate, under-5 (per 1,000 live births)'
GROUP BY IndicatorName;

/*Incidence of tuberculosis (per 100,000 people), the minimum*/

Select MIN(Vals), IndicatorName FROM [Assignment 1].[dbo].[eff]


WHERE IndicatorName = 'Incidence of tuberculosis (per 100,000 people)'
GROUP BY IndicatorName;

/*Prevalence of stunting, height for age (% of children under 5), the minimum*/

SELECT MIN(Vals) FROM [Assignment 1].[dbo].[eff] WHERE ActionYear > '2000'


AND IndicatorName = 'Prevalence of stunting, height for age (% of children under 5)';
4) I decided to compare MYSQL and PostgreSQL and Oracle
Comparison criteria Microsoft Server SQL MySQL Oracle
Supports core sql yes yes yes
Supports usage of procedures yes yes yes
Supports looping yes yes yes
Can create variables yes yes yes
Can create triggers yes yes yes
Only available as a cloud
service no no no
XML support yes yes yes
Dutability yes yes Yes

ORACLE:

 Sophisticated security system. Unlike MySQL, Oracle supports groups or roles. There
is ability to deny a privilege in Oracle, while MySQL only allows to grant
 External authentication options like LDAP, Active Directory. MySQL supports only
built-in authentication
 True full-text search. In MySQL this feature is limited and only available for non-
transactional storages
 Sophisticated administration tools and IDEs for debugging

MySQL:

 It's open source


 Low Total Cost of Ownership. The price of MySQL commercial licenses is less
expensive than same configuration of Oracle. Also, MySQL has less demands to the
hardware platform compared to Oracle
 Each table can have a different storage engine
 Each storage engine has particular behavior, features, and properties

MSSQL:

 Support tools SQL Server Profiler, BI tools, SQL Server Management Studio, and
Database Tuning Advisor
 Displays error, and warning messages about the migration in a progress window
 Importing and Exporting from SQL Server Management Studio
 An activity monitor feature with filtering and automatic refresh

ALSO THERE IS A LINK TO MY DARASET: https://data.world/hdx/1249b7c5-f71d-4d97-


a680-1c6b2d121032
ALSO I IMPORTED CSV DATASET TO SQL DEVELOPER:

You might also like