Dev

Friday, 24 June 2016

Degree of homogeneity of DBMS

Degree of homogeneity of DBMS

If all servers (or individual local DBMSs) use identical software and all users (clients) use identical software, the DDBMS is called homogeneous; otherwise, it is called heterogeneous. Another factor related to the degree of homogeneity is the degree of local autonomy. If there is no provision for the local site to function as a stand-alone DBMS, then the system has no local autonomy. On the other hand, if direct access by local transactions to a server is permitted, the system has some degree of local autonomy. 

At one extreme of the autonomy spectrum, we have a DDBMS that "looks like" a centralized DBMS to the user. A single conceptual schema exists, and all access to the system is obtained through a site that is part of the DDBMS—which means that no local autonomy exists. At the other extreme we encounter a type of DDBMS called a federated DDBMS (or a multidatabase system). In such a system, each server is an independent and autonomous centralized DBMS that has its own local users, local transactions, and DBA and hence has a very high degree of local autonomy. The term federated database system (FDBS) is used when there is some global view or schema of the federation of databases that is shared by the applications. On the other hand, a multidatabase system does not have global schema and interactively constructs one as needed by the application. Both systems are hybrids between distributed and centralized systems and the distinction we made between them is not strictly followed. We will refer to them as FDBSs in a generic sense. 


In a heterogeneous FDBS, one server may be a relational DBMS, another a network DBMS, and a third an object or hierarchical DBMS; in such a case it is necessary to have a canonical system language and to include language translators to translate subqueries from the canonical language to the language of each server. 




Friday, 13 May 2016

Distribution Transparency

Distribution Transparency

 An important goal of a distributed system is to hide the fact that its processes and resources are physically distributed across multiple computers. A distributed system that is able to present itself to users and applications as if it were only a single computer system is said to be transparent. Let us first take a look at what kinds of transparency exist in distributed systems. After that we will address the more general question whether transparency is always required. Types of Transparency The concept of transparency can be applied to several aspects of a distributed system, the most important ones shown in Fig. below:
Figure: Different forms of transparency in a distributed system

Access transparency deals with hiding differences in data representation and the way that resources can be accessed by users. At a basic level, we wish to hide differences in machine architectures, but more important is that we reach agreement on how data is to be represented by different machines and operating systems. For example, a distributed system may have computer systems that run different operating systems, each having their own file-naming conventions. Differences in naming conventions, as well as how files can be manipulated, should all be hidden from users and applications.

An important group of transparency types has to do with the location of a re-source. Location transparency refers to the fact that users cannot tell where a re-source is physically located in the system. Naming plays an important role in achieving location transparency. In particular, location transparency can be achieved by assigning only logical names to resources, that is, names in which the location of a resource is not secretly encoded. An example of a such a name is the URL http://www.prenhall.com/index.html. which gives no clue about the location of Prentice Hall's main Web server. The URL also gives no clue as to whetherindex.html has always been at its current location or was recently moved there. Distributed systems in which resources can be moved without affecting how those resources can be accessed are said to provide migration transparency. Even stronger is the situation in which resources can be relocated while they are being accessed without the user or application noticing anything. In such cases, the sys-tem is said to support relocation transparency. An example of relocation transparency is when mobile users can continue to use their wireless laptops while moving from place to place without ever being (temporarily) disconnected.

As we shall see, replication plays a very important role in distributed systems. For example, resources may be replicated to increase availability or to improve performance by placing a copy close to the place where it is accessed. Replication transparency deals with hiding the fact that several copies of a resource exist. To hide replication from users, it is necessary that all replicas have the same name. Consequently, a system that supports replication transparency should generally support location transparency as well, because it would otherwise be impossible to refer to replicas at different locations.

Tuesday, 8 March 2016

Sample ER Diagrams


Fig: ER Diagram of car- insurance company
 ________________________________________________________________________________
Fig: ER Diagram for marks Database
 _________________________________________________________________________________
Fig: ER Diagram for Hospital
 _______________________________________________________________________________
Fig: ER Diagram for University

Monday, 11 January 2016

Tag libraries, Namespaces

Meaning of  Tag Libraries: 

In a Web application, a common design goal is to separate the display code from business logic. Java tag libraries are one solution to this problem. Tag libraries allow you to isolate business logic from the display code by creating a Tag class (which performs the business logic) and including an HTML-like tag in your JSP page. When the Web server encounters the tag within your JSP page, the Web server will call methods within the corresponding Java Tag class to produce the required HTML content.



Namespaces
Advantages
  • It helps us avoid real name clashes with other XML vocabularies.
  • Moreover, namespaces may be used, if XML documents will be distributed to others, when name collisions may really become an issue.

Disadvantages
  • Namespaces, increases the size of XML documents.
  • With namespaces, we need to be extra careful while writing applications (all our programming expressions, querying & creating the XML nodes must be namespace aware). This namespace-awareness overhead (effort to create, and maintain) should be incurred, only if an application requires it (i.e, if management of name collisions isreally needed).



Sunday, 10 January 2016

File Handling

File Handling concept in C#.

File handling simply deal with creating, reading, deleting and editing files. Website can handle local files. It can read from, and write to, a text file on the disk. The code can run on any server with file system privileges—and also a local development machine
There are some methods of File which is mostly used in Real application.
1.    Create :-In this mode New File will be created .If  File is Exist then It will be Overridden.
How to create a File using C# File class ?
In order to create a new File using C# File class , we can call Create method in the File class.
CSharp Code : File.Create("c:\\testFile.txt");

2.     Append :-  In Append mode Existing File will be open and contents will be written from Last .If File  is not Exist then new File will be created. Append mode is used Between two Files.

3.    Create New:-In this mode New File will be created, if File is already Exist then it will thrown Exception.

4.    Open:- In this Existing file will be opened if file  is not Exist then it will be thrown Exception. 

5.    OpenRead:- In this Opens the Existing File for Reading the Contents.

6.    Truncate:-In this  Existing File will be open and the Entire contents of the file will be removed.But if the file is not Exist then it will be thrown Exception.
 StreamReader Class:
§  Flush():- Flush function is used for immediately save the File contents from Buffer to Memory.
§  Close():-Close function is used for closing the file.If we do not write close() statement in our program then File will be always open mode ,then No other person will be used this File at that time. This is the reason for using close statement in  the File Program.
§  Read()- It is used for Reading the Value using File Stream.
§  Read-line():-It is used  for Read  the value  using File Stream in a File Line by Line.
§  Peek():- It returns next value but not use it.
§  Seek():- It is used for Read/Write a values at any positions in a file.
StreamWriter Class:
§  close()-->Close function is used for closing the file.
§  Flush():-Flush function is used for immediately save the File contents from Buffer to Memory.
§  Write():- It is used for writing a File using File stream class.


§  WriteLine():- It is used to write a File Line by Line using File stream.

How a Domain Name is translated to an IP Address?

How a Domain Name is translated to an IP Address?

DNS (Domain Name System) is what translate domain name (for eg. www.google.com) into an IP address that our browser can use (for eg. 173.194.35.148). Before the page is loaded, the DNS must be resolved so the browser can establish a TCP connection to make the HTTP request. The DNS Resolution process starts when the user types a URL address on the browser and hits Enter.

On the Internet, many communications programs deal only with IP addresses, yet allow their users to specify machines in terms of their host names (or alias host names). Or a program which already knows the IP address must determine the domain name for the network to which the machine is connected. Such programs must somehow convert the host names into IP addresses (or vice versa) behind the scenes. How do they achieve this translation between IP addresses and host names?

The mapping of host names to IP addresses is handled through a service called Domain Name Service (DNS). Rather than require individual machines, applications, or users to keep up with the constant changes in host names and IP addresses, a series of special DNS servers across the world (known as "name servers") keep track of the name/address information for all the computers on the Internet. Applications that need to determine an IP address from a host name (or vice versa) contact the local "name server" to supply this information.

For instance, if you use a web browser to check out the site "web.mit.edu", the program actually first contacts your local DNS machine to obtain the IP-address that matches the host name you provided; then the program uses that IP address to complete your request.

DNS is used much more frequently than is usually supposed: virtually every activity that moves information across the network (getting web documents, transferring files, sending or receiving electronic mail) relies on DNS.


Anonymous access and Windows Authentication

Authentication:

Authentication: Authentication is the process of determining the identity of a user based on the user’s credentials. The user’s credentials are usually in the form of user ID and password, which is checked against any credentials' store such as database. If the credentials provided by the user are valid, then the user is considered an authenticated user.
In ASP.NET there are different ways in which authentication is performed as discussed below:

   1)               Anonymous Access: There is no authentication performed and the user is treated as       anonymous user by IIS.

Sometimes it is necessary or possible to access any data from remote server or database without any authenticated person. If the data is easily accessible without any authentication (i.e username and password) that means the user accessing those data or file has an anonymous access. There is no difference between a user who is “anonymously authenticated” and an unauthenticated user. There can be many situations where anonymous authentication is useful.


    2)      Windows Authentication: Provides information on how to use Windows authentication in conjunction with Microsoft Internet Information Services (IIS) authentication to secure ASP.NET applications. This is the default authentication mode in ASP.NET and it is set in web.config file of the application.

Windows Authentication uses the security features of Windows clients and servers. Unlike Basic authentication, initially, it does not prompt users for a user name and password. The current Windows user information on the client computer is supplied by the web browser through a cryptographic exchange involving hashing with the Web server. If the authentication exchange initially fails to identify the user, the web browser will prompt the user for a Windows user account user name and password.

Windows authentication is generally used if the users accessing the application belong to same organization.
This authentication method uses Windows accounts for validating users' credentials. This type of authentication is very good for intranet Web sites where we know our users.