Paid ACE IT eBOOK 2019 [hindibanker.blogspot.com].pdf

Full Transcript

1 |Pa ge CAREER POWER | PREMIER INSTITUTE FOR ALL GOVT. COMPETITIVE EXAMS Email : [email protected] | website: www.careerpower.in CONTENTS 1 Software & Hardware..............................

1 |Pa ge CAREER POWER | PREMIER INSTITUTE FOR ALL GOVT. COMPETITIVE EXAMS Email : [email protected] | website: www.careerpower.in CONTENTS 1 Software & Hardware........................................................................................................................................................... 6 1. Introduction.................................................................................................................................................. 6 2. Software......................................................................................................................................................... 8 3. Hardware.................................................................................................................................................... 10 4. Basics of Memory....................................................................................................................................... 13 5. Ports............................................................................................................................................................. 14 6. Types of Computer..................................................................................................................................... 14 PRACTICE SET...................................................................................................................................................................... 16 SOLUTIONS........................................................................................................................................................................... 19 2 DBMS................................................................................................................................................................................... 20 1. Introduction................................................................................................................................................ 20 2. Database Architecture................................................................................................................................ 23 3. Entity-Relationship Model......................................................................................................................... 24 4. Relational Database Management System................................................................................................ 31 5. Normalization............................................................................................................................................. 34 6. Structured Query Language...................................................................................................................... 43 7. Beyond MySQL........................................................................................................................................... 57 8. Transaction Control.................................................................................................................................... 59 9. Deadlock Handling.................................................................................................................................... 64 PRACTICE SET...................................................................................................................................................................... 65 SOLUTIONS........................................................................................................................................................................... 69 3 DATA WAREHOUSING & DATAMINING..................................................................................................................... 70 1. Data warehousing:..................................................................................................................................... 70 2. Data Mining:............................................................................................................................................... 74 PRACTICE SET...................................................................................................................................................................... 75 SOLUTIONS........................................................................................................................................................................... 78 4 OPERATING SYSTEM........................................................................................................................................................ 80 1. Introduction................................................................................................................................................ 80 2. Process Management:................................................................................................................................. 84 3. Memory Management:............................................................................................................................. 103 4. File System:............................................................................................................................................... 106 5. INPUT- OUTPUT system......................................................................................................................... 108 6. Directory system/structures:................................................................................................................... 109 7. Short Introduction of UNIX operating system:...................................................................................... 109 2 |Pa ge CAREER POWER | PREMIER INSTITUTE FOR ALL GOVT. COMPETITIVE EXAMS Email : [email protected] | website: www.careerpower.in PRACTICE SET.................................................................................................................................................................... 110 SOLUTIONS......................................................................................................................................................................... 114 5 Networking........................................................................................................................................................................ 115 1. Networking............................................................................................................................................... 115 2. Data Communication:.............................................................................................................................. 118 3. Networking Devices:................................................................................................................................ 122 4. Networking Switching:............................................................................................................................ 123 5. Network Models:...................................................................................................................................... 123 6. Internet...................................................................................................................................................... 132 7. Some Important Networking Protocol................................................................................................... 133 PRACTICE SET.................................................................................................................................................................... 137 SOLUTIONS......................................................................................................................................................................... 140 6. Information Security........................................................................................................................................................ 141 1. Introduction.............................................................................................................................................. 141 2. Security Threats and Malwares............................................................................................................... 143 3. Botnets....................................................................................................................................................... 145 4. Authentication and Authorization.......................................................................................................... 146 5. Cryptography........................................................................................................................................... 146 6. Firewall...................................................................................................................................................... 150 7. Proxies....................................................................................................................................................... 152 8. Antivirus Software................................................................................................................................... 152 9. Intrusion Detection System (IDS)............................................................................................................ 153 10. Vulnerability Scanners......................................................................................................................... 153 PRACTICE SET.................................................................................................................................................................... 154 SOLUTIONS......................................................................................................................................................................... 158 7 Web Technology................................................................................................................................................................ 159 1. Introduction.............................................................................................................................................. 159 2. Scripting and Markup Languages........................................................................................................... 159 3. HTML........................................................................................................................................................ 159 4. XML........................................................................................................................................................... 169 5. Proxy.......................................................................................................................................................... 172 6. Common Gateway Interface (CGI)......................................................................................................... 173 PRACTICE SET.................................................................................................................................................................... 176 SOLUTIONS......................................................................................................................................................................... 179 8 Computer Organization & Microprocessor.................................................................................................................. 180 1. Number System........................................................................................................................................ 180 2. General Register Organization................................................................................................................ 195 3 |Pa ge CAREER POWER | PREMIER INSTITUTE FOR ALL GOVT. COMPETITIVE EXAMS Email : [email protected] | website: www.careerpower.in 3. Micro programmed Control.................................................................................................................... 196 4. Instruction Pipeline.................................................................................................................................. 198 5. Memory Organization.............................................................................................................................. 198 6. Microprocessor Architecture................................................................................................................... 207 7. Microprocessor Bus Organisation........................................................................................................... 210 8. Digital to Analog Converters................................................................................................................... 210 9. Boolean Algebra and Logic Gates........................................................................................................... 212 10. Combinational Logic Design............................................................................................................... 219 11. Flip Flop................................................................................................................................................. 224 12. Sequential Logic Design....................................................................................................................... 233 13. Ring Counter......................................................................................................................................... 235 PRACTICE SET.................................................................................................................................................................... 236 SOLUTIONS......................................................................................................................................................................... 239 9 Data Structure.................................................................................................................................................................... 240 1. Introduction.............................................................................................................................................. 240 2. Asymptotic Notation................................................................................................................................ 240 3. Arrays & Stack.......................................................................................................................................... 242 4. Queue........................................................................................................................................................ 246 5. Binary Trees.............................................................................................................................................. 249 6. Graph......................................................................................................................................................... 256 7. Sorting....................................................................................................................................................... 258 8. Hashing..................................................................................................................................................... 266 PRACTICE SET.................................................................................................................................................................... 268 SOLUTIONS......................................................................................................................................................................... 271 10 Software Engineering...................................................................................................................................................... 272 1. Introduction.............................................................................................................................................. 272 2. Software Process Models......................................................................................................................... 273 3. Clean Room Software Engineering......................................................................................................... 275 4. Requirement Analysis and Modelling.................................................................................................... 276 5. Unified Modelling Language (UML)...................................................................................................... 277 6. User Interface Design............................................................................................................................... 279 7. Software Testing....................................................................................................................................... 280 8. Debugging................................................................................................................................................. 282 9. Error Seeding............................................................................................................................................ 282 10. Software Project Management............................................................................................................. 283 11. COCOMO.............................................................................................................................................. 284 4 |Pa ge CAREER POWER | PREMIER INSTITUTE FOR ALL GOVT. COMPETITIVE EXAMS Email : [email protected] | website: www.careerpower.in 12. Risk Management................................................................................................................................. 284 13. ISO 9000 Certification vs. SEI/CMM.................................................................................................. 285 14. Software Security.................................................................................................................................. 286 PRACTICE SET.................................................................................................................................................................... 287 SOLUTIONS......................................................................................................................................................................... 290 11 Programming Languages................................................................................................................................................ 291 1. Introduction.............................................................................................................................................. 291 2. C Language............................................................................................................................................... 293 3. Object Oriented Programming Concepts............................................................................................... 304 4. Java Basics................................................................................................................................................. 308 PRACTICE SET.................................................................................................................................................................... 315 SOLUTIONS......................................................................................................................................................................... 318 12 Practice Sets..................................................................................................................................................................... 320 Professional Knowledge Practice Set: 01.......................................................................................................... 320 Professional Knowledge Practice Set: 02.......................................................................................................... 325 Professional Knowledge Practice Set:03........................................................................................................... 330 Professional Knowledge Practice Set:04........................................................................................................... 337 Professional Knowledge Practice Set:05........................................................................................................... 343 Professional Knowledge Practice Set:06………………………………………………………………………………………………....349 Professional Knowledge Practice Set:07…………………………………………………………………………………………………354 Professional Knowledge Practice Set:08…………………………………………………………………………………………………360 Professional Knowledge Practice Set:09…………………………………………………………………………………...…………….366 Professional Knowledge Practice Set:10…………………………………………………………………………………………………372 ANNEX. 1............................................................................................................................................................................. 378 1. Compiler.................................................................................................................................................... 378 2. Interpreter................................................................................................................................................. 379 3. Loader and Linker.................................................................................................................................... 379 ANNEX. 2............................................................................................................................................................................. 380 ANNEX. 3............................................................................................................................................................................. 382 1. Oracle Grid Architecture.......................................................................................................................... 382 2. PL/SQL..................................................................................................................................................... 382 3. PL/SQL Triggers...................................................................................................................................... 383 4. Big Data..................................................................................................................................................... 384 5 |Pa ge CAREER POWER | PREMIER INSTITUTE FOR ALL GOVT. COMPETITIVE EXAMS Email : [email protected] | website: www.careerpower.in 1 Software & Hardware 1. Introduction Computer is an electronic machine which can perform arithmetic and logical operations according to the instructions given by the user. Modern computer is based on analytical engine developed by Charles Babbage. He is considered as father of modern computer. Basic architecture of electronic computer is given by Johan Von Neumann. According to this architecture computer consists of following components. 1. Memory System which stores input data and result before it is output on the screen 2. Input and Output System like Monitor and keyboard 3. CPU (Central processing Unit) with ALU (Arithmetic Logic Unit) and CU(Control Unit) Thus, we can say computer is a collection of different sub system. All the processing is done in CPU with the help of ALU and CU. Data in computer is represented by 0 and 1 known as binary form. Single 0 or 1 is known as bit and collection of eight bit is known as byte. Byte is a basic unit to represent data in computer Computer cannot work by its own, it works according to the instruction given by the user. Collection of instruction in proper sequence to perform some task is known as Software. Therefore, we can say that computer is made of basic components - 1) Hardware 2) Software There are different types of computer which has different speed, cost and application. like Micro Computer, mini Computer, Main Frame Computer and Super Computer. Micro Computer is slowest, cheapest and used in simple application. e.g. PC, Home Computer laptop. Super Computer is fastest, costliest and use in special application like Weather fore casting, scientific research etc. Computer can also be classified on the basis of their functions like 1) Analog Computer 2) Digital Computer Analog computer is generally used for measurement and Digital Computer is used for calculation. Most of the modern computers are Digital. Hardware :- Hardware components of the computer consist of all the electronic components and electromechanical devices that comprise the physical devices of computer. The hardware of computer is divided into four major parts:- 1) Central Processing unit(CPU):- It contain an arithmetic and logic unit for manipulating data, a number of registers for storing data, and control unit for fetching and executing instructions. 2) Memory:- It contains data and instruction before execution and after execution. It is call ed random access memory because CPU can access any location randomly without affecting the other location. 3) Input Output Processor(IOP):- It contain electronic circuit for communication and controlling the transfer of information and the outside devices like input output devices 4) Input Output devices:- They are used to give information to the computer and display output like keyboard, printer, visual display unit(VDU). Random Access Memory Central Processing Unit Input Output Input-Output Processor Device device Figure: Block Diagram Of Digital Computer 6 |Pa ge CAREER POWER | PREMIER INSTITUTE FOR ALL GOVT. COMPETITIVE EXAMS Email : [email protected] | website: www.careerpower.in Logic Gate: All the data in computer is present in binary form i.e. 0 and 1. All the computer components like RAM, ALU, CU and registered are made of Gates. There are different types of gates which perform different function e.g. AND gated, OR gate NOT Gate, etc. Therefore, we can say that logic gate are the main building blocks of digital computer. Memory System: All the devices which are used to store information in computer is called memory system. Data and instruction is stored in memory before processing i.e. is before going to the CPU. In computer we use different type of memory because some memory are volatile but fast but some are nonvolatile but slow. To maintain the efficiency of computer we use different type of memory. Following is the hierarchy. CPU Register Cache Memory Main Memory Secondary Memory Figure: Memory Hierarchy CPU Register: - They are small memory location which reside in CPU, they are fast and small. They are generally used to store data and instruction temporarily. Cache Memory: - It is a fast-used memory between main memory and CPU. It’s an electronic memory. It’s size is smaller than main memory. Main Memory: - It is also an electronic memory. All the programs before execution are loaded in main memory. Main memory consists of two parts a) RAM (Random Access Memory):- It is read and write memory. It consists of flip-flop. It is volatile memory. There are different type of Ram 1) SRAM 2) DRAM b) ROM (Read only Memory):- It is nonvolatile memory. It stores those programs which are essential to boot the program. It consists of combinational circuit. There are different types of ROM Like PROM,EPROM, EEPROM, Flash memory. Secondary Memory: - Secondary Memory is a permanent storage device. It is nonvolatile memory, which can store data when there is no power. The following table highlights the points that differentiate a hardware from a software. Hardware Software It is the physical component of a computer system. It is the programming language that makes hardware functional. It has the permanent shape and structure, which cannot be It can be modified and reused, as it has no permanent modified. shape and structure. The external agents such as dust, heat etc. can affect the The external agents such as dust, heat etc. cannot hardware (as it is tangible). affect (as it is not tangible). It works with binary code (i.e., 1’s to 0’s). It functions with the help of high level language like COBOL, BASIC, JAVA, etc. It takes in only machine language, i.e., lower level It takes in higher level language, easily readable by a language. human being. It is not affected by the computer bug or virus. It is affected by the computer bug or virus. It cannot be transferred from one place to other It can transfer from one place to other electronically. electronically. Duplicate copy of hardware cannot be created. A user can create copies of a software as many as he wishes. 7 |Pa ge CAREER POWER | PREMIER INSTITUTE FOR ALL GOVT. COMPETITIVE EXAMS Email : [email protected] | website: www.careerpower.in Basics of CPU(Central Processing Unit)-Central Processing Unit (CPU) performs all the arithmetic and logical calculations in a computer. The CPU is said to be the brain of the computer system. It reads and executes the program instructions, perform calculations and makes decisions. The CPU is responsible for storing and retrieving information on disks and other media. The CPU consists of Control Unit, Arithmetic and Logic Unit (ALU) and register set. Control Unit: The control unit issue control signals to perform specific operation and it directs the entire computer system to carry out stored program instructions Arithmetic and Logic Unit: The ALU is the ‘core’ of any processor. It executes all arithmetic operations (addition, subtraction, multiplication and division), logical operations (compare numbers, letters, special characters etc.) and comparison operators (equal to, less than, greater than etc.). Register Set: Register set is used to store immediate data during the execution of instruction. This area of processor consists of various registers. 2. Software As you know, the hardware devices need user instructions to function. A set of instructions which get a single outcome are called program. Many programs functioning together to do a task make a software. For example, a word-processing software enables the user to create, edit and save documents. A web browser enables the user to view and share web pages and multimedia files. There are two categories of software − System Software Application Software 2.1 System Software Software required to run the hardware parts of the computer and other application software are called system software. System software acts as interface between hardware and user applications. System software includes − Operating System Language Processor Device Drivers Operating system (OS) is the software program that manage software and hardware resources of computer. Operating system manages a computer’s basic functions like storing data in memory, retrieving files from storage devices, scheduling tasks based on priority, etc. Language Processor An important function of system software is to convert all user instructions into machine understandable language. When we talk about human and machine interactions, languages are of three types – Machine language − This language is nothing but a collection of 0s & 1s (binary digit) that the machines can understand. It is completely machine dependent. Assembly language − This language introduces a layer of abstraction by defining mnemonics. Mnemonics are English like words or symbols used to denote a collection of 0s&1s. Assembly level language is machine dependent. High level language − This language uses English like statements and is completely independent of machines and uses translator. Programs written in high level languages are easy to create, read and understand. It is also called source code. e.g.-Java, C++, Fortran, Pascal etc.. Language Translator- A language translator helps in converting programming language into machine language. There are three types of language translator− Assembler − Converts assembly level program into machine level program. Interpreter − Converts high level programs into machine level program line by line. 8 |Pa ge CAREER POWER | PREMIER INSTITUTE FOR ALL GOVT. COMPETITIVE EXAMS Email : [email protected] | website: www.careerpower.in Compiler − Converts high level programs into machine level programs at one go rather than line by line. Device Drivers System software that controls and monitors functioning of a specific device on computer is called device driver. Each device like printer, scanner, microphone, speaker, etc. that needs to be attached externally to the system has a specific driver associated with it. When you attach a new device, you need to install its driver so that the Operating System(OS) knows how it needs to be managed. 2.2 Application Software A software that performs a single task and nothing else is called application software. Application software are very specialized in their function and approach to solving a problem. It is also called the end-user programs. These programs do the real work for users. Here are some commonly used application software − Word processing Spreadsheet Presentation Database management Multimedia tools 2.3 Utility Software Utility software is system software designed to help analyze, configure, optimize or maintain a computer. Examples of utility software include − Antivirus software Disk management tools File management tools Compression tools Backup tools 2.4 Categorization of Software- Freeware Freeware is software that is distributed without demanding a fee for its usage. These programs are available either as fully functional software for an unlimited period. Ownership of any freeware is retained by its developer. The developer can change future releases from freeware to a paid product (freeware) if he wishes so. Also, a freeware is typically distributed without its source code. This is done to prevent any sort of modification by its users. Plus, the license with which a free program is distributed may permit the software to be freely copied but not sold. Crippleware Some software are offered as freeware – but with very limited features – or with the major feature missing. These are referred to as Crippleware. The ones that provides fully functional version has all the functions enabled and is mostly available either as a commercial program or as a shareware. In most cases, the free programs promote a commercial offering. Donationware Sometimes, freeware is distributed to users with a regular reminder or request to make a donation to the author or to some third-party such as a charity. In such cases, freeware is referred as a Donationware. Free Software Many computer users aren’t fully aware of this somewhat new and unrelated concept. Well, free software is software that gives a user freedom to run, copy, distribute, study, change and improve software. To be precise, free software is a matter of liberty, not price! It essentially means a user can freely use, modify, and distribute a program stipulated to one condition: any redistributed version of the software must be distributed with the original terms of free use, modification, and distribution (known as copyleft). And unlike freeware, free software may be distributed for a fee. 9 |Pa ge CAREER POWER | PREMIER INSTITUTE FOR ALL GOVT. COMPETITIVE EXAMS Email : [email protected] | website: www.careerpower.in Open Source The term ‘Open Source’ is very close to ‘free software’ but not identical to it. We say this because, the source code of an open-source software is readily available to users but under a copyright, and one is freely allowed to re-distribute the software. The concept of open-source program relies on the fact that a user can review a source-code for eliminating possible bugs in it. This is something that we do not observe in commercially developed and packaged programs. Programmers on the internet read and modify the source-code by eliminating the possible bugs. Thus, in this way programmers helps in providing more useful and bug-free product for everyone to use. Shareware Shareware is demonstration software that is distributed for free but for a specific evaluation period only, say, 15-30 days (Trialware). After the evaluation period the program gets expired and a user can no longer access the program. Only if you are interested in using the program further, the shareware provider may require you purchase a license for the software. Apart from this there are some other terms related with computer softwares: Adware Adware, better known as advertising software is software that automatically renders advertisements. Most of these advertisements appear in the form of annoying pop-ups. However, one can disable the ads by purchasing a registration key. It can even change your home page, default search or install a tool bar. Like freeware, Adware too is available for computer users at no cost. Bundleware Bundleware gets its name from people ‘bundling’ different programs into one single installation program. The one installation for bundleware installs the main program that you want along with some other programs that you do not want. Spyware Spyware goes a few steps further and surreptitiously installs another software on your computer. The spyware may contain a code that sends information about the user’s computer to the developer or to some other location whenever the user is connected to the Internet. This is done to display advertisements in the Web browser. Malware Typically referred as ‘Malicious Software’, Malware is any program with malafide intentions and which exploits data of a computer without its user’s consent. Once on a computer hard drive, it can hijack your browser and track the websites you visit – and cause even worse damage. In addition to this, it can hide itself deep within Windows and even reinstall itself after being removed completely, making it the most difficult program to be removed or cleaned. Virus, Trojans, etc. may all be considered as malware. Scareware Malware that is designed to trick users into downloading and buying non-functional or a dangerous software is referred to as Scareware or Rogue Software. How does it do this? Simple, it alarms scares a user by making him falsely believe that his computer is infected by potentially harmful viruses. Once downloaded and installed, the program displays false virus alerts and instructs him to buy the ‘full version’ to remove the infections (fictional). 3. Hardware Hardware refers to the physical elements of a computer. Examples of hardware in a computer are the keyboard, the monitor, the mouse and the central processing unit. A computer's hardware is comprised of many different parts, but perhaps the most important of these is the motherboard. The motherboard is made up of even more parts that power and control the computer. In contrast to software, hardware is a physical entity. Hardware and software are interconnected, without software, the hardware of a computer would have no function. 10 | P a g e CAREER POWER | PREMIER INSTITUTE FOR ALL GOVT. COMPETITIVE EXAMS Email : [email protected] | website: www.careerpower.in 3.1 Introduction to Peripheral A peripheral is a device that can be attached to the computer processor. Peripheral devices can be external, such as a mouse, keyboard, printer, monitor or scanner. Peripheral devices can also be internal, such as a CD-ROM drive, DVD-R drive or modem. Devices are usually classified as input and output devices. Input Devices A device that feeds data into a computer processor is called an input device. Examples of common input devices are: keyboards, mouse, joystick, microphone and scanner Output Devices Output can also appear in a variety of forms - text, video, graphics, and so on. A device that shows data from a computer processor is an output device. Examples of common output devices are: monitors, laser printers, ink jet printers, speakers and headphones Input Devices - A Keyboards consists of a set of keys representing the alphabet and numbers. The keys are usually laid out in QWERTY style which originates from typewriters. The pressing of a key results in the generation, within the keyboard, of an 8-bit binary word, representing the character on the pressed key. This binary pattern is usually in ASCII code. The ASCII code for the chosen character is sent out from the keyboard using serial data transmission. A Scanners is a digitizer as it converts graphics and text information into digital form. Modern scanners allow high resolution images to be scanned using high bit depths. This results in image files which are very large. The mouse, sometimes called a pointer, is a hand-operated input device used to manipulate objects on a computer screen. Whether the mouse uses a laser or ball, or is wired or wireless, a movement detected from the mouse sends instructions to the computer to move the cursor on the screen in order to interact with files, windows, and other software elements. Even though the mouse is a peripheral device that sits outside the main computer housing, Output Device-An output device is any peripheral that receives data from a computer, usually for display, projection, or physical reproduction. For example, the image shows an inkjet printer, an output device that can make a hard copy of any information shown on your monitor, which is another example of an output device. Following are some of the important output devices used in a computer. Monitors Graphic Plotter Printer 3.2 Monitors Monitors, commonly called as Visual Display Unit (VDU), are the main output device of a computer. It forms images from tiny dots, called pixels that are arranged in a rectangular form. The sharpness of the image depends upon the number of pixels. A pixel is the smallest unit of a digital image or graphic that can be displayed and represented on a digital display device. A pixel is represented by a dot or square on a computer monitor display screen. A pixel is the basic logical unit in digital graphics. Pixels are combined to form a complete image, video, text or any visible thing on a computer display. There are two kinds of viewing screen used for monitors. Cathode-Ray Tube (CRT) Flat-Panel Display Cathode-Ray Tube (CRT) Monitor The CRT display is made up of small picture elements called pixels. The smaller the pixels, the better the image clarity or resolution. It takes more than one illuminated pixel to form a whole character, such as the letter ‘e’ in the word help. Flat-Panel Display Monitor The flat-panel display refers to a class of video devices that have reduced volume, weight and power requirement in comparison to the CRT. You can hang them on walls or wear them on your wrists. Current uses of flat-panel display include calculators, video games, monitors, laptop computer, and graphics display. 11 | P a g e CAREER POWER | PREMIER INSTITUTE FOR ALL GOVT. COMPETITIVE EXAMS Email : [email protected] | website: www.careerpower.in The flat-panel display is divided into two categories - Emissive Displays − Emissive displays are devices that convert electrical energy into light. For example, plasma panel and LED (Light-Emitting Diodes). Non-Emissive Displays − Non-emissive displays use optical effects to convert sunlight or light from some other source into graphics patterns. For example, LCD (Liquid-Crystal Device). 3.3 Printers Printer is an output device, which is used to print information on paper. There are two types of printers − Impact Printers Non-Impact Printers Impact Printers Impact printers print the characters by striking them on the ribbon, which is then pressed on the paper. Characteristics of Impact Printers are the following − Very low consumable costs Very noisy Useful for bulk printing due to low cost There is physical contact with the paper to produce an image These printers are of two types − Character printers Line printers Character Printers Character printers are the printers which print one character at a time. These are further divided into two types: Dot Matrix Printer(DMP) Daisy Wheel Dot Matrix Printer In the market, one of the most popular printers is Dot Matrix Printer. These printers are popular because of their ease of printing and economical price. Dot matrix printers print one character at a time. It prints characters and images as a pattern of dots. Advantages Inexpensive Widely Used Other language characters can be printed Daisy Wheel Head is lying on a wheel and pins corresponding to characters are like petals of Daisy (flower) which is why it is called Daisy Wheel Printer. Advantages More reliable than DMP Better quality Fonts of character can be easily changed Line Printers Line printers are the printers which print one line at a time instead of one or more character at a time. Non-impact Printers Non-impact printers print the characters without using the ribbon. A non-impact printer uses electrostatic chemicals and ink-jet technologies. It can produce high quality of graphics. 12 | P a g e CAREER POWER | PREMIER INSTITUTE FOR ALL GOVT. COMPETITIVE EXAMS Email : [email protected] | website: www.careerpower.in These printers are of two types − Laser Printers Inkjet Printers Characteristics of Non-Impact Printers Faster than impact printers They are not noisy High quality Supports many fonts and different character size Laser Printers These are non-impact page printers. Laser printer uses laser beam on to photo-sensitive surface for printing. Advantages Very high speed Very high-quality output Good graphics quality Supports many fonts and different character size Inkjet Printers Inkjet printers are non-impact character printers based on a relatively new technology. They print characters by spraying small drops of ink onto paper. Inkjet printers produce high quality output with presentable features 4. Basics of Memory A memory is just like a human brain. It is used to store data and instructions. Computer memory is the storage space in the computer, where data is to be processed and instructions required for processing are stored. Memory is primarily of three types − Cache Memory Primary Memory/Main Memory Secondary Memory 4.1 Cache Memory Cache memory is a very high-speed semiconductor memory which can speed up the CPU. It acts as a buffer between the CPU and the main memory. It is used to hold those parts of data and program which are most frequently used by the CPU. The parts of data and programs are transferred from the disk to cache memory by the operating system, from where the CPU can access them. Advantages The advantages of cache memory are as follows − Cache memory is faster than main memory. It consumes less access time as compared to main memory. It stores the program that can be executed within a short period of time. It stores data for temporary use. Disadvantages The disadvantages of cache memory are as follows − Cache memory has limited capacity. It is very expensive. 4.2 Primary Memory (Main Memory) Primary memory holds only those data and instructions on which the computer is currently working. It has a limited capacity and data is lost when power is switched off. It is generally made up of semiconductor device. These memories are not as fast as registers. The data and instruction required to be processed resides in the main memory. It is divided into two subcategories RAM and ROM. 13 | P a g e CAREER POWER | PREMIER INSTITUTE FOR ALL GOVT. COMPETITIVE EXAMS Email : [email protected] | website: www.careerpower.in Characteristics of Main Memory These are semiconductor memories. It is known as the main memory. Usually volatile memory. Data is lost in case power is switched off. It is the working memory of the computer. Faster than secondary memories. A computer cannot run without the primary memory. 4.3 Secondary Memory This type of memory is also known as external memory or non-volatile. It is slower than the main memory. These are used for storing data/information permanently. CPU directly does not access these memories, instead they are accessed via input-output routines. The contents of secondary memories are first transferred to the main memory, and then the CPU can access it. For example, disk, CD-ROM, DVD, etc. Characteristics of Secondary Memory These are magnetic and optical memories. It is known as the backup memory. It is a non-volatile memory. Data is permanently stored even if power is switched off. It is used for storage of data in a computer. Computer may run without the secondary memory. Slower than primary memories. 5. Ports A connection point that acts as interface between the computer and external devices like mouse, printer, modem, etc. is called port. Ports are of two types − Internal port − It connects the motherboard to internal devices like hard disk drive, CD drive, internal modem, etc. External port − It connects the motherboard to external devices like modem, mouse, printer, flash drives, etc. Let us look at some of the most commonly used ports. Serial ports transmit data sequentially one bit at a time. So, they need only one wire to transmit 8 bits. However, it also makes them slower. Serial ports are usually 9-pin or 25-pin male connectors. They are also known as COM (communication) ports or RS323C ports. Parallel ports can send or receive 8 bits or 1 byte at a time. Parallel ports come in form of 25-pin female pins and are used to connect printer, scanner, external hard disk drive, etc. USB Port (USB) stands for Universal Serial Bus. It is the industry standard for short distance digital data connection. USB port is a standardized port to connect a variety of devices like printer, camera, keyboard, speaker, etc. PS/2 Port (PS-2) stands for Personal System/2. It is a female 6-pin port standard that connects to the male mini-DIN cable. PS/2 was introduced by IBM to connect mouse and keyboard to personal computers. This port is now mostly obsolete, though some systems compatible with IBM may have this port. Infrared port is a port that enables wireless exchange of data within a radius of 10m. Two devices that have infrared ports are placed facing each other so that beams of infrared lights can be used to share data. Bluetooth Port- Bluetooth is a telecommunication specification that facilitates wireless connection between phones, computers and other digital devices over short range wireless connection. Bluetooth port enables synchronization between Bluetooth-enabled devices. There are two types of Bluetooth ports − Incoming − It is used to receive connection from Bluetooth devices. Outgoing − It is used to request connection to other Bluetooth devices. 6. Types of Computer Computers are generally are of 3 types on basis of electronic signal the process. Analog Computers: 14 | P a g e CAREER POWER | PREMIER INSTITUTE FOR ALL GOVT. COMPETITIVE EXAMS Email : [email protected] | website: www.careerpower.in “An analog computer is a form of computer that uses the continuously-changeable aspects of physical fact such as electrical, mechanical, or hydraulic quantities to model the problem being solved.” They operate on inputs of varying voltage. Analog computers were widely used in scientific and industrial applications. They are constructed to perform specific task and … Example Tire pressure gauge, analog clock, thermometer Digital Computers A Digital Computer, as its name implies, works with digits to represent numerals, letters or other special symbols. Digital Computers operate on inputs which are ON-OFF type and its output is also in the form of ON-OFF signal. Normally, an ON is represented by a 1 and an OFF is represented by a 0 i.e. they process data in binary form. The results of digital computers are more accurate than the results of analog computers. Analog computers are faster than digital. Analog computers lack memory whereas digital computers store information. Hybrid Computers They exhibit features of both analog and digital computers. It has the speed of analog computer and the memory and accuracy of digital computer. Traditionally, the analog components of the computer handle complex mathematical computations. The digital components take care of logical and numerical operations in addition to serving as the controller for the system. Example is ECG used in hospitals to measure the heartbeat of the patient (ECG). Now let us see another classification based on configuration and size 6.1. Based on configuration and size Super computers A supercomputer is a computer with great speed and memory. This kind of computer can do jobs faster than any other computer of its generation. They are huge and faster than other computers Mainframe computers They are also referred as Big Iron. A mainframe computer is a very large computer capable of handling and processing very large amounts of data quickly. They are used by large institutions, such as government agencies and large corporations. Mainframes are not good at number-crunching or don't do scientific calculations. A Mainframe is not a Super-computer. Mainframe computers don’t have a beautiful user-interface like the PC at your home. Compared to a typical PC, mainframes commonly have hundreds to thousands of times as much data storage online, and can access it reasonably fast. Examples are: IBM 360, IBMzSeries, Unisys Dorado, Unisys Libra Mini Computers The term "minicomputer" developed in the 1960s to describe the smaller computers that became possible with the use of transistors and core memory technologies, minimal instructions sets and less expensive peripherals. Minicomputers were also known as midrange computers. They grew to have relatively high processing power and capacity. The decline of the minis happened due to the lower cost of microprocessor-based hardware. The result was that minicomputers and computer terminals were replaced by networked workstations, file servers and PCs in some installations. Micro Computers A microcomputer is a standard desktop computer used at a home and in business. Microcomputer is a computer with a microprocessor as its CPU. They are cheap, compact and can be easily accommodated on a study table. They have evolved a lot over time. We are well familiar with uses of microcomputers as surfing on net, sending and receiving e-mails, database management and much more. Examples: Laptops, Desktop Computer, Notebook, Tablet Computer, Smartphone, Palmtop 6.2. Based on functions Server- A computer that is dedicated to provide services to its clients. For example, file server is for sharing file resources and likewise there is database server Workstations serve usually one user only. 15 | P a g e CAREER POWER | PREMIER INSTITUTE FOR ALL GOVT. COMPETITIVE EXAMS Email : [email protected] | website: www.careerpower.in Information appliances are computers specially designed to perform a specific "user-friendly" function—such as playing music, photography. Typical examples are smartphones and personal digital assistants (PDAs). Embedded computers - An embedded system is a computer system with a dedicated function within a larger system. Since the embedded system is dedicated to specific tasks, design engineers can optimize it to reduce the size and cost of the product and increase the reliability and performance. Examples of embedded systems are digital watches, MP3 players, Traffic lights, video game consoles. 6.3. Based on area of application Special Purpose Computers Special-purpose computer is the one that is designed to perform a specific task. Most of the times their job is to solve one particular problem. They are also known as dedicated computers, because they are dedicated to perform a single task over and over again. General Purpose Computers General-purpose computer is the one that can work on different types of programs input to it and thus be used in countless applications. General purpose computers are designed to perform a wide variety of functions and operations. PRACTICE SET 1. Which of the following is not a computer bus? (b) Machine codes are in binary, mnemonic codes (a) data bus (b) timer bus are in shorthand English. (c) control bus (d) address bus (c) Machine codes are in shorthand English, (e) None of these mnemonic codes are in binary. 2. The technique of assigning a memory address to (d) Machine codes are in shorthand English, each I/O device in the SAM system is called: mnemonic codes are a high-level language. (a) wired I/O (b) I/O mapping (e) None of these (c) dedicated I/O (d) memory-mapped I/O 8. Which bus is bidirectional? (e) None of these (a) data bus (b) control bus 3. How many bits are used in the data bus? (c) address bus (d) multiplexed bus (a) 7 (b) 8 (e) None of these (c) 9 (d) 16 9. Parity is: (e) None of these (a) a byte stored in the FAT to indicated remaining 4. A port can be: slots (a) strictly for input (b) strictly for output (b) the optimal transmission speed of data over a (c) bidirectional (d) all the above CAT 5 cable (e) None of these (c) an extra bit stored with data in RAM that is 5. Which of the following is not a basic element used to check for errors when the data is read within the microprocessor? back (a) microcontroller (b) arithmetic-logic unit (d) the optimal transmission speed of data over a (ALU) CAT 5 cable (c) temporary register (d) accumulator (e) None of these (e) None of these 10. What does FDISK do? 6. When referring to instruction words, a mnemonic (a) performs low-level formatting of the hard drive is: (b) fixes bad sectors on the hard drive (a) a short abbreviation for the operand address (c) recovers lost clusters on the hard drive (b) a short abbreviation for the operation to be (d) creates partitions on the hard drive performed (e) None of these (c) a short abbreviation for the data word stored at 11. A string of eight 0s and 1s is called a: the operand address (a) megabyte. (b) byte. (d) short hand for machine language (c) kilobyte. (d) gigabyte. (e) None of these (e) None of these 7. What is the difference between mnemonic codes 12. The CPU and memory are located on the: and machine codes? (a) expansion board. (b) motherboard. (a) There is no difference. (c) storage device. (d) output device. (e) None of these 16 | P a g e CAREER POWER | PREMIER INSTITUTE FOR ALL GOVT. COMPETITIVE EXAMS Email : [email protected] | website: www.careerpower.in 13. Word processing, spreadsheet, and photo-editing 24. What tool is used to test serial and parallel ports? are examples of: (a) high volt probe (b) cable scanner (a) application software.(b ) system software. (c) loop backs (wrap plugs) (c) operating system software. (d) sniffer (e) None of the above (d) platform software. (e) None of these 25. From what location are the 1st computer 14. System software is the set of programs that enables instructions available on boot up? your computers hardware devices and (a) ROM BIOS (b) CPU ____________ software to work together. (c) boot.ini (d) CONFIG.SYS (a) management (b) processing (e) None of the above (c) utility (d) application 26. What could cause a fixed disk error? (e) None of these (a) No-CD installed (b) bad ram 15. The PC (personal computer) and the Apple (c) slow processor (d) Incorrect CMOS Macintosh are examples of two different: settings (a) platforms. (b) applications. (e) None of the above (c) programs. (d) storage devices. 27. Missing slot covers on a computer can cause? (e) None of these (a) over heat (b) power surges 16. ____________ are specially designed computers (c) EMI. (d) incomplete path for that perform complex calculations extremely ESD rapidly. (e) None of the above (a) Servers (b) Supercomputers 28. A hard disk is divided into tracks which are (c) Laptops (d) Mainframes further subdivided into: (e) None of these (a) clusters (b) sectors 17. The operating system is the most common type of (c) vectors (d) heads ____________ software. (e) None of the above (a) communication (b) application 29. Which part of the laser printer should NOT be (c) system (d) word-processing exposed to sunlight? software (a) Transfer corona assembly (e) None of these (b) PC drum (c) Primary corona wire 18. The chip, used in computers, is made of (d) Toner cartridge (e) None of the above (a) chromium (b) iron oxide 30. Resistance is measured in? (c) silica (d) silicon (a) Volts (b) Amps (e) None of these (c) Watts (d) Ohms 19. The following device allows the user to add (e) None of the above external components to a computer system 31. Program which is used to control system (a) Storage devices (b) Keyboards performance is classified as? (c) Portal system boards (d) Diskettes (a) experimental program (e) None of these (b) system program (c) specialized 20. All of the following are examples of storage program devices except (d) organized program (e) none of these (a) hard disk drives (b) printers 32. Examples of system programs includes (c)floppy disk drives (d)CD drives (a) operating system of computer (e) None of these (b) trace program (c) compiler 21. From what location are the 1st computer (d) all of above (e) none of these instructions available on boot up? 33. System programs which performs one simple task (a) ROM BIOS (b)CPU are classified as (c) boot.ini (d)CONFIG.SYS (a) utility programs (b) function program (e)None of the above (c) compiling program (d) inquiry program 22. Which one is the secondary memory device? (e) None of these (a)CPU (b)ALU 34. In microcomputers, operating system is usually (c)floppy disk (d)Mouse stored on (e)None of these (a) random access memory 23. If a memory chip is volatile, it will (b) read only memory (c) permanent memory ________________. (d) temporary memory (e) none of these (a) Explode if exposed to high temperatures 35. Software which controls general operations of (b) Lose it contents if current is turned off computer system is classified as (c)Be used for data storage only (a) dump programs (b) function system (d)Be used to both read and write data (c) operating system (d) inquiry system (e)None of these (e) none of these 17 | P a g e CAREER POWER | PREMIER INSTITUTE FOR ALL GOVT. COMPETITIVE EXAMS Email : [email protected] | website: www.careerpower.in 36. Which provides the fastest access to large video (b) For intel it is Intel Opteron 6200 Series and files? AMD Core i7 processor. (a) Optical drives (b) IDE hard drives (c) For intel it is Intel Core i5 and AMD Opteron (c) SCSI hard drives (d) EIDE hard drives 6200 Series processor. (e) None of the above (d) For intel it is Intel Core i7 and AMD Opteron 37. You install a second IDE hard drive, then boot to 5200 Series processor windows. But windows will not recognize it. What (e) None of these should you do next? 46. Which Type Of Socket Is Needed To Connect A (a) Reinstall windows (b) Run CHKDISK Dual Core Processor Of Intel? (c) Run defrag (a) Socket LPA 775 (b) Socket LGA 775 (d) Change the jumper setting to slave (c) Socket LGA 774 (d) All of the above (e) None of these (e) None of these 38. Which of the following is true? 47. What Is Cache Memory? What Is The Advantage If (a) DRAM is faster than SRAM A Processor With More Cache Memory You Are (b) DRAM and SRAM both are same with respect Using? to speed (a) Cache memory is the memory area between (c) SRAM is faster than DRAM RAM and SRAM. If cache memory decreases the (d) All are true speed of the system will also improved (e) None of these (b) Cache memory is the memory area between 39. Serial port enables data flow in: RAM and Processor. If cache memory decreases (a) One direction (b) Both directions the speed of the system will also improved (c) Doesn’t flow the data (c) Cache memory is the memory area between (d) All of the above (e) None of these RAM and Processor. If cache memory increases 40. Following cable provide immunity from electrical the speed of the system will also improved. interference: (d) None of these (a) UTP (b) Fiber Optic (e) All are true. (c) STP (d) Coaxial 48. What is true about DRAM? (e) None of these (a) Dynamic RAM stores data using a paired 41. A 168-pin DIMM package has ________ pins on transistor and capacitor for each bit of data. each side of the package (b) In DRAM Capacitors constantly leak electricity, (a) 84 pins (b) 64 pins which requires the memory controller to refresh (c) 32 pins (d)16 pins the DRAM several times a second to maintain the (e) None of these data. 42. What is true regarding parallel port? (c) DDR-SDRAM is a type of DRAM (a) A parallel port for connecting an external (d) All are true device. (e) None of these (b) On PCs parallel port uses a 25-pin connector 49. What is true about DDR2? (c) Parallel port uses parallel transmission of data (a) DDR2 is the successor to DDR RAM. (d) All are true (b) DDR2 incorporates several technological (e) None of these upgrades to computer system memory, as well as 43. What Is LGA? an enhanced data rate. (a) An LGA socket is the connection point for a (c) DDR 2 is capable of achieving twice the data central processing unit (CPU) to fit into a transfer rate of DDR-I memory because of its motherboard. higher clock speed. It operates at a lower voltage (b) The LGA stands for Land Grid Array. than DDR-I as well: 1.8 volts instead of 2.5. (c) The LGA stands for Land Graphic Array. (d) All of the above (d) Both (a) and (b) (e) None of these (e) None of these 50. What Is Full Name Of AMD? 44. What is Pentium IV? (a) Advanced Micro Devices. (a) It is a processor. (b) Advanced Memory Devices (b) In Pentium IV, the bus speed is 400 MHz (c) Advanced Multipurpose Devices (c) Pentium IV processor start at 512KB (d) Advanced Multitasking Devices (d) All of the above (e) None of these (e) None of these 51. Winchester drive is also called: 45. What Are The Latest Processor Of Intel And Amd? (a) Hard Disk Drive (b) Floppy Disk Drive (a) For intel it is Intel Core i7 and AMD Opteron (c) CD (d) DVD 6200 Series processor. (e) None of these 18 | P a g e CAREER POWER | PREMIER INSTITUTE FOR ALL GOVT. COMPETITIVE EXAMS Email : [email protected] | website: www.careerpower.in 52. Which of the following is NOT a type of 56. A semiconductor memory which allows the eraser motherboard expansion slot? of the information stored in it so that new (a) ISA (b) PCI information can be stored in it is referred as (c) AGP (d) ATX (a) EPROM (b) ROM (e) None of these (c) RAM (d) None of these 53. How much data will a high density (HD) floppy (e) SDRAM disk hold? 57. Index hole is related to? (a) 124 KB (b) 640 KB (a) Scanner (b) Floppy disk (c) 1.44 MB (d) 2.88MB (c) Printer (d) CPU (e) None of these (e) None of these 54. What does FDISK do? 58. In MSDOS, the primary hard disk drives has the (a) performs low-level formatting of the hard drive drive letter? (b) fixes bad sectors on the hard drive (a) a (b) b (c) recovers lost clusters on the hard drive (c) c (d) f (d) creates partitions on the hard drive (e) None of these (e) None of these 59. A special type of Batch file that run automatically 55. What is different between AT and ATX power at startup is? supplies? (a) Command.Com (b) Autoexec. Bat (a) They are identical except for their shape. (c) Config.Sys (d) Ansi.Sys (b) AT supplies use a single P1 power connector (e) None of these while ATX uses P8 and P9. 60. Which command displays directories as well as (c) AT supplies use P8 and P9 power connectors subdirectories also in MSDOS? while ATX uses a single P1 connector. (a) DIR/All (b) DIR/AN (d) AT power supplies run on 120V AC current (c) DIR/DS (d) DIR/S while ATX uses 220V AC (e) None of these (e) None of these SOLUTIONS 1. (b) 2. (d) 3. (b) 4. (c) 5. (a) 6. (b) 7. (b) 8. (a) 9. (c) 10. (d) 11. (b) 12. (b) 13. (a) 14. (d) 15. (a) 16. (b) 17. (c) 18. (d) 19. (c) 20. (b) 21. (a) 22. (c) 23. (b) 24. (c) 25. (a) 26. (d) 27. (a) 28. (b) 29. (b) 30. (d) 31. (b) 32. (d) 33. (a) 34. (b) 35. (c) 36. (c) 37. (d) 38. (c) 39. (b) 40. (b) 41. (a) 42. (d) 43. (d) 44. (d) 45. (a) 46. (b) 47. (c) 48. (d) 49. (d) 50. (a) 51. (a) 52. (d) 53. (c) 54. (d) 55. (c) 56. (a) 57. (b) 58. (c) 59. (b) 60. (d) 19 | P a g e CAREER POWER | PREMIER INSTITUTE FOR ALL GOVT. COMPETITIVE EXAMS Email : [email protected] | website: www.careerpower.in 2 DBMS 1. Introduction DBMS is one of the most important module for Specialist Officer (IT) Exam. As we’ve seen that the objective paper of Professional Knowledge (especially for Scale-I Officer) in IBPS Exam has many questions from Database and Networking Modules. Thus, aspirants should prepare DBMS thoroughly. The term DBMS stands for Data Base Management System. Now comes a question that what is DBMS? DBMS is the acronym of Data Base Management System. DBMS is a collection of interrelated data and a set of programs to access this data in a convenient and efficient way. It controls the organization, storage, retrieval, security and integrity of data in a database. A database management system (DBMS) is a computer software that manages databases, it may use any of a variety of database models, such as the Hierarchical DBMS, Network DBMS and Relational DBMS. The emergence of the first type of DBMS was between 1960's-70's; that was the Hierarchical DBMS. IBM had the first model, developed on IBM 360 and their (DBMS) was called IMS, originally it was written for the Apollo program. This type of DBMS was based on binary trees, where the shape was like a tree and relations were only limited between parent and child records. 1.1 Database Models A database model shows the logical structure of a database, including the relationships and constraints that determine how data can be stored and accessed. Hierarchical Database Model Hierarchical Database model is one of the oldest database models. In the hierarchical data model, records are linked with other superior records on which they are dependent and also on the records, which are dependent on them. A tree structure may establish one-to-many relationship. Parents can have many children exhibiting one to many relationships. The grandparents and children are the nodes or dependents of the root. In general, a root may have any number of dependents. A tree-structure diagram is the schema for a hierarchical database. Such a diagram consists of two basic components: 1. Boxes, which correspond to record types 2. Lines, which correspond to links Pros: ✓ The model allows easy addition and deletion of new information. ✓ Data at the top of the Hierarchy is very fast to access. ✓ It relates well to anything that works through a one to many relationships. Cons: Realtime requirements are of more sophisticated relationships which this model fails to cater. 20 | P a g e CAREER POWER | PREMIER INSTITUTE FOR ALL GOVT. COMPETITIVE EXAMS Email : [email protected] | website: www.careerpower.in The database can be very slow when searching for information on the lower entities. Many to many relationships are not supported. Network Database Model The Network Database model can be viewed as an upside-down tree where each member information is the branch linked to the owner, which is the bottom of the tree. The network database model was a progression from the hierarchical database model and was designed to solve some of that model's problems, specifically the lack of flexibility. It addresses the need to model more complex relationships such as the many-to-many relationship which hierarchical model could not deal with. The Network model replaces the hierarchical tree with a graph thus allowing more general connections among the nodes. The main difference of the network model from the hierarchical model, is its ability to handle many to many (N:N) relations. In other words, it allows a record to have more than one parent. Pros: ✓ In the network database terminology, a relationship is a set. Each set comprises of two types of records.- an owner record and a member record, ✓ In a network model an application can access an owner record and all the member records within a set. ✓ Network Model supports data independence to some level as it draws a clear line of demarcation between programs and the complex physical storage details. Cons: The insertion, deletion and updating operations of any record require large number of pointers adjustments. A change in structure demands a change in the application as well, which leads to lack of structural independence. Relational Database Model Relational data model is the primary data model, which is used widely around the world for data storage and processing. The relational database model was a huge leap forward from the network database model. Instead of relying on a parent-child or owner-member relationship, the relational model allows any file to be related to any other by means of a common field. Relational databases go hand-in-hand with the development of SQL. Structured Query Language is a standardized language for defining and manipulating data in a relational database. What are Tables in Relational Model? Relations are saved in the format of Tables. This format stores the relation among entities. A table has rows and columns, where rows represents records and columns represent the attributes. Following are some terms associated with relations: 21 | P a g e CAREER POWER | PREMIER INSTITUTE FOR ALL GOVT. COMPETITIVE EXAMS Email : [email protected] | website: www.careerpower.in 1. Tuple − A single row of a table, which contains a single record for that relation is called a tuple. 2. Relation instance − A finite set of tuples in the relational database system represents relation instance. Relation instances do not have duplicate tuples. 3. Relation schema − A relation schema describes the relation name (table name), attributes, and their names. 4. Relation key − Each row has one or more attributes, known as relation key, which can identify the row in the relation (table) uniquely. 5. Attribute domain − Every attribute has some pre-defined value scope, known as attribute domain. Object-Oriented Database Model Object Oriented Database Model (also referred to as object-oriented database management system or OODBMS), is a database management system (DBMS) that supports the modelling and creation of data as objects. This includes some kind of support for classes of objects and the inheritance of class properties and methods by subclasses and their objects. ODBMS were originally thought of to replace RDBMS because of their better fit with object-oriented programming languages. However, high switching cost, the inclusion of object-oriented features in RDBMS to make them ORDBMS, and the emergence of object-relational mappers (ORMs) have made RDBMS successfully defend their dominance in the data center for server-side persistence. Relational databases store data in tables that are two dimensional. The tables have rows and columns. Relational database tables are "normalized" so data is not repeated more often than necessary. With traditional databases, data manipulated by the application is transient and data in the database is persisted (Stored on a permanent storage device). In object databases, the application can manipulate both transient and persisted data. Entity-Relationship Database Model The Entity Relationship Data Model ensure that you get a precise understanding of the nature of the data and how it is used by the enterprise, you need to have a universal model for interaction that is non-technical and free of ambiguities and easy readable to both technical as well as non-technical members. This is implemented with use of the ER Diagrams. ER model is based on two concepts: Entities, defined as tables that hold specific information (data) Relationships, defined as the associations or interactions between entities What is Entity Relationship Diagram (ER-Diagram)? ER-Diagram is a pictorial representation of data that describes how data is communicated and related to each other. Any object, such as entities, attributes of an entity, sets of relationship and other attributes of relationship can be characterized with the help of the ER diagram. 1.2 Advantages of today's’ DBMS over earlier File Management System These are some important advantages of today’s DBMS: Reduced Data Redundancy and Inconsistency: This means with DBMS the chances of multiple file formats, duplication of information in different files got eliminated. Which means it reduced data duplication and with this the data could stay more consistent. Data Integrity: data integrity” refers to the accuracy and consistency of data stored in a database DBMS ensures data integrity by managing transactions through ACID test = atomicity, consistency, isolation, durability. While such integrity is absent in file management system. Sharing of Data: In DBMS, data can be shared by authorized users of the organization. The database administrator manages the data and gives rights to users to access the data. Control Over Concurrency: In a file-based system, if two users can access data simultaneously, it is possible that they will interfere with each other. For example, if both users attempt to perform update operation on the same record, then one may overwrite the values recorded by the other. Most database management systems have sub-systems to control the concurrency so that transactions are always recorded with accuracy. 22 | P a g e CAREER POWER | PREMIER INSTITUTE FOR ALL GOVT. COMPETITIVE EXAMS Email : [email protected] | website: www.careerpower.in Backup and Recovery Procedures: In a computer file-based system, the user creates the backup of data regularly to protect the valuable data from damage due to failures to the computer system or application program. It is very time consuming method, if amount of data is large. Most of the DBMSs provide the 'backup and recovery' sub-systems that automatically create the backup of data and restore data if required. Data Independence: The separation of data structure of database from the application program that uses the data is called data independence. In DBMS, you can easily change the structure of database without modifying the application program. 2. Database Architecture 2.1 Data Abstraction – View Levels The generalized architecture of DBMS is called ANSI/SPARC model. The architecture is divided into three levels: 1. External view or User view/View Level It is the highest level of data abstraction. This includes only those portions of database of concern to a user or Application program. Each user has a different external view and it is described by means of a scheme called external schema. 2. Conceptual view/Logical Level All the database entities and the relationship among them are included. One conceptual view represents the entire database called conceptual schema. 3. Internal view/Physical Level It is the lowest level of abstraction, closest to the physical storage method. It describes how the data is stored, what is the structure of data storage and the method of accessing these data. It is represented by internal schema. View Level …Defined by User 2.2 Instances and Schemas Schema can be defined as the design of a database. The overall description of the database is called the database schema. You can relate it as something like types and variables in programming languages. Thus, essentially Schema is the logical structure of the database. Just like the View Levels in Data Abstraction Schema is of 3 types: 1. Physical Schema: The design of a database at physical level is called physical schema, how the data stored in blocks of storage is described at this level. 2. Logical schema: Logical schema can be defined as the design of database at logical level. In this level, the programmers as well as the database administrator (DBA) work. At this level data can be described as certain types of data records which can be stored in the form of data structures. However, the internal details (such as implementation of data structure) will be remaining hidden at this level. 23 | P a g e CAREER POWER | PREMIER INSTITUTE FOR ALL GOVT. COMPETITIVE EXAMS Email : [email protected] | website: www.careerpower.in 3. View Schema View schema can be defined as the design of database at view level which generally describes end-user interaction with database systems. Physical Data Independence–the ability to modify the physical schema without changing the logical schema. Applications depend on the logical schema In general, the interfaces between the various levels and components should be well defined so that changes in some parts do not seriously influence others. What is an Instance? Databases change over time as information is inserted and deleted. The collection of information stored in the database at a particular moment is called an instance. 2.3 Database Languages A database system provides a data-definition language to specify the database schema and a data-manipulation language to express database queries and updates. 1. Data Definition Language: DDL is used for specifying the database schema. It contains commands to create tables, alter the structure, delete tables or rename tables. Examples of DDL commands in SQL: To create the database instance – CREATE To alter the structure of database – ALTER To drop database instances – DROP To delete tables in a database instance – TRUNCATE To rename database instances – RENAME 2. Data Manipulation Language: As the name specifies itself DML is used for accessing and manipulating data in a database. Examples of DML commands in SQL: To read records from table(s) – SELECT To insert records into the tables – INSERT Update the data in tables– UPDATE Delete all the records from the table – DELETE 3. Data Control Language: DCL is used for granting and revoking user access on a database – Examples of DCL commands in SQL: To grant access to user – GRANT To revoke access from user – REVOKE 3. Entity-Relationship Model What is an Entity? In a database, we would be grouping only related data together and storing them under one group name called Entity / Table. This helps in identifying which data is stored where and under what name. It reduces the time to search for a particular data in a whole database. Entities can be classified based on their strength. An entity is considered weak if its tables are existence dependent. Following are basic types of entities: 1. Strong Entity: Entities having its own attribute as primary keys are called strong entity. For example, EMPLOYE has EMPLOYE_ID as primary key. Hence it is a strong entity. 2. Weak Entity: Entities which cannot form their own attribute as primary key are known weak entities. These entities will derive their primary keys from the combination of its attribute and primary key from its mapping entity. The relationship between weak entity and strong entity set is called as Identifying Relationship. 3. Composite Entity: Entities participating in the many to many relationships are called composite entity. 24 | P a g e CAREER POWER | PREMIER INSTITUTE FOR ALL GOVT. COMPETITIVE EXAMS Email : [email protected] | website: www.careerpower.in The relationship between weak entity and strong entity set is called as Identifying Relationship. The line connecting strong entity set with the relationship is single whereas the line connecting weak entity set with the identifying relationship is double. A member of a strong entity set is called dominant entity and member of weak entity set is called as subordinate entity. A weak entity set does not have a primary key, but we need a means of distinguishing among all those entries in the entity set that depend on one particular strong entity set. The discriminator of a weak entity set is a set of attributes that allows this distinction be made. A weak entity set is represented by doubly outlined box and corresponding identifying relation by a doubly outlined diamond. It is also called as the Partial key of the entity set. Weak Entity Sets Weak Entity Set: An entity set whose members owe their existence to some entity in a strong entity set. entities are not of independent existence. each weak entity is associated with some entity of the owner entity set through a special relationship. weak entity set may not have a key attribute. Weak Entity set- Example We depict a weak entity set by double rectangles. We underline the discriminator of a weak entity set with a dashed line. For example: payment_number – discriminator of the payment entity set Primary key for payment – (loan_number, payment_number) Note: the primary key of the strong entity set is not explicitly stored with the weak entity set, since it is implicit in the identifying relationship. If loan_number were explicitly stored, payment could be made a strong entity, but then the relationship between payment and loan would be duplicated by an implicit relationship defined by the attribute loan_number common to payment and loan. 3.1 Attributes Each entity is described by a set of attributes/properties. Types of Attributes Simple Attributes: having atomic or indivisible values. example: Dept – a string Phone Number - an eight-digit number Composite Attributes: having several components in the value. example: Qualification with components (Degree Name, Year, University Name) Derived Attributes: Attribute value is dependent on some other attribute. example: Age depends on Date of Birth. So, age is a derived attribute. Single-valued: having only one value rather than a set of values. for instance, Place Of Birth - single string value. Multi-valued: having a set of values rather than a single value. for instance, Courses Enrolled attribute for student Email Address attribute for student Previous Degree attribute for student. Attributes can be: simple single-valued, simple multi-valued, composite single-valued or composite multi-valued. 3.2 E-R Diagram An ER diagram is a means of visualizing how the information a system produces is related. There are five main components of an ER Diagram: 1. Connecting lines, solid lines that connect attributes to show the relationships of entities in the diagram. 2. Entities: Represented by Rectangle Strong Entity: These shapes are independent from other entities, and are often called parent entities, since they will often have weak entities that depend on them. 25 | P a g e CAREER POWER | PREMIER INSTITUTE FOR ALL GOVT. COMPETITIVE EXAMS Email : [email protected] | website: www.careerpower.in Weak Entity: A weak entity is an entity that must defined by a foreign key relationship with another entity as it cannot be uniquely identified by its own attributes alone. 3. Relationship: connects two or more entities into an association/relationship - Diamond Here you can see: Employee Works in Department. EMPLOYE and Dept are Entity Types and WorksIn is the relationship represented with a diamond figure. A recursive relationship is one in which the same entity participates more than once in the relationship. For Example: Every manager is also an employee. So, manager is not a new entity, but just a subset of the instances of the entity EMPLOYEE. Recessive Relationship: EMPLOYE MANAGER Nikhil Anuj Sumita Nikhil Anuj Rahul Manages of This also a representation of - many cardinality. 3.3 Attributes-

Use Quizgecko on...
Browser
Browser