p. 1
eduproz institute of professional studies e-528-529 sector-7 dwarka new delhi-110075 nr ramphal chowk and sector 9 metro station ph 011-47350606 m 7838010301-04 www.eduproz.in educate anytime anywhere greetings for the day about eduproz we at eduproz started our voyage with a dream of making higher education available for everyone since its inception eduproz has been working as a stepping-stone for the students coming from varied backgrounds the best part is the classroom for distance learning or correspondence courses for both management mba and bba and information technology mca and bca streams are free of cost experienced faculty-members a state-of-the-art infrastructure and a congenial environment for learning are the few things that we offer to our students our panel of industrial experts coming from various industrial domains lead students not only to secure good marks in examination but also to get an edge over others in their professional lives our study materials are sufficient to keep students abreast of the present nuances of the industry in addition we give importance to regular tests and sessions to evaluate our students progress students can attend regular classes of distance learning mba bba mca and bca courses at eduproz without paying anything extra our centrally air-conditioned classrooms well-maintained library and wellequipped laboratory facilities provide a comfortable environment for learning honing specific skills is inevitable to get success in an interview keeping this in mind eduproz has a career counselling and career development cell where we help student to prepare for interviews our dedicated placement cell has been helping students to land in their dream jobs on completion of the course eduproz is strategically located in dwarka west delhi walking distance from dwarka sector 9 metro station and 4-minutes drive from the national highway students can easily come to our centre from anywhere delhi and neighbouring gurgaon haryana and avail of a quality-oriented education facility at apparently no extra cost why choose edu proz for distance learning · edu proz provides class room facilities free of cost eduproz institute of professional studies sector-7,dwarka 1
[close]
p. 2
eduproz institute of professional studies · · · · · · · · in eduproz class room teaching is conducted through experienced faculty class rooms are spacious fully air-conditioned ensuring comfortable ambience course free is not wearily expensive placement assistance and student counseling facilities edu proz unlike several other distance learning courses strives to help and motivate pupils to get high grades thus ensuring that they are well placed in life students are groomed and prepared to face interview boards mock tests unit tests and examinations are held to evaluate progress special care is taken in the personality development department have a good day karnataka state open university ksou was established on 1st june 1996 with the assent of h.e governor of karnataka as a full fledged university in the academic year 1996 vide government notification no/edi/uov/dated 12th february 1996 karnataka state open university act 1992 the act was promulgated with the object to incorporate an open university at the state level for the introduction and promotion of open university and distance education systems in the education pattern of the state and the country for the co-ordination and determination of standard of such systems keeping in view the educational needs of our country in general and state in particular the policies and programmes have been geared to cater to the needy karnataka state open university is a ugc recognised university of distance education council dec new delhi regular member of the association of indian universities aiu delhi permanent member of association of commonwealth universities acu london uk asian association of open universities aaou beijing china and also has association with commonwealth of learning col karnataka state open university is situated at the northwestern end of the manasagangotri campus mysore the campus which is about 5 kms from the city centre has a serene atmosphere ideally suited for academic pursuits the university houses at present the administrative office academic block lecture halls a well-equipped library guest house cottages a moderate canteen girls hostel and a few cottages providing limited accommodation to students coming to mysore for attending the contact programmes or term-end examinations eduproz institute of professional studies sector-7,dwarka 2
[close]
p. 3
eduproz institute of professional studies unit-1 data base management system introduction data base is a collection of raw facts and figure users which are arranged f in a proper manner so than an appropriate record can be maintain this proper arrangement is known as dbms in each and every cbms table ae maintained to recorded data data is always represented through relations there are various kind of relations can be established between the tables a table is a collection of related f information stored so that it is available to many users for different purpose the content of data base is obtain by combing data from all the difference source in an organization so that data available to all the users is redundant the data base fundament system is a major software component of data bade system capabilities of data base system 1 creation of files addition of data modification and deletion these are the important function of data base should perform 2 retrieval collection and deletion of data should be simple 3 the data should be shorted in form of table and in dense according to the user 4 various reports can be provided form system in a standardized way or in a specific way 5 mathematical functions can be performed and can be manipulated easily 6 there must be data integrity is db accuracy and consistency basic concept of dbms data data is a collection of meaning fact and figure expressed in a form user could understand it can be resources and processed for further usage information refined data is known as in formation any input that foes into process generate information process any method of reefing data is information data is to information is known as process data base a collection of related set of data along with necessary details is known as data base data base basics 1 data item or domains the term data item is used for data fields it is the smallest unit of data it is also called data elements and elementary item student name age cours eduproz institute of professional studies sector-7,dwarka 3
[close]
p. 4
eduproz institute of professional studies lalit mohit 19 20 bca bba in the above table values corresponding to the field name is known a data item for example lalit 19 bca 2 entity and attribute entity any object which can be describe or define is known as entity entity are ways related to the world all such items which have some relevant information to be strode is known as data base entity entity could be physical and non physical tangible or integrity for eg student employee etc attribute each entity has a set of particular properties that completely describe it in context of mini world model the entity properties are called its attributes which describe any object for eg an employee entity may have the attributes like name emp_id address date of birth etc 3 logical data and physical data the term logical data or structure refers to the way the programmer see it and physical sutured refers to the way the data are actually recorded on the storage media 4 schema and sub schema schema it is a logical data base desecration and is down as a chart of types of data that are used it gives name of entities and attribute and specific the relation ship between them the is a frame work in which data values can be fitted for eg information display system such as that give arrival and departure timing of flight at airport the schema will remain same but values are change time to time the entire format need to be change flight arrival departure no time time ac001z 9.00 10.30 ac017t 10.00 11.00 sub schema the term sub schema refers to the same view but the data item type and reward type which are used in a particular application or by particular user therefore many different sub schema can be derived from main schema a simple analysis distinguished between schema and sun schema may be that if the schema represented root map of delhi showing major historical site educational institute railways station airport etc a subschema could be similar map showing route each from railway station or form air port 5 data dictionary it hold detail information about the different structure and data type the different structure and data types the details of logical structure that are mapped into the differs form details of relationship between data item details o a all users privileges and access right and performance of recourses wit detail properties of dbms eduproz institute of professional studies sector-7,dwarka 4
[close]
p. 5
eduproz institute of professional studies 1 it should always be certain a data base about certain part or real world this mall part of real world repented in data base in sometimes call miniworld 2 data base should be logical data base contain persistence data a data base is a logical coherent collection of which dome inherent meaning once the data has been accepted by dbms it can subsequent be remove form the system only by some explicit request 3 data base should have some specific purpose it is design built and calculated we data a well define purpose as intended by group of users according to their users 4 database can be implemented in may available form it may be generated and maintained manually or it may be computerized charactersitics of dbms 1 data base system is self describe in nature data base has a complete definition or description of data base structure and constraints it does not depend on any external information for handling data it holds information such as strutted of each file the time and storage formats of each like and data item and various constraints on the data 2 program data independence this characteristic allow changing data store structured and operation without changing the logical structured of dbms 3 data abstraction the form of data i,e actually stored inside the database and presented to the different user are not the same a data model is used to hide storage details and present the user with the conceptual view of database 4 multiple view support it user may see different views of same database according to the interest of user no matter how the data is stored each user gets data in his own desire format 5 data sharing and multi-user transaction process a data base may have multiple users the dbms must therefore have co-currency control mechanic to ensure that the result of multi-user access is always correct element of data base management system 1 ddl data definition language dbms provide a facility known as ddl which can use to define the concept of schema it also give some details about how to implement this schema in physical device used to stored data this definition includes all the entity sets and their relation among the entity set the definition also including the constraints that have to be maintain including the constraint on that have to be maintain including the constraints on the values assign to different attributes in a same or different record these definition can be describe meta data about the data in the data base are expressed in ddl of dbms and maintain in a complied form the complied form of definition are known as data dictionary or system catalog 2 dmldata manipulation language dml is a language that access or manipulated as organized by appropriate data model data manipulation includes eduproz institute of professional studies sector-7,dwarka 5
[close]
p. 6
eduproz institute of professional studies retrieval of data insertion of data deletion or modification of exiting data base dml also support query language dml provides command to select and retrieved data form database command are liked update insert delete etc 3 dml pre compiler the convert dml statement in an application program to normal procedural call in the host language the precompiled must interact with query processor in order to generate the appropriate code 4 ddl compiler the convert s data definition statement into a set of table these table contains information related to data based and are in the form that can be used by other component of database management system 5 file manager it manages the allocation of space on disk storage and the data structure used to represent information stored in disk the file manager can be implemented using an interface to the exist file system proved the operating system to host computer or it can include a file sub system written specially for dbms 6 data base manager it is a program which provides the interface between the low level data stored in data base and the application program and queries submitted to the system one of the functions of data base manager is to convert the user query coming directly through the query processor or indirectly to the application program responsibilities of data base manager 1 interaction with manager the raw data is stored on the disk using file system which is unusually provided by a conventional operating system the data base manager transaction the various dml statements into low level file system commands the database manager is responsibility for the actual storage retrieval and updating of data 2 integrity enforcement the data values stored in data base must satisfied certain types of consistency types of consistency constraints all the validation and condition apply to database should be clearly defined 3 security enforcement each and every user of data base need not to have the access the entire database it is to have the access the entire database it i the job of database manager to enforce security requirements 4 backup and recovery a computer system like any other mechanical device is subject to failure there are verities of courses of such failure including disk crash power failure software errors in each of these causes it is the responsibility of database manager to detect such failure and restored the database as before 5 concurrency control when several user update database concurrently the consistency of data may no longer be preserved it is necessary for the system to control interaction among the concurrent users are achieving such a control is one of the responsibility of data base manager 6 query processor the data base user retrieve data by formulating a query in a data manipulating language provided by database the query processor is used to eduproz institute of professional studies sector-7,dwarka 6
[close]
p. 7
eduproz institute of professional studies interpretation online user query and converts it into an effective series of operation in base manager for execution the query processes the structure of relevant portion of data base and uses this information in modifying a query and preparing an optimal path to access the database 7 data base administrator the person having total control over the system is called dba the dba has three level of data base and in consultation with the overall user community sets up the definition of global view or conceptual view of data base it has following responsibility:· schema definition · storage structure and access method definition · schema and physical organization modification · granting of authorization for data access · integrity constraint specification data base user 1 data base administration the user is responsible for creating manipulating and authorizing access to the database they are also responsibility for co ordaining and monitoring its users a dba has complete control on every aspect of data base some time dba called super user 2 data base designer they are responsible for identifying the data to be stored and for selecting appropriated structure to represent and store this data 3 end users people who s job require access to database for query updating and generating report are end users they carry out their jobs either through application or by user program 4 system analyst system analyses determines the requirement of end users and develop specifications for transaction 5 application programmer ap implements specification and programs developed by the analyst so that the specification becomes operational 6 dbms system designer and implementation if somebody has to design and implement the dbms module and interface as software package to be subsequently used 7 tool developers tool are package of process used are not used very often but are very important for users at various level eduproz institute of professional studies sector-7,dwarka 7
[close]
p. 8
eduproz institute of professional studies 8 operators and maintenance personnel professional responsibility for actual execution and maintained of hardware and software are known as operation and maintenance personnel advantages of dbms 1 redundancy control centralized control of data be dba avoids unnecessary duplication of data and effectively reduces the total amount of data storage required controlling redundancy in data storage and independent and maintained efforts insure that information is not repeated many times at many places but stored in single copy which save cost and space and avoiding multiple updating in case a data item is need to be exchanged 2 access control dba uses security and authorization around restriction a dba has full control on who can use the data in what ways 3 persistent for program object and data structure the object stored in data base survive the termination of program execution and can later be retrieve the data remains in the data base even after it has been used many time by users 4 multi-user interface dbms provide multi user interface may be implemented in any of the programming language have compatibility with data base 5 complex relationship representation any amount of complexity in the relationship of given data item can be concisely represented by the database capability to retrieve and update data easily and effacingly 6 integrity constraint enforcement dbms have capability for defying ad enforcing constraint that must be satisfied by the data entering by the system and used by to process 7 backup and recovery a dbms is a subject to failure due to many reasons dbms provide facility for recovering from such software ad hardware failure 8 data sharing since data is stored a single copy many user can use the same without the need of having separate data for each user dbms provide such facility 9 standard enforcement a no of international standard may be enforced in the certain and operation of data base 10 flexibility to change data structure due to data abstraction data structure of data base can be modified without distrusting the data base users 11 reduced application development time the effort required to develop user utility reduces considerably and so does the time 12 availability of update information the data base always has latest state providing each user with the up to date information all the time disadvantages of dbms 1 cost the data base system is a combination of h/w and s/w and training intensive and calls for a large cost is not justified for a particular situation it is advisable to look for a cheaper alternative 2 dbms are very general in nature if the solution are required for a very specific purpose it is better to have non dbms system eduproz institute of professional studies sector-7,dwarka 8
[close]
p. 9
eduproz institute of professional studies 3 overhead on processor generally a lot of overhead is involved in a dbms many of these feature may not be required in a particular situation 4 in real time system where processing time critical it may not be suitable the time overhead may be un acceptable in such case theree views of data dbms is a collection of interrelated files and sets of program that allow several user to access and modify files major purpose of a data base system is to provide user with an abstraction view of data system hide certain details of how the data is stored and maintain since dbms system are often used system this is done by defining level be view there are logical view or external view or connectional view and internal or physical view 1 external view this is the highest level of abstraction as seen by a user this level of abstraction describe only the part of entire data base 2 conceptual view at his is the next higher level of abstraction which is the sum total of user view this level describe what data are actually stored in database in term of small number of relatively simple structure 3 internal view this lowest level of abstraction at which one describe how the data are physically stored the interrelationship of three level of abstraction is given internal view the view at each level is describing by a schema as mention earlier is an outline or a plan that describe the records ands relationship exiting in the view the schema also describe in the way in which entity one level of abstraction can be mapped to the next level of abstraction the overall data base design is called format their exist several schema in the data base these schema are:portioned into the following level of abstraction 1 at lower level we have physical schema 2 at intermediate level we have conceptual schema 3 at higher level we have several sub schema the general any data base contain one physical schema one conceptual sub schema several sub schemas 1 external level or sub-schema the external level is at the highest level of data base abstraction are concern to a user or application where any those person of data base are concern to a user or application programs are concern to a user or application program are included any number of user may exit for a given global or conceptual view 2 conceptual level schema at this level of data base abstraction all the data base entity and the relation ship among them them are included in conceptual view it describe all the record and relationship including in the concept view ad there fore in the database there is only one concept schema per data base this schema also eduproz institute of professional studies sector-7,dwarka 9
[close]
p. 10
eduproz institute of professional studies contains the method of driving object in the conceptual view from the object in the internal view 3 internal level or physical schema we find the view at the lowest level of abstraction it is used in physical storage it indicate how data will be stored and describe the data structure and access method to be used by data base the internal view is experience by internal schema which contain the definition of stored record the method of representing the data field and access method of representing the data field and access method to be used chapter-2 data model er model eduproz institute of professional studies sector-7,dwarka 10
[close]
p. 11
eduproz institute of professional studies entity relationship model is generalization of old hierarchal and network based approach it represent the relationship between various entities that is understandable very easily various component of er-model a entity it is a thing or any object physical exquisite eg car house and any person in the real world it may be object with a conceptual existence eg job university course etc b attribute each entity has asset of a particular property that complexly describe any entity in context of mini world each property is called attributes there are various types of attributes · simple each entity has as single atomic values for the attribute is known as simple attribute eg name of any student · composite attribute the attribute may be composed of several components eg address of any person include house no road no sector no city state and pin code address street city state pin code house no road no sector no · multi value attribute an entity may have multiple values for the attribute any attribute which can have more than one value for that attribute is known as multi valued attribute eg degree attribute of a student can contain bca mca mba c entity type and set an entity type defines a collection of entities that have the same attributes employee entity type and company entity type an entity is an instance of entity type all entity having the same set of properties are grouped into an entity type the collection of all entitles of a particular entity type in a data base in any point in time is called entity set d relationship eduproz institute of professional studies sector-7,dwarka 11
[close]
p. 12
eduproz institute of professional studies · · binary relationship if the association in b/w two entities then it is known as binary relationship ternary relationship it the relationship is b/w three or more entities then it is known as ternary relationship relationship between entity set 1 one to one in this relationship one instance of first entity is related to exactly one instance of second entity 2 one to many one instance of first entity is related to one or more instances of second entity 3 many to one one or more instance of first entity is related to exactly one instance of second entity 4 many to many many instances of first entity to many instances of second entity the overall logical structure of database can be expressed graphically by an er-diagram which is build up by following component component represents 1 2 3 4 rectangle ellipses diamond lines entity set entity attribute entity relationship link between entity characterisitics of er-model abstraction it is the simplification mechanism it is used to hide super flow details of set of object it allows one to consternate on the property that are interested in the application example car is an abstraction of personal vehicle but doesn t revel details about model year of manufacturing colors and so on there are two main abstraction mechanism used in:generalization it is an abstraction process of set of object as a single general characteristics of any specific entity while ignoring the basic details related to it is the union of no of lower level entities types for the purpose of producing a high level entity set eg student is generalization of graduate and undergraduate student can be part time or full time specialization it is an abstraction new characteristic of an existing class of object to create one or more new classes of object this involves taking a higher level entry and using additional characteristics generating by lower level entity the lower level entity also inherits the chrematistics of higher level entities specialization may be seen as reverse process of generalization the entity set employee is a generalization of full time emp and part time emp full time emp is again a generalization of faculty and staff where as part time emp is generalization of teaching and non-teaching emp the top down approach in the the diagram represent specialization and bottom up approach represent generalization eduproz institute of professional studies sector-7,dwarka 12
[close]
p. 13
eduproz institute of professional studies aggregations it is the process of compiling information on an object and there by abstracting higher level object example an entity person is derived by aggregating the charactisicts like name address phone no another form of aggregation is the abstraction between the object and relationship example enroll is the relationship between two entitles students and course this whole relationship may be viewed as entity person name address phone no herarichal model in the hierarchal database model data is organized in a hierarchal in a ordered tree structure and the database is a collection of disjoint tree list organization chart a hierarchal is a ordered tree and it is a easy to understand at the root of the tree their have none one or more then one child mode the mode of the tree represent the record type each tree efficiency representing a root record type it we define the root record type to be level zero then the level of its dependent record type can be defined as level-1 the dependence of record type at level are set to be level-2 and so on an occurrence of hierarchal tree type consist of one occurrence of root record type along with zero or more accuracy of its dependent sub tree each type dependent sub tree in true hierarchal and consist of record type as its root node the node having no child means that there is no dependent node on it is known as leaf node hierarchal mode represent a one to many relationship between two entities whose both the entity have child and parents advantages 1 simplicity:in this form data is easy to represent and understand 2 security:the data base system can enforce various degree of security feat users 3 database integrity because of inheritance feature the degree of integrity is high 4 efficiency:for one to many relationship type of database it is easy to maintain and manager all the sub entities and children disadvantages 1 complexity of implementation the actual implementation of hierarchal database depends upon the physical storage of data this makes implementation complicated 2 difficulty in management the movement of data segments from one location causes all excising program to be modified making database management a complex affair eduproz institute of professional studies sector-7,dwarka 13
[close]
p. 14
eduproz institute of professional studies 3 structural dependency the database has a rigidly defined relationship and hence any change in any part of the structure of database would access it this makes the maintained very difficult 4 complexity of programming programming at his kind of database is relatively complex because the programmers must know the physical path of data item 5 poor probability the database is not so portable because of their complex implementation network model network model was developing during 1980 by database task group a network database consists of collection of records connected to one another through links a relationship in this model is known as set a link is association between process b/w two records a link can be viewed as restricted binary form of relationship the structure of network database resemble closely with hierarchal the major difference between the two is that the hierarchal database each record can have only one parent but there can be more parent in the network database model therefore the relationship represent the hierarchal database is one to many but in network database it could be many to many name neha amit rohit street 86-trinagar a-1 rohini 45-s azadpur city delhi delhi delhi a/c no 5-56 5-52 5-51 balance 60000 50000 40000 advantages 1 simplicity since most of the database relationship instances are naturally many to many this database structure is simple to design 2 better relationship handling many to many relationship can accommodate most of the complex relationship existing in actual data relationship scenario 3 flexibility in data access data item can be navigated in more than one way providing much desired flexibility of data access 4 standards universal standard have been developed and enforce in these types of database disadvantages system complexity structural dependency since access depends upon the navigational path that exist in database at any time the programs are not independent of database structure and need to be modifying whenever database structure is modify eduproz institute of professional studies sector-7,dwarka 14
[close]
p. 15
eduproz institute of professional studies relational model relational model was introduced in 1970 by dr e i codd this data model was evolved using theoretical considerations based on relation calculus by being simple in principle and the sure can express their queries by using powerful query language in this model the relation is the only construct to represent the association among the attributes of any entity as well as the relationship among the different entity the one of the main reason for this introducing the model was too increase the productivity of the application program by eliminating the need of change of application program when change is made to database users need not to know the exact physical structure to use the database and protected any change made to these structure they are however still require to know how the data has been partition into various relation in this model the user need not to know the navigational path to data row of the relation are referred as topple and column are referred as attributes each attribute of a relation has a distinct name the values for a attribute or a column are drawn form a set of value know as domain a relationship between the two relation is represent as er model by combining primary key of entity involved in the relation and attribute a correspondence between the two relation is implied by data value of the attribute in he relation defined on common domain position po_id designation 301 manager 302 director 303 faculty 304 manger 305 faculty 306 manager employee emp name 101 neha 102 anju 103 amit 104 priya 105 rohit designation manager faculty director faculty manger in this example both employee and position contain identical name attributes designation defines on common domain consequently we join these two relations to form a new relation position eligibility using common values of attributes designation joining the two or three times taking the value two or there time position eligibilty emp_no pos_no 101 301 name neha designation manager eduproz institute of professional studies sector-7,dwarka 15
[close]