| About Us | Contact Us | Privacy Policy | Join Us+ |

WorldTrueSight

Get the latest news and reviews about technology!

Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts

3 Feb 2019

File Organization In Database[COMPLETE CONCEPT]

Database SQL Server

FILE ORGANIZATION:

           Storage and access method of a file is called file organization.

TYPES OF FILE ORGANIZATION:

1.Sequential File Organization
2.Direct access File Organization

SEQUENTIAL FILE ORGANIZATION:

When we have to access data in sequence.
Example:
Tape-drive. In tape drive if we want to access the 2nd video we have to go through the 1st then we can access the second one . We can’t jump directly to  2nd .
ADVANTAGE OF SEQUENTIAL FILE ORGANIZATION:
Sequential saves memory. Because there is no meta data (header/footer) with a single record.

USES OF SEQUENTIAL FILE ORGANIZATION:
Sequential file organization is helpful when we have to access the whole batch . i.e Electricity bills.

DRAWBACKS OF SEQUENTIAL FILE ORGANIZATION:
1.Time loss
2.Searching is difficult in Sequential file Organization
3.If we try to insert a new data we have to reorganize the whole data.
4.If we are searching a data which is not present in the records. It will search the whole data then tell that the data is not present.

DIRECT FILE ORGANIZATION:

Example:


Hard Drive.

ADVANTAGES OF DIRECT FILE ORGANIZATION:

1.Time saving
2.Searching is easy in Direct file Organization

TYPES OF DIRECT FILE ORGANIZATION:

1.Indexed Sequential
2.Hashing


INDEXED SEQUENTIAL:
           
Indexed Sequential is same as Table of Content in books.
HASHING:
   Hashing is a function but not a specific function. We can made our hashing function.

TYPES OF HASHING FUNCTION:

1.Division method
2.Folding method

DIVISION FUNCTION:

x mod y return remainder. If remainder of two numbers are same then it is called hashing conflict.

SOLUTION OF HASHING CONFLICT:

Add 1 to the remainder.

FOLDING METHOD:

You can fold a number to find that in which track the given record should go.

FOR EXAMPLE:

Suppose a record with Student ID 8530 & you have to use folding method to tell that  which hard drive’s track will hold this record ?

  8      5        3       0

            8       5
      +    3      0
      --------------
           11     5   <------- This record will save in 5th 
     ---------------
track in hard drive!

THANK YOU... 🙂

22 Dec 2018

Assembly Language


DESCRIPTION: 

To Print a star Pattern in assembly we use Nested Loop such that ecx register controls the outer or parent loop and ebx register controls the nested or inner loop.

The provided code will ask for a user input. Such that it will ask the user to enter a number and the program will  print a star pattern according to user's entered number.

Complete Documentation => SOURCE CODE



******************************************************
If you find any query regarding the provided code then you are free to ask in the comment section.
THANK YOU ☺️

21 Dec 2018

IMPLEMENTATION OF VENN DIAGRAM :

The Venn Diagram: When Jon Venn first envisioned his new diagram’s future, he surely couldn’t have expected it to be popular more than a century after he created it. However, it has stood the test of time and has remained a popular diagram for showing correlations between different aspect of a subject or even different subjects entirely. Even in today’s modern world of 3D imaging and greatly advanced technology, the Venn Diagram has a firmly cemented place in many people’s daily life.

     The provided Code works on classes. And apply Polish notation Algorithms. (ie infix to postfix conversion + evaluation)

WORKING :

C# Visual Studio

This code will first convert the given Infix Expression to Postfix using STACK and then evaluate it to give the Shaded Region.

Kindly watch this VIDEO 👇 for better understanding , Hope this video helps you

This video credits belongs to respected owner
we don't own this video!
If you're the owner of this video and wan't us to remove just comment below thank you.



COMPLETE DOCUMENTATION => SOURCE CODE

You can also make the Diagram of your own choise. The only change you have to make is in the arrays behind the Calculate button.
C# Visual Studio
 ***************************************************
If you find any Query regarding the provided Code then you can ask in the comment section
Thank You 🙂


TIC TAC TOE in ASSEMBLY 8086 Processor

TIC TAC TOE :


Tic-Tac-Toe is a two-player game with two symbols denoting the two players: X and O. The playing board is a 3x3 square.
The rules are as follows:
  •  Each player takes a turn placing his character (X or O) into one of the nine squares.
  •  A player cannot place his symbol in a square that is already occupied by a symbol.
  •  The game ends when a player creates a winning combination of his symbols or when there are no empty squares remaining.
  •  Winning combination is defined as three horizontally adjacent, three vertically adjacent, or three diagonally adjacent symbols
  •   If neither player creates a winning combination when all nine squares are occupied, the game is a draw, often referred to as a "cat game."

IMPLEMENTATION :

Implementation of TIC TAC TOE in Assembly is a little bit harder than other Programming Languages.The provided code will work in Three Levels :
  • Easy  ( 3x3)
    TIC TAC TOE in ASSEMBLY 8086 Processor


  • Medium (4x4)
    TIC TAC TOE in ASSEMBLY 8086 Processor


  • Hard (5x5)
    TIC TAC TOE in ASSEMBLY 8086 Processor
Such that the number of Rows and Columns increases with the increase of Level.


COMPLETE DOCUMENTATION = > SOURCE CODE
*****************************************************
If you find any query regarding this code.then you are free to ask in the comment section

22 Sep 2018

Addition + Subtraction + Multiplication + Division In Assembly Language x86

equation code in assembly language processor x86

Welcome back,
Before we are start I want to tell you we are using Irvine Libraries and 86x processor to perform such operations as mentioned above !

Things which are discussed below in this content are listed below:

  • Addition in assembly language x86 => 8086
  • Subtraction in assembly language x86 => 8086
  • Multiplication in assembly language x86 => 8086
  • Division in assembly language x86 => 8086
I'm using Irvine Library on visual studio 2010 Professional to run assembler to execute my code!
If you want to setup this platform visit => VS 2010 Pro + Irvine Lib FULL !

FOR BETTER UNDERSTANDING:

"Processor has only register in use i.e. eax which is use to display so u may   hold data in other registers but make sure to place your final result in the eax register to make your program error free, this whole game of assembly is passing values to the free register and right register where eax is accumulator"

Addition in assembly language code:

Suppose value is: 8+2 => 10 
Addition in assembly language code

Subtraction in assembly language code:

Suppose value is: 8-2 => 10
Subtraction in assembly language code

Multiplication in assembly language code:

Suppose value is: 8*2 => 10
multiplication in assembly language code

Division in assembly language code:

Addition + Multiplication and Division Together, Focus "PASSING VALUES"

Suppose equation is: (3*4) + (6/2) + (5*2) = 25 

mov 3 to eax and mov 4 to ebx and use mul ebx to put 12 in eax
now mov eax to ecx as shown in code !
mov 6 to eax and mov 2 to ebx and div ebx to put answer in eax
now use add ecx,eax means answer of 3 * 4 + 6 / 2 is in ecx register
eax is free now put 5 in eax and 2 in ebx again !
again use mul ebx and add eax which is 5 * 2 = 10 into ecx to get your answer which is 25 !
division in assembly language code