Skip to main content

Posts

Database/DBMS Interview Questions And Answers - Part III.

11) What Are The Three Types Of Users In DBMS? Answer: The three types of users in database are: END USER who uses the application. They are the one who puts data into the system into use in business. APPLICATION PROGRAMMER who develops the application program. They are the one who has more knowledge about the data and structure and can manipulate the data using their programs. DATABSE ADMINISTRATOR (DBA) are the super user of the system. They are the one who defines the schema, define security and integrity checks, define backup and recovery procedures and monitor the performance. 12) What Are The Disadvantages Of Database System? Answer: Some of disadvantages of database system are: A high-end processor need to be used in case of DBMS data processing, large memory is required to run the database application, because of which the project cost increases. DBMS can be used only for storing a huge amount of data it can’t be used for the simple and small applicatio...

Database/DBMS Interview Questions And Answers - Part 2.

6) What Is Parallel & Distributed Database? Differentiate Them. Answer: A Parallel database is a database that can do multiple tasks in parallel; allowing the database to make use of multiple CPU cores and multiple disks that are standard for modern database servers. However, all CPU cores can directly address all disks in a parallel database. A Distributed database is a database where data is distributed across multiple hosts. However, the CPUs of a given host can only directly address a subset of the disks, namely only those disks that are on that host. DIFFERENCES BETWEEN THE TWO ARE: In case of Parallel Database, Machines are close to each other (For Example Same Server Room Or Floor) where as in case of Distributed database, Machines are far from each other (For example In Different Countries or Continents) For parallel database, Machines are usually connected with dedicated high speed LAN's and switches, where as in case of Distributed database, Machines are...

Database/DBMS Interview Questions And Answers - Part I.

1) What Is A Database? Answer: A database is a logically coherent collection of data with some inherent meaning, representing some aspect of real world and which is designed, built and populated with data for a specific purpose. In Simple words, database can be your contact book in your mobile, your address book in your laptops. Simple example of database can be: Data collected, maintained and used in airline or railway reservation. 2) What Is DBMS & Database? Answer: DBMS Stands for "Database Management System". DBMS is a collection of programs that enables user to create and maintain a database. In other words, DBMS is a complex software system that is used to manage, store and manipulate data and metadata used to describe the data. The DBMS manages the interaction between the end user and the database.  The database and DBMS software together is called as Database system. 3) What Are The Advantages Of DBMS? Answer: Some of the advantages of DBM...

Keys In DBMS & Different Keys In DBMS - Explained In Detail With Example.

What is a Key? What are different types of Keys in a database? Answer: A key is nothing but an attribute or group of attributes. Attribute is a particular property, which describes the entity. Attributes are also called columns or fields in DBMS. Keys are used to establish and identify relation between tables. They also ensure that each record within a table can be uniquely identified by combination of one or more fields within a table. Different types of keys in database are primary key, secondary key, alternative key, super key, candidate key, compound or concatenated or composite key, foreign key, etc. What is a Primary Key? Answer: An attribute that can be used to identify a record uniquely is considered to be a Primary Key. For example, In the student table roll_no is the primary key because it can be used to identify unique record or unique student. What is a Secondary Key? Answer: An attribute that can be used to identify a group of records satisfying a give...

Sample C Program to Print any Print Statement without using Semicolon

# include <stdio.h> void main() {     if(printf("Hi.. Welcome to sanfoundry"))     {     } } OUTPUT: Hi.. Welcome to sanfoundry Sample C Program To Display Its Own Source Code As Its Output. # include <stdio.h> int main() {     FILE *fp;     char ch;     fp = fopen(__FILE__,"r");     do     {         ch = getc(fp);         putchar(ch);      }      while (ch != EOF);      fclose(fp);      return 0; } OUTPUT: #include int main() {     FILE *fp;     char ch;     fp = fopen(__FILE__,"r");     do     {         ch = getc(fp);         putchar(ch); ...

Sample C Program To Display Function Without Using The Main Function.

# include <stdio.h> #define decode(s,t,u,m,p,e,d) m##s##u##t #define begin decode(a,n,i,m,a,t,e) int begin() {     printf(" helloworld "); } OUTPUT: helloworld Sample C Program To Get IP Address. # include <stdio.h> #include <string.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/ioctl.h> #include <netinet/in.h> #include <net/if.h> #include <unistd.h> #include int main() {     int n;     struct ifreq ifr;     char array[] = "eth0";     n = socket(AF_INET, SOCK_DGRAM, 0);     //Type of address to retrieve - IPv4 IP address     ifr.ifr_addr.sa_family = AF_INET;      //Copy the interface name in the ifreq structure     strncpy(ifr.ifr_name , array , IFNAMSIZ - 1);     ioctl(n, SIOCGIFADDR, &ifr);     close(n);     //d...

Sample C Program To Illustrate The Concept Of Unions.

# include <stdio.h> void main() {     union number    {         int  n1;         float n2;     };     union number x;     printf("Enter the value of n1: ");     scanf("%d", &x.n1);     printf("Value of n1 = %d", x.n1);     printf("\nEnter the value of n2: ");     scanf("%f", &x.n2);     printf("Value of n2 = %f\n", x.n2); } OUTPUT: Enter the value of n1: 10 Value of n1 = 10 Enter the value of n2: 50 Value of n2 = 50.000000 Sample C Program To Find The Size Of A Union. # include <stdio.h> void main() {     union sample    {         int   m;         float n;         char  ch;  ...