Home Blog Page 13

Normalization basics that every DBMS student must know.

Normalization is a process that is used to reduce the redundancy and dependency in a database. It is the process of organizing a database in such a way that it meets two main goals:

Minimize redundancy: Redundancy occurs when the same information is stored in multiple places in the database. This can lead to inconsistencies, as different copies of the same data may not be kept in sync. Normalization helps to eliminate redundant data and ensure that each piece of data is stored in only one place.

Minimize dependency: Dependency occurs when one piece of data depends on another piece of data. For example, if an employee’s salary is stored in a separate table from their personal information, the salary depends on the employee’s personal information. Normalization helps to minimize dependency by breaking up large tables into smaller ones and establishing relationships between them using keys.

There are several different types of normalization, each of which has its own set of rules for organizing a database. The most common types of normalization are:

First normal form (1NF): A table is said to be in 1NF if it satisfies the following rules:
Each column must contain a single value (i.e., no repeating groups)
The order of the columns does not matter
There must be a primary key (a unique identifier for each row)


Second normal form (2NF): A table is in 2NF if it is already in 1NF and all of its columns depend on the primary key. In other words, no column should depend on a part of the primary key; it should depend on the whole key.

Third normal form (3NF): A table is said to be in 3NF if it is already in 2NF and all of its columns are independent of each other. In other words, no column should depend on any other column except the primary key.

Boyce-Codd normal form (BCNF): A table is in BCNF if it is already in 3NF and every determinant (a column or set of columns that determines the value of another column) is a candidate key (a unique identifier that could potentially be used as the primary key).

Normalization is an important concept in database design because it helps to ensure that a database is organized in a way that is efficient, consistent, and flexible. It can also help to improve the integrity and security of a database by reducing the risk of data inconsistencies and unauthorized access.

Binary numbers subtraction using the complement methods – Steps

0

STEPS FOR BINARY SUBTRACTION USING 1’s and 2’s Complement Method

  1. Make equal no of bits in both minuend and subtrahend
  2. Calculate
    • 1’s Complement of subtrahend if you’re performing subtracting using 1’s complement method.
    • 2’s complement of the subtrahend if you’re performing subtraction using 2’s complement method
      (Also view how to calculate 1’s and 2’s complements here.)
  3. Add result of step 2 with minuend to calculate the last sum.
  4. Inspect the last sum for carrying or overflow bit with the following conditions to calculate answer.
Image: datasagar.com

Example for further understanding.

Database and Database Management System(DBMS) – basic intro

Database:

  • An organized collection of data stored in a computer’s memory is known as a database.
  • The concept of the database makes it easy to manage data, organize it, edit if necessary, and delete unnecessary data by means of different software like Database Management Systems.
  • Most of the software and applications store data managing a proper database.
  • Organizations like schools/colleges, hospitals, business houses, media companies, etc. manage a huge amount of their data by maintaining a database.
    • Such data may include students’ details, daily transactions, doctors and patient data, staff data, inventory information, daily reports, etc.
  • Data can be stored using different techniques on the computer. If stored by managing rows and columns in the tabular form then we call that type of database as Relational Database (Relation means table).
    Other concepts are also being used like Object-Oriented Database, Grid Computing based database, Cloud database containers, etc.

Database Management System:

  • Software that is used to manage data stored in a database.
  • It is initial application software that is used to create data, collect data, store data, update and manage data.
  • It provides a mechanism for users to search for data stored in a database with easy to use interface.
  • Most of the DBMS software uses a commanding mechanism to do these operations(Create, Retrieve, Update, Delete) which is referred to as querying the database.
    • Some database querying languages are there like SQL. (Structure Query Language) are used for database operations.
  • DBMS software is mainly used to manage data in a database effectively. It also provides security to stored data.

Advantages of DBMS:

  • Control data redundancy(repetition of the same data in more than one place).
  • BY using DBMS software one can Share data among different users and programs.
  • It provides a better interaction mechanism with the user.  ==> It provide user interface
  • It provides a Backup and Recovery mechanism in case of accidental damage
  • Better Security ==> username, password mechanism with different level of user like
  • Administrator, guest, normal user, etc.
  • Searching is fast with DBMS
  • It helps in decision making with accurate and timely information.
  • Space optimization can be done by using DBMS. ==> to store a large volume of data in less space.
    Facilitate advanced application and software development.

Disadvantages:

  • Trained professionals like Database Administrators are required to manage DBMS.
  • Expensive: Setup cost, manage, maintenance, upgrade and migration
  • Complexity in managing databases as managers should have proper knowledge of DBMS and languages like SQL. 
  • Disk failure or damage may result in loss of data.
  • Other security issues like viruses, hacking and cyber terrorism, etc.
  • DBMS software needs frequent maintenance and upgrade which may result in more expenses.
  • Lacking in proper database design may result in data loss.

Reduce your risk of coronavirus infection – Nepal Government

Following are the safety measures recommended by the Nepal Government to reduce risk of CoronaVirus infection.

  • Frequently clean hands by using alcohol-based hand rub or soap and water.
  • When coughing and sneezing cover mouth and nose with flexed elbow or tissue – throw the tissue away immediately and wash hands.
  • Avoid close contact with anyone that has fever and cough Thoroughly cook meat and eggs Avoid unprotected contact with live wild or farm animals
  • Thoroughly cook meat and eggs
  • Avoid unprotected contact with live wild or farm animals
  • Protect yourself and others from getting sick: Wash your hands
    • sneezing
    • when caring for the sick
    • before, during and after you prepare food
    • before eating
    • after toilet use
    • when hands are visibly dirty
    • after handling animals or animal waste
  • Wash your hands with soap and running water when hands are visibly dirty
  • If your hands are not visibly dirty, frequently clean them by using alcohol‐based hand rub or soap and water
  • Protect others from getting sick
    • When coughing and sneezing cover mouth and nose with flexed elbow or tissue – throw the tissue away immediately and wash hands.
    • Throw tissue into a closed bin immediately after use
    • Clean hands with alcohol‐based hand rub or soap and water after coughing or sneezing and when caring for the sick
    • Avoid close contact when you are experiencing cough and fever
    • Avoid spitting in public
    • If you have a fever, cough, and difficulty breathing seek medical care early and share previous travel history with your health care provider.
  • Practice food safety
    • Use different chopping boards and knives for raw meat and cooked foods
    • Wash your hands between handling raw and cooked food
    • Sick animals and animals that have died of diseases should not be eaten
    • Even in areas experiencing outbreaks, meat products can be safely consumed if these items are cooked thoroughly and properly handled during food preparation
  • Working in wet markets? Stay healthy!
    • Wear protective gowns, gloves, masks, and facial protection while handling animals and animal products
    • Remove protective clothing after work, wash aprons daily and leave at the worksite
    • Avoid exposing family members to soiled work clothing and shoes
    • Frequently wash your hands with soap and water after touching animals and animal products
    • Clean and disinfect equipment and working area at least once a day
  • Stay Healthy while travelling
    • Avoid travel if you have a fever and cough
    • If you have a fever, cough and difficulty breathing seek medical care early and share previous travel history with your health care provider
    • Avoid close contact with people suffering from a fever and cough Frequently clean hands by using alcohol-based hand rub or soap and water
    • Avoid touching eyes, nose or mouth
    • When coughing or sneezing cover mouth and nose with flexed elbow or tissue – throw the tissue away immediately and wash hands
    • If you choose to wear a mask, be sure to cover mouth and nose – avoid touching mask once it’s on
    • Immediately discard the single-use mask after each use and wash hands after removing masks
    • If you become sick while travelling, inform the crew and seek medical care early
    • If you seek medical attention, share travel history with your health care provider
    • Eat only well-cooked food
    • Avoid spitting in public
    • Avoid close contact and travel with animals that are sick

Source: https://heoc.mohp.gov.np/update-on-novel-corona-virus-covid-19/

Two Tier vs Three Tier Database Management System Architecture

In the field of Information Technology, DBMS architecture can be defined as integrated combination of security standards for setting as well as programming aspect of databases along with the functioning or operating mechanism of existing structures. Architecture mainly focuses on the overall design and construction of database for large enterprise database systems that so as to manage massive amounts of information for organizations. DBMS Architecture helps in design, development, implementation, and maintenance of a database to great extent. To understand database architecture, we must understand how users of modern day applications interact with information stored in large enterprise environmental settings.

As we’re known to the fact that most users of a database system today are not present at the site of system that’re using them. Databases are connected to it through computer network. Remote machines on which database user work can be referred to as client machines. On the other hand, database system runs on machines called as servers. On the basis of design of system, DBMS architecture can be of either Centralized or Decentralized or Hierarchical type. Whatever it be, DBMS architecture can be seen as either a single-tier or multi-tier. Number of tiers depends upon the specific application requirements or how organizations implement their business logic.

There’re mainly 3 types of DBMS architectures:
1. Single/One Tier (1-Tier)
2. Two Tier Architecture (2-Tier)
3. Three Tier Architecture (3-Tier)

Fig: Single – Tier Architecture
Image Source: Research Gate

Single Tier database architecture is a simplest architecture with all the client, server and database residing on single machine. This very architecture is considered as rarely used architecture and is used by database learners in their local machine itself.
For example: If you install local servers like XAMPP or WAMPP or MAMPP etc. in your PC with MySQL and start learning SQL queries from your web browser, it can be considered as 1 – Tier architecture.

Fig: Two-Tier architecture.

Two Tier database architecture is the one in which whole system is divided into presentation layer and data layer where presentation as well as application layer run on the client devices and database reside on the server computers. It is also known as client-server architecture. In this architecture, the database management system resides on a server computer that is more powerful machines capable of providing service to many clients at once. Application Program Interface(API) standards like ODBC(Open Database Connectivity) and JDBC(Java Database Connectivity) are used for interaction between the client and the server. For this purpose, client first sends connection request to server machine and connection is established after server response. As database and end users are located in different sites, this architecture is considered as secured as well.
For example: Contact Management System created using MS- Access can be considered as an example of Two Tier architecture. Also, Applications like Microsoft Word or PowerPoint running on college’s local servers and students using those applications can be considered as 2-Tier.

Fig: Three – Tier Architecture

Three Tier database architecture is the one in which Presentation layer, Business Logic Layer and Data Layer are separated from each other. The client device acts as merely a front end and does not contain any direct database calls. Instead, the client communicates with a tier where all the business logics are implemented called application server. Clients usually interact with application server through a forms interface. Application server on the other hand communicates with a database system to access data. The business logic of the  application, which says what actions to carry out under what conditions, is embedded in the application server, instead of being distributed across multiple clients. Three – Tier applications are more appropriate for large applications, and for applications that run on the World Wide Web especially.
For example: Travel destination listing website www.nepaltourismhub.com hosted on internet, E-banking service provided by Sanima Bank etc.

I hope you understand the basic behind DBMS architectures and their use cases.
Thanks for reading! – geeksagar

Anatomy of Corona Virus and science behind it

What is Corona Virus?

With common names Coronavirus, COVID-19, Sars-Cov-2 or SARS, etc. Coronavirus is an RNA Virus. Genetic signature inside this virus is made up of Rhino Nucleic Acid(RNA) which can replicate/reproduce itself. Its surface is covered by capsule and elongated structural extensions are seen known as spikes. These spikes form a crown-like structure which is the reason behind its name CoronaVirus. Starting from the year 2019, it created disease and mass penetration and called by the name COVID-19. World Health Organization recently named in accordance with the scientific nomenclature scheme of this category of species as SARS-Cov-2 which means that it’s generation 2 daughter virus of SARS.

How does it enter the human body?

Image Source: Soon-Shiond (MD, MBBCh, MSc), Chairman & CEO of NantWorks

Salival droplets from an infected person with nanoparticles of the SARS-Cov-2 virus go into any surface and hand or any body surface. If it gets a chance to enter the lung, it simply hijacks the protein receptors called ACE2 receptors residing on the surface of human body cells. The main thing is that these receptors are mainly dense in the alveoli cell of lungs from where gas exchange occurs which we call oxygenation. These ACE2 receptors protect lung tissues from injury.

How coronavirus affect our body function?

Coronavirus uses its spikes to communicate with ACE2 receptors and take advantage of the cell itself and use the entire cell as a reproduction factory.

As it replicates, it overtakes protective ACE2 receptors in alveoli. The thickening of the walls and fluid inside alveoli prevents the gas exchange and condition we call is Acute Respiratory Distress Syndrome (ARDS). Fibrosis takes place after that which results in scars within the lungs.
This condition results in no longer oxygenation inside the lung and our body fights back to take this over which we refer to as Severe Acute Respiratory Syndrome (SARS). SARS itself is dangerous as the rest of the body part can’t get enough oxygen to function and leads to multi-organ failure in most of the cases. This happens mainly in alveoli but the fatality ratio is high for a host with Cardiovascular Diseases, Diabetes, Chronic Respiratory Syndrome, High Blood Pressure, and Cancer, etc in prior in accordance with data from WHO.

For Your Information, Fibrosis is a pathological wound healing in which connective tissue replaces normal parenchymal tissue which leads to remarkable tissue remodelling followed by the formation of permanent scar tissues.

Source: https://en.wikipedia.org/wiki/Fibrosis

Clinical effects of SARS.

Clinical reportings from around the globe are seeing severe hypertension and low potassium in the blood as some signs from coronavirus affected patients.

How deadly is coronavirus?

The ability of a virus to spread from one host to another is referred to as the spreading factor for that specific virus. The spread factor for coronavirus is reported to be 2.6. For example, if 5 people have coronavirus and they infect 2.6 others then after 2 cycles 18 peoples could get infected. After 3 cycles, it could easily reach 52 people and make 140 people sick in a span of 4 cycles. Majors suggested by the majority of nations fighting against this virus to be in self-isolation and social distancing. This major flattens the exponential growth curve and help medical workers deal with current cases.

Signs/Symptoms of COVID-19

Following is a chart showing signs and symptoms of patients from three major clusters of China; Wuhan, Hubei Province, and China Country.

Image Source: Soon-Shiond (MD, MBBCh, MSc), Chairman & CEO of NantWorks

How soap help in breaking the chain?

The anatomy of viruses is completely different than that of bacterias. This is the reason that antibacterial soaps are not effective in killing the virus. Coronavirus has a fatty protein layer as an envelope that can only be penetrated by detergents like shampoo, dishwasher soaps, soaps, etc. These detergents act as a surfactant and pull out viruses attached in hand or even face surface. The soap has the ability to crack the outer surface of coronavirus, which means the ability to kill them. For this to happen, one should rub each and every corner of their hand for at least 20 seconds.

I hope you got the proper information about what novel coronavirus is and it’s basic structural information in layman’s term. If you liked the information, help spread this message so that everyone gets exact information about the cause behind this novel pandemic. Stay Safe!

Corona Virus: Nepal rushed to build a 50-bed hospital in 2 Days

The world’s eye is in Nepal which shares a direct border with China, the first epicenter of COVID19, is still safe in accordance with the data from WHO. Among a total of 177 countries where coronavirus was spotted, Nepal experienced 1 case so far which has already been solved as well. No causalities have been reported so far. Nepal seems to be following the precautionary steps very well in COVID-19 breakdown.

Image Source: Mayor Renu Dahal’s Facebook

There are significant steps taken in case of infrastructure preparation to deal with the virus. Hospitals’ infrastructure is being upgraded with test-kits and emergency spots selection. Recently a local government in Bagmati Province is successful in setting up a hospital with a capacity of 50 patients in 2 days following China’s path where 1000 bed hospital was constructed and came into operation just in 10 days. It is said that more ICUs and HDUs are being added in the newly constructed hospitals. Some images from the Facebook wall of Renu Dahal – Mayor of Bharatpur Municipality in Chitwan, are presented below.

I’ve been closely following government moves as well as coronavirus data in Nepal and found steps of central and local governments to be satisfactory and applaudable. Some basic preparation for the probable epidemics is being made across the country.

The central government is doing it’s level best to prepare for probable epidemics that could enter Nepal anytime in the future. The government has banned gathering 25 more heads and closed all school colleges until further notice. Many exams scheduled on the line were stopped by the government with a notice and press conference yesterday in the capital, Kathmandu.

Image: Isolation Centers by Nepal Army in Morang.

I have been following local municipality updates from eastern Nepal and some of the others across the country. Corona is among their first priority. With the involvement of the Nepal Army, Scout Nepal, and other organizations, various campaigns are ongoing to aware and educate people for oral hygiene, self-quarantine and so on. Isolation camp has set-up in Tandi, Morang in Eastern Nepal by Nepal Army today itself.


It seems political parties are standing as one to deal with potential crises right now. With daily press conferences, it’s being easier than before to get close with government notices and announcements. In a sign that Nepal is considered as a high-risk zone by WHO, Nepal must be very serious about the issue and make every effort possible to increase isolation spots, nucleic acid test kits and hospital beds across the country for faster response in the worst-case scenario.

Microsoft Promoting Free use of Teams Communication App Amid Coronavirus Breakdown

Microsoft Teams is a hub for teamwork to keep all your team’s chats, meetings, files, and apps together in one place. Instead of meeting in-person, this team communication and file-sharing application is a means for individuals and businesses to facilitate communication regardless of their geographical location. It’s even getting attention more than before the corona virus breakdown.

Microsoft’s executive vice president and president of global sales, marketing and operations Mr. Jean-Philippe Courtois announced six months’ use of Teams for free earlier this month via his Tweet.

Tech giants around the world are announcing free use of such communication applications one after another. Recently, Atlassian let their Jira and bunch of other team management tools free with some limitations to help people communicate to reach others in this global crisis. It’s not the sole purpose as well. As tech enthusiast we can spot some marketing strategy as well. One after another, they’re rolling out their software for general public and small businesses, there’s also an opportunity to such strategic decisions.

After Microsoft announced the Teams for free, it’s usage in China hiked up to result in a server crash recently. Corporate vice president for Microsoft 365 Mr. Jared Spataro recently announced that they’ve seen a 500 percent increase in Teams meetings and conferences there in China since January 31 as well as a 200 percent increase in Teams usage on mobile devices.

You shall download Microsoft Teams following the links below
Teams Download for Desktop
Download Teams for Android
Download Teams for any devices