Basic computer Engineering notes

15
Unit-5 Introduction of DBMS- a) Database - A database is an organized collection of data. b) Data -Distinct pieces of information, usually formatted in a special way. c) DBMS - A database is a collection of related files that are usually integrated, linke referenced to one another. Or A database management system (D!") is a software package designed to define, manipulat retrie#e and manage data in a database. "ome D!" e$amples include !y"%&, 'ostgre"%&, !icrosoft Access, "%& "er#er, ile!aker, Oracle, D!", dA"*, +lipper, and o$'ro. Student Class work ----------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------- Architecture of DBMS - he D!" architecture describes how data in the database is #iewed by the users. 1)E!E"#A$ $E%E$ &O /+A& - &ow data is 'iewed b( an indi'idual user *) C+#CE,!UA$ $E%E$ - &ow data is 'iewed b( a co unit( of users .)I#!E"#A$ $E%E$ - &ow data is /h(sicall( stored . Student Class work ----------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------- BCE Notes:Yatendra Kashyap(Asst.prof,CSE deptt.)

description

This is the 5th unit notes of BCE

Transcript of Basic computer Engineering notes

Unit-5Introduction of DBMS-a) Database - Adatabaseis an organized collection ofdata. b) Data - Distinct pieces of information, usuallyformattedin a special way.c) DBMS- A database is a collection of related files that are usually integrated, linked or cross-referenced to one another.OrA database management system (DBMS) is a software package designed to define, manipulate, retrieve and manage data in a database. Some DBMS examples include MySQL, PostgreSQL, Microsoft Access, SQL Server, FileMaker, Oracle, RDBMS, dBASE, Clipper, and FoxPro.Student Class work ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Architecture of DBMS- The DBMS architecture describes how data in the database is viewed by the users.1) EXTERNAL LEVEL /LOGICAL - How data is viewed by an individual user.2) CONCEPTUAL LEVEL - How data is viewed by a community of users.3) INTERNAL LEVEL - How data is physically stored.Student Class work ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------DATA MODELS

DATA MODEL

Record Based logical ModelPhysical Data Model

Object Based logical model

E-R ModelRelational

HierarchicalObject oriented Model

Network

1) Object based logical model-object based logical model describe the data at the conceptual and view level. It contains 30 such models like E-R model, binary model & object oriented model.a) E-R model-It stands for entity relationship model, it provide the overview of database through diagrammatically using the following symbols. Entity rectangle Attribute oval Relationship diamond Link lineStudent Class work ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------2) Record based logical Model- This model also describe the data at the conceptual & view level, in this the database is structured in fixed format of several records.a)Hierarchical model- In this model each entity have only one parent and can have n number of Childs that is 1to many.b)Network model To overcome the problem of hierarchical model ,network data model was developed and it has more than one parent and also have relationship.c)Relational Model In this data is organized in two dimensional table called relational.Student Class work ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------3) Physical data model- This explain the internal level of DBMS architecture that gives complete information about the data storage.Student Class work ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Data Dictionary- Indatabase management systems, afilethat defines the basic organization of adatabase. It contain meta-data i,e data of data. A data dictionary contains a list of all files in the database, the number ofrecordsin each file, and thenamesand types of eachfield. Most database management systems keep the data dictionary hidden fromusers to prevent them from accidentally destroying its contents.Student Class work ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------DBA- Data base administrator is responsible for the overall management & administration of the database.Student Class work ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------DML (Data Manipulation Language )- A data manipulation language (DML) is a family of computer languages including commands permitting users to manipulate data in a database. This manipulation involves inserting data into database tables, retrieving existing data, deleting data from existing tables and modifying existing data.Student Class work ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------DDL (Data Definition language) - Data Definition Language(DDL) statements are used to define the database structure or schema. Some examples: CREATE - to create objects in the database ALTER - alters the structure of the database DROP - delete objects from the database TRUNCATE - remove all records from a table, including all spaces allocated for the records are removedStudent Class work ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------DCL- Data Control Language(DCL) statements. Some examples: GRANT - gives user's access privileges to database. REVOKE - withdraw access privileges given with the GRANT command.Student Class work ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------TCL-Transaction Control(TCL) statements are used to manage the changes made by DML statements. It allows statements to be grouped together into logical transactions. COMMIT - save work done SAVEPOINT - identify a point in a transaction to which you can later roll back ROLLBACK - restore database to original since the last COMMIT SET TRANSACTION - Change transaction options like isolation level and what rollback segment to useStudent Class work ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

The Advantages of a DBMSImproved availability:One of the principle advantages of a DBMS is that the same information can be made available to different users.Minimized redundancy:The data in a DBMS is more concise because, as a general rule, the information in it appears just once. This reduces data redundancy, or in other words, the need to repeat the same data over and over again. Minimizing redundancy can therefore significantly reduce the cost of storing information on hard drives and other storage devices. In contrast, data fields are commonly repeated in multiple files when a file management system is used.Accuracy:Accurate, consistent, and up-to-date data is a sign of data integrity. DBMSs foster data integrity because updates and changes to the data only have to be made in one place. The chances of making a mistake are higher if you are required to change the same data in several different places than if you only have to make the change in one place.Program and file consistency:Using a database management system, file formats and system programs are standardized. This makes the data files easier to maintain because the same rules and guidelines apply across all types of data. The level of consistency across files and programs also makes it easier to manage data when multiple programmers are involved.User-friendly:Data is easier to access and manipulate with a DBMS than without it. In most cases, DBMSs also reduce the reliance of individual users on computer specialists to meet their data needs.Improved security:As stated earlier, DBMSs allow multiple users to access the same data resources. This capability is generally viewed as a benefit, but there are potential risks for the organization. Some sources of information should be protected or secured and only viewed by select individuals. Through the use of passwords, database management systems can be used to restrict data access to only those who should see it.The Disadvantages of a DBMSThere are basically two major downsides to using DBMSs. One of these is cost, and the other the threat to data security.Cost:Implementing a DBMS system can be expensive and time-consuming, especially in large organizations. Training requirements alone can be quite costly.Security:Even with safeguards in place, it may be possible for some unauthorized users to access the database. In general, database access is an all or nothing proposition. Once an unauthorized user gets into the database, they have access to all the files, not just a few. Depending on the nature of the data involved, these breaches in security can also pose a threat to individual privacy. Steps should also be taken to regularly make backup copies of the database files and store them because of the possibility of fires and earthquakes that might destroy the system.Student Class work ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Cloud Computing Cloud computingcan basically be defined as doing work on your local computer, but storing the data on a server at another location.OrCloud computing is a type of computing that relies onsharing computing resourcesrather than having local servers or personaldevicesto handle applications.In cloud computing, the wordcloud(also phrased as "the cloud") is used as a metaphor for "the Internet," so the phrasecloud computingmeans "a type of Internet-based computing," where different services -- such as servers, storage and applications -- are delivered to an organization's computers and devices through the Internet.Student Class work ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Cloud Infrastructure (models)-What is IaaS?

Infrastructure as a service (IaaS) means that you gain access to networked computer hardware. This can take the form of physical or virtual machines, which you can then utilise for your personal or business needs.Some management resource will generally be provided, such as firewalls, load balancers, IP addresses, but the operating systems and applications will be your responsibility to install and update. This gives a wide range of flexibility in what you can use your resources for, but does carry a management overhead for your business, in addition to cost for the amount of resource allocated and used.IaaS is widely available from a range of providers, including the likes ofAmazon,Memset,Google,Windowsand more. One tool which can make IaaS easier to manage is the development of templates for cloud services to provide a blueprint to build ready-to-use setups, and also to aid migration across different clouds.

Student Class work ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------What is PaaS?

Platform as a service (PaaS) goes further in supporting cloud computer users by including elements such as the operating system, database, web server and programming execution environment. In addition to the benefits of allow you to focus on your particular applications, it can also enable the cloud provider to manage and scale your resources automatically.So PaaS can allow you to focus more on the front end applications and services, rather than spending time in the backend on your operating system etc. Youll often find that PaaS is offered by the same IaaS providers, allowing you to potentially migrate if you want to reduce your workload.

Student Class work ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

What is SaaS?

Software as a service is the most suitable option when you want to focus on end users. You are buying access to cloud-based software for your business or customers to use, without the need to manage the infrastructure and platform it runs on.

Student Class work ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Types of cloud-Public CloudA public cloud is a cloud computing model in which services, such as applications and storage, are available for general use over the Internet. Public cloud services may be offered on a pay-per-usage mode or other purchasing models. An example of a public cloud is IBMs Blue Cloud.

PrivateCloudA private cloud is available for single organizations. These are the virtualized data center that operates within a firewall. Hybrid CloudA hybrid cloud is a mix of public and private clouds.Community CloudA community cloud is an infrastructure shared by several organizations which supports a specific community.Student Class work ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Advantages & Disadvantages of Clouds- Advantages- Less maintenance:Hardware, applications and bandwidth are managed by the provider. Continuous availability:Public cloud services are available wherever you are located. Scalability:Pay only for the applications and data storage you need. Elasticity:Private clouds can be scaled to meet your changing IT system demands Expert service:Expedients cloud computing services are continuously monitored and maintained by our onsite staff of expert data center technicians.Student Class work --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Disadvantages- More elasticity means less control:While public clouds are great for quickly scaling up and down your resources, companies that require complete and total control over their data and applications will need to avoid the public cloud. Not everything fits into the cloud:Depending on the cloud provider, you may face restrictions on available applications, operating systems, and infrastructure options. Complicating matters more is the simple fact that not all platforms can live in the cloud. To combat this, it is important to ensure that the cloud provider you choose also offers physical collocation services. Slow speeds.Uploading and downloading of large documents may take a long time. Limited features.If you use remote software thats provided by the storage service to manipulate and modify your data, it usually lacks the features of a program running locallyStudent Class work ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

BCE Notes:Yatendra Kashyap(Asst.prof,CSE deptt.)