Posts

Showing posts from August, 2020

DBMS Chap 1

Image
Explain advantages (benefits) of DBMS over file management  system. OR Explain purpose of database system. Minimal Data Redundancy (Duplication)    Due to centralized database, it is possible to avoid unnecessary duplication of  information.  This leads to reduce data redundancy.  It prevents memory wastage and reduces extra processing time to get required data. Shared Data  All authorized user and application program can share database easily. Data Consistency  Data inconsistency occurs due to data redundancy.  With reduced data redundancy such type of data inconsistency can be eliminated.  This results in improved data consistency. Data Access  DBMS utilizes a variety of techniques to retrieve data.   Required data can be retrieved by providing appropriate query to the DBMS.  Thus, data can be accessed in convenient and efficient manner. Data Integrity  Data in database must be correct and consistent.  So, data stored in database must satisfy certain types of constraints

Linked list

  //linked list #include <stdio.h> struct node {   int data;   struct node *link; }; struct node *root; void main() {   int a,x;   while ( 1 ) {     printf ( "\n1:add\n" );   printf ( " 2 :display\n" );   printf ( " 3 :delete\n" );   printf ( " 4 :length\n" );   printf ( " 5 :exit\n" );   scanf ( "%d" ,&a);     switch (a)   {     case 1 :add();            break ;     case 2 : display();             break ;     case 3 : delete();             break ;     case 4 : x=length();             printf ( "length=%d\n" ,x);             break ;    case 5 : exit( 1 );     default : printf ( "Invalid Input\n" );       }} } void add() { int b;   struct node *temp;     temp=( struct node*) malloc ( sizeof ( struct node));   printf ( "enter data \n" );   scanf ( "%d" ,&temp->data); temp->link=NULL;     printf ( "where