Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
100 views
Unit 5
Uploaded by
prisha
AI-enhanced title
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Unit-5 For Later
Download
Save
Save Unit-5 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
100 views
Unit 5
Uploaded by
prisha
AI-enhanced title
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Unit-5 For Later
Carousel Previous
Carousel Next
Save
Save Unit-5 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 12
Search
Fullscreen
Database Management System (DBMS) In the database-oriented approach of organising data, a set of programmes is provided to facilitate the users in organising, creating, deleting, updating, and manipulating their data in a database. All these programmes together form a Database Management System (DBMS). Data Models + A model is a representation of reality, ‘real world’ objects and events, and their associations. It is an abstraction that concentrates on the essential, inherent aspects of an organisation and ignore the accidental properties. ‘+ A data model represents the organisation itself. Let should provide the basic concepts and notations that will allow database designers and end users unambiguously and accurately to communicate their understanding of the organisational data. Data model can be defined as an integrated collection of concepts for describing and manipulating data, relationships between data, and constraints on the data in an organisation. A Data Model Comprises of Three Components 1. A structural part, consisting of a set of rules according to which databases can be constructed. 2.A manipulative part, defining the types of operation that are allowed on the data (this includes the operations that are used or updating or retrieving data from the database and for changing the structure of the database). 3. Possibly a set of integrity rules, which ensures that the data is accurate. + The purpose of a data model is to represent data and to make the data understandable. * There have been many data models proposed in the literature They fall into three broad categories : (i) Object Based Data Models (ii) Physical Data Models (iii) Record Based Data Models ‘The object based and reen:d based data models are used to describe data at the couceptual and external levels, the physical data model is used to describe data at the internal level. Database Languages + A DBMS is a software package that carries out many different tasks including the provision of facilities to enable the user to access and modify information in the database. + The database is an intermediate link between the physical database, computer and the operating system end the users. To provide the various facilities to different types «f users, a DBMS normally provides one or more specialised programming languages called database languages. Forms of Database Languages 1. Data Description Language (DDL) As the name suggests, this language is used to define the EA Scanned with CamScannerse and their various types of data in the datab: relationship with each other. The Basic Functions Performed by DDL are + Create tables, files, databases and data dictionaries. ‘« Specify the storage structure of each table on disk. « Integrity constraints on various tables. Security and authorization information of each table. « Specify the structure of each table. + Overall design of the database. 2, Data Manipulation Language (DML) A language that enables users to access or manipulate data (retrieve, insert, update, delete) as organised by a certain data model is called the Data Manipulation Language (DML). It can be of two types () Procedural DML It describes what data is needed and how to get it. eg., relational algebra, (ii) Non Procedural DML It describes what data is needed without specifying how to get it. eg, relational calculus. Functions of DBMS « DBMS free the programmers from the need to worry about the organisation and location of the: data ie. it shields the users from complex hardware level details. DBMS can organise process and present data ‘elements from the database. This capability enables decision makers to search and query database contents in order to extract answers that are not available in regular reports. Programming is speeded up because programmer ‘can concentrate on logic of the application. It includes special user friendly query languages which are easy to understand by non pro-gramming users of the system. ‘The various common examples of DBMS are Oracle, Access, SQL Server, Sybase, FoxPro, Dbase ete. The Service Provided by the DBMS Includes ¢ Authorization services like log on to the DBMS, start the database, stop the database etc. Self Study Guide for BCA Entrances ‘Transaction supports like recovery, rollback ete. ta, Import and export of da Maintaining data dictionary. User's monitoring. Advantages of DBMS ‘The DBMS (Database Management System) is preferred ever the conventional file processing system due to the following advantages L Controlling Data Redundancy In the conventional file processing system, every user group maintains its own files for handling its data files. This may lead to « Duplication of same data in different files. « Wastage of storage space, since duplicated data is stored. Errors may be generated due to updation of the same data in different files. + Time in entering data again and again is wasted. + Computer resources are needlessly used. « It is very difficult to combine information. Elimination of Inconsistency In the file processing system information is duplicated through-out the system. So changes made in one file may be necessary be carried over to another file. This may lead to in-consistent data. So, we need to remove this duplication of data in multiple file to eliminate inconsistency. Better Service to the Users A DBMSis often used to provide better services to the users. In conventional system, availability of information is often poor, since it normally difficult to obtain information that the existing systems were not designed for. Once several conventional systems are combined to form one centralised database, the availability of information and its updateness is likely to improve since the data can now be shared and DBMS makes it easy to respond to anticipated information requests. Flexibility of the System is Improved Since changes are often necessary to the contents of the data stored in any system, these changes are made more easily in a centralized database than in a conventional system. Integrity can be Improved Since data of the organisation using database approach is, centralised and would be used by a number of users at a time. It is essential to enforce Scanned with CamScannerDatabase Management System (DBMS) 10. 1. . Organization's integrity-constraints. In the conventional system because the data is duplicated in multiple files so updating or changes may sometimes lead to entry of incorrect data in some files where it exists. Standards can be Enforced Since all access to the database must be through DBMS, so standards are easier to enforce. Security can be Improved In conventional systems, applications are developed in an adhoc/temporary manner. Often different system of an organisation would access different components of the operational data, in such an environment enforcing security can be quiet difficult. Setting up of a data-base makes to easier to enforce security restrictions since data is now centralised. Requirement can be Identified All orgnaisations have sections and departments and each of these units often consider the work of their unit as the most important and therefore consider their need as the most important. Once a database has been setup with centralised control, it will be necessary to identify organisation's requirement and to balance the needs of the competating units. |. Overall Cost of Developing and Maintaining Systems is Lower It is much easier to respond to unanticipated requests when data is centralised in a database than when it is stored in a conventional file system. Although the initial cost of setting up of a database can be large, one normal expects the overall cost of setting up of a database, developing and _—_ maintaining application programmes to be far lower than for similar service using conventional systems. Data Model must be Developed Perhaps the most important advantage of setting up of database system is the requirement that an overall data model for an organisation be build. In conventional systems, it is more likely that files, will be designed as per need of particular applications demand. Provides Backup and Recovery Centralising a database provides the schemes such as recovery and backups from the failures including disk, crash, power failures, software errors which may help the database to recover from the inconsistent state to the state that existed prior to the occurrence of the failure, though methods are very complex. 65 Relational Algebra used Relational algebra is a collection of operations to manipulate relations (tables). These operations enable the users to specify the retrieval requests which results in a new relation built from one or more relations. Relational algebra is a procedural language, which specifics, the operations to be performed on the existing relations to derive result relations. It is a procedural language which means that user has to specify what is required and what is the sequence of steps performed on the database to obtain the required output. Whenever the operations are performed on the existing relations to produce new relations then the original relations(s) are not effected ic., they remain the same, and the resultant relation obtained can act as an input to some other operation, so relational algebra operations can be composed together into a relational algebra expression. Composing relational algebra operation into relational expression is similar to composing arithmetic operations (+, -, *) into arithmetic expressions. R1 + R2 is a relational expression where RI and R2 are relations. Itis important that the results of use of relational algebric operations on relations (tables) must themselves be a relation (tables). This is because these operators can be used sequentially in various combinations to obtain desired results. Thus each operation on completion must leave data as a relation (table) for the next operator to use. So, this property which all the above operators must have is referred to as relational closure, Relational Algebraic Operations ‘The relational algebraic operations can be divided into two groups 1 . Basic Set Oriented Operations or Traditional Set Operations These are derived from Mathematical Set theory. They are applicable because each relation is deflined to be set of Tuples. These include Union, Intersection, Difference, Cartesian Product. All of these operations are binary operations which means that operation applies to pair of Relations. Scanned with CamScanner66 2. Special — Relational ‘ations ‘These include join, selection, projection and division. ‘These operations were designed specifically for relational databases, ‘These operations don't add nly power to the algebra hut simply for common, queries that are lengthy to express using baste set oriented operations. Thi 1e operations were introduced by Dr Codd But, these could not meet all tl some additional operations were introduced. ‘These included aggregate functions like SUM, AVERAG COUNT, OUTER JOIN et Database Administrator (DBA) ‘The DBA is a person or a group of persons who is, responsible for the management of the database, ‘The DBA is responsible for authorizing access to the database by grant and revoke permissions to the users, for coordinating and monitoring. its use, managing backups and repairing damage due to hardware and/or software failures and for acquiring, hardware and software resources as needed. In ease of small organisation the role of DBA 1s performed by a single person and of large organisations there is a group of DBA's who share responsibilities. Database Designers ‘They are responsible for id stored in the database and for structure to represent and store the data, It is the responsibility of database designers to communi wvith all prospective of the database users in order to understand their requirements so that they ean ereate fa design that meets their requirements. End Users End users are the people who interact with the database through applications or utilities. The various categories of end users are «Casual End Users These users occasionally access the database but may need different information each time. They use sophisticated database query language to specify their requests. e.g., high level managers who access the data weekly or biweekly. « Native End Users These users frequently query and update the database using standard types of queries. ‘The operations that can be performed by this class of users are very limited and effect precise portion of the database, tifying the data to be oosing appropriate Self Study Guide lor BCA Entrances UserOnline End weract with the al or indirectly erfaces, Entity-Relationship Model The Entity-Retationship Model (ER Model) isa high-level cptual data mal developed by Chen in 1976 to faciitate tlatabose design, Conceptual modeling isan important phase in designing a successtul database # Acconceplual data mele « a set of concepts that describe the Structure of 4 databaye and assnciated retsieval and updation Arunsctions en the database, A high level model fs chosen so that dil the technical aspect are aba covered. The E-R data model revs ‘but of the cserese of usiny commercially available BMS 10 hovel the database. The E-R meade s the generalisation of the Corlier avaiable commercial models like the Merarchical and the retwork mod, I aso allows the representation of the various Constraint a5 well a their relationships 0 to sum up, the Entity-Relationship (E-R) Model is based on a orld that const of set of objects called entities “ind relationship among entity ets which ate basically 2 group of Similar objects. The relationships between entity sets is fepresented by @ named C-K relationship and fof 1: 1,1: Nor Mt type which tells Ihe mapping from one entity set to another The ER model” is shown diagrammatically using Eniity-Relationship (ER) diagrams which represent the ‘elements of the conceptual model that show the meanings and the relationships between those elements independent of any particular DBMS and implementation detail view af 3 eal Features of the E-R Model 1. The E-R diagram used for representing E-R Model can be casily converted into relations (tables) in relational Model 2, The E-R Model is used for the purpose or good database design by the database developer 50 to use that data model in various DBMS. 3, Its helpful asa problem decomposition tool as it shows the entities and the retationship between those entities. 4, [tis inherently an iterative process. On later modifications, the entities can be inserted into this model. 5, Its very simple and easy to understand by various types of users and designers because specifi standards are used for Database System Architectures ‘The architecture of a database system is greatly influenced by the underlying computer system on which it runs, in particular by such aspects of computer architecture as networking, parallelism, and distribution. + Networking of computers allows some tasks to be executed on a server system, and some tasks to be Scanned with CamScannerDatabase Management System (DBMS) executed on client system. This division of work has led to client-server database system. + Parallel processing with in a computer system allows database-system activities to be speeded up, allowing faster response to transactions, as well as more transactions per second. Queries can be processed in a way that exploits the parallelism offered by the underlying computer system. The need for parallel query processing has led to parallel database system. + Distributing data across sites or departments in an organisation allows those data to reside where they are generated or most needed, but still to be accessible from other sites and from other departments. Keeping multiple copies of the database across different sites and also allows large organisations to continue their database operations even when one site is affected by a natural disaster, such as flood, fire, or earthquake. Distributed database system handle geographically or administratively distributed data spread across multiple database systems. Distributed Database It is a database in which storage devices are not all attached to a common CPU. It may be stored in multiple computers located in the same physical location, or may be dispersed over a network of interconnected computers. Collections of data (e.g., in a database) can be distributed across multiple physical locations. A distributed database can reside on network servers on the internet, on corporate intranets or extranets, or on other company networks. ‘The replication and distribution of databases improves database performance at end-user worksites. Advantages of Distributed Database * Management of distributed data with different levels of transparency. « Increase reliability and availability, + Easier expansion. « Reflects organisational _structure-database fragments are located in the departments they relate to. + Local autonomy a department can control the data about them. Protection of valuable data if there were ever a catastrophic event such as a fire, all of the data would not be in one place, but distributed in multiple locations. x 67 Improved performance data is located near the site of greatest demand, and the database systems themselves -are parallelised, allowing load on the databases to be balanced among servers. Economics it costs less to create a network of smaller computers with the power of a single large computer. Modularity systems can be modified, added and removed from the distributed database without affecting other modules (systems). Reliable transactions due to replication of database. Hardware, Operating System, —_ Network, Fragmentation, DBMS, Replication and Location Independence. Continuous operation. Distributed query processing. Distributed transaction management. Disadvantages of Distributed Databases Complexity extra work must be done by the DBAs to ensure that the distributed nature of the system is transparent. Extra work must also be done to maintain multiple disparate systems, instead of one big one, Extra database design work must also be done to account for the disconnected nature of the database eg., joins become prohibitively expensive when performed across multiple systems. Economics increased complexity and a more extensive infrastructure means extra labour costs. Security remote database fragments must be secured, and they are not centralised so the remote sites must be secured as well. The Infrastructure must also be secured (eg, by encrypting the network links between remote ites). coe Difficult to maintain integrity but in a distributed database, enforcing integrity over a network may require too much of the network's resources to be feasible. Inexperience distributed databases are difficult to work with, and as a young field there is not much readily available experience on proper practice, Lack of standards there are no tools or methodologies yet to help users convert @ centralised DBMS into a distributed DBMS. Scanned with CamScanner68 + Database design more complex besides of the normal difficulties, the design of a distributed database has to consider fragmentation of data, allocation of fragments to specific sites and data replication + Additional software is required ‘© Operating system should support distributed environment. ‘© Concurrency control it is a major issue. It is solved by locking and timestamping. Database Models Hierarchical Model + The hierarchical data model organises data in a tree structure. There is a hierarchy of parent and child data segments. This structure implies that a record can have repeating information, generally in the child data segments. * Data in a series of records, which have a set of field values attached to it. It collects all the instances of a specific record together as a record type + These record types are the equivalent of tables in the relational model, and with the individual records being the equivalent of rows. ‘« To create links between these record types, the hierarchical model uses parent child relationships. These are a 1:N mapping between record types. This is done by using trees, like set theory used in the relational model, ‘borrowed’ from maths, Network Model © The popularity of the network data model coincided with the popularity of the hierarchical data model. + Some data were more naturally modeled with more than one parent per child. So, the network model permitted the modeling of many-to-many relationships in data. «In 1971, the Conference on Data Systems Languages (CODASYL) formally defined the network model. The basic data modeling construct in the network model is the set construct. + A set consists of an owner record type, a set name, and a member record type. A member record type can have that role in more than one set, hence, the multiparent concept is supported, a A PA ec ‘ Self Study Guide for BCA Entrances ‘An owner record type can also be a member or owner in another set. + The data model is a simple network, and link and intersection record types (called junction records by IDMS) may exist, as well as sets between them. Thus, the complete network of: relationships is represented by several pairwise sets; in cach set some (one) record type is owner {at the tail of the network arrow) and one or more record types are members (at the head of the relationship arrow). Usually, a set defines a :M relationship, although 1:1 is permitted, the CODASYL network model is based on mathematical set theory. Relational Model RDBMS i.e., Relational Database Management System is a database based on the relational model developed by EF Codd. A relational database allows the definition of data structures, storage and retrieval operations and integrity constraints. In such a database the data and relations between them are organised in tables. A table is a collection of records and each record in a table contains the same fields. Properties of Relational Tables * Values are atomic. + Each row is unique. + Column values are of the same kind. + The sequence of columns is insignificant. ‘+ The sequence of rows is insignificant. + Each column has a unique name. Object/Relational Model * ObjecURelational Database Management Systems (ORDBMSs) add new object storage capabilities to the relational systems at the core of modern information systems. + These new facilities integrate management of traditional fielded data, complex objects such as time-series and geospatial data and diverse binary media such as audio, video, images and applets. + By encapsulating methods with data structures, an ORDBMS server can execute complex analytical and data manipulation operations to search and transform multimedia and other complex objects. As an evolutionary technology, the Object/Relational (OR) approach has inherited the robust transaction and performance management features of its relational ancestor and the flexibility of its object-oriented cousin. Scanned with CamScannerDatabase Management System (DBMS) + Database designers ean work with familar tabular structures and Data Languages (DDLS) while assimila object-management possibilities, Object-Oriented Model * Object DBMSs add database functionality to objcet programming languages. They bring much more than persistent storage of programming language objects. Object DBMSs extend the semantics of the C™, Smalltalk and object programming languages 10 provide full-featured database programming capability, while retaining native Ianguage compatibility A major benefit of this approach is the unification of the application and database development into data model and language «As a result, applications require less cade, use more natural data modeling, and code bases are easier to maintain. Object developers can write complete database applications with a modest ‘amount of additional effort, + According (o Rao (1994), “The Object-Oriented Database (OODB) paradigm is the combination of Object-Oriented Programming Language (OOPL) systems and persistent systems. «+ ‘The power of the OODB comes form the seamless treatment of both persistent data, as found in databases, and transient data, as found in executing programmes.” Semistructured Model «In semistructured data model, the information that is normally associated with a schema is contained within the data, which is sometimes called" ‘self-describing’ In such database there is no clear separation between the data and the schema, and the degree to which it is structured depends on the application. « In some forms of semistructured data there is no separate schema, in others it exists but only places loose constraints on the data. + Semi-structured data is naturally modelled in the terms of graphs which contain labels which given semanties to its underlying structure. «Such databases subsume the modelling power of recent extensions of flat relational databases, to nested databases which allow the nesting (or encapsulation) of entities, and to object databases 69 which, in addition, allow cyclic references between objects, + Semistructured data has recently emerged as an important topic of study ofr a variety of reasons. First, there are data sources such as the web, which we would like to treat as databases but which cannot be constrained by a schema. Second, it may be desirable to have an extremely flexible format for data exchange between disparate databases. third, even when dealing with structured data, it may be helpful to view it as semistructured for the purposes of browsing. Associative Model + The associative model divides the real-world things about which data is to be recorded into two sorts + Entities are things that have discrete, independent existence. An entity's existence does not depend on any other thing. « Associations are things whose existence depends on one or more other things, such that if any of those things ceases to exist, then the thing itself ceases to xist or becomes meaningless. An associative database comprises two data structures j) A set of items, each of which has a unique identifier, a name and a type. ii) A set of links, each of which has a unique identifier, together with the unique identifiers of three other things, that represent the source source, verb and target of a fact that is recorded about the source in the database. Each of the three things identified by the source, verb and target may be either a link or an item, Entity-Attribute-Value (EAV) Data Model + The best way to understand the rationale of EAV design is to understand row modeling (of which EAV is a generalised form). + Consider a supermarket database that must ‘manage thousands of products and brands, many of which have a transitory existence. Here, it is intuitively obvious that product names should not be hard-coded as names of columns in tables. + Instead, one stores product descriptions in a products table purchases/sales of individual items are recorded in other tables as separate rows with a product ID referencing this table. Scanned with CamScanner70 + Conceptually an EAV design involves a single table with three columns, an entity (such as an factory receptor ID), an attribute (such as species, which is actually a pointer into the metadata table) and a value for the attribute (ey., rat). In EAV design, one row stores a single fact, In a conventional table that has one column per tribute, by contrast, one row stores a set of facts. EAV design is appropriate when the humber of parameters that potentially apply to an entity is vastly more than those that actually apply to an individual entity. Context Model + The context data model combines features of all the above models. It can be considered as a collection of object-oriented, network and semistructured models or as some kind of object database. In other words this is a flexible model, you ean use any type of database structure depending on task. Such data model has been implemented in DBMS Context, The fundamental unit of information storage of Context is a class + Class contains methods and describes object. The ‘object contains fields and property. The field may be composite, in this ease the field contains SubFiclds ete. + The property is a set of fields that belongs to particular object. (similar to AVL database), In other words. fields are permanent part of object but Property is its variable part. + The header of Class contains the definition of the internal structure of the object, which includes the description of each field, such as their type, length attributes and name. Context data model has a set of predefined types as well as user defined types. + The predefined types include not only character strings, texts and digits but also pointers (references) and aggregate types (structures). Data Integrity + Enforcing data integrity ensures the quality of the data in the database. eg., if an employee is entered with an employee_id value of 128, the database should not allow another employee to have an ID with the same value.lf you have an employee_rating column intended to have Self Study Guide for BCA Entrances values ranging from 1 to 6, the database should not accept a value of 6. If the table has a dept_id column that stores the department number for the employee, the database. should allow only values that are valid for the department numbers in the company. ‘+ Two important steps in planning tables are to identify valid values for a column and decide how to enforce the integrity of the data in the column. Data integrity falls into these categories () Entity integrity (ii) Domain integrity (iii) Referential integrity (iv) User-defined integrity Entity Integrity Entity integrity defines a row as a unique entity for a particular table. Entity integrity enforces the integrity of the identifier column(s) or the primary key of a table (through indexes. unique constraints, primary key constraints, or identity properties). Domain Integrity Domain integrity is the validity of entries for a given column. You can enforce domain integrity by restricting the type (through data types), the format (through check constraints and rules), or the range of possible values (through foreign key) constraints, check constraints, default definitions, not null definitions, and rules. Referential Integrity Referential integrity preserves the defined relationships between tables when records are entered or deleted. In Microsoft SQL Server 2000, referential integrity is based on relationships between foreign keys and primary keys or between foreign keys and unique keys through foreign key and check constraints). Referential integrity ensures that key values are consistent across tables. Such consistency requires that there be no references to nonexistent value and that if a Key values changes, all references to it change consistently throughout the database. When you enforce referential integrity, SQL server prevents users from + Adding records to a related table if there is no associated record in the primary table. + Changing values in a primary table that result in orphaned records in a related table, + Deleting records from a primary table if there are matching related records. Scanned with CamScannerDatabase Management System (DBMS) User-Defined Integrity User-defined integrity allows you to define specific business rules that do not fall into one of the other integrity categories, All of the integrity categories support user-defined integrity (all _column-and table-level constraints in create table, stored procedures, and triggers). Data Security Actually is an important function of a databse management system whether it is centralised or distributed. Data security controls protects the data from unauthorised access and unwanted changes. Data security controls have two major aspects Data Protections + make sure that no any unauthorised person can understand the physical contents of data. File systems in centralised and distributed operating systems are used to provide this type of security. Mostly used approach for providing this protection is data encryption. Data encryption encodes the data such that nobody ean understand the actual data contents. His eneryption not only useful to secure the data stored on disks but also for exchanging the information over a network. + This encoded data can be decoded (decrypted) only by than authorised users that know what the code is authorisation security control ensures that only privileged user can manipulate the data in the way they are allowed to do. © The database management system _ must determine that which users are allowed to perform which functions and which data portion is accessible by them. Authorisation Controls « These are different in a centralised database to the distributed database —_ environment. ‘Authorisation control definition in a distributed database system is derived from that in centralised system but in the context of distributed system some additional complexity is also considered DBMS provides data security by restricting unauthorised access. « When a large database is shared by multiple users, it is possible that all users will not be authorised to access data. eg., we consider financial data as confidential and hence, only authorised people can access it, This restriction n can be in many ways. It is possible that some users are allowed to access read only data while other users can do both things as they can read data as well as update It means that access to data is controlled. «Normally users of database are given account number and password to access the data, These restrictions are automatically enforced by DBMS. We can control DBMS software by using these controls. + DBMS give the guarantee of the data security by enforcing authorization rules. It is also possible that you may loss your data due to many reasons. But DBMS provides backup and recovery method. + DBMS allows you to make backup of data and if your data is very important then you must take Frequent backups of the data. Backups are used to recover data from failure. These failures may belong to software and hardware. Concurrency Control In information technology and computer science, especially in the fields of computer programming operating systems, multiprocessors, and databases, concurrency control ensures that correct results for concurrent operations are generated, while getting those results as quickly as possible, Concurrency Control in Databases + Concurrency control in database management systems, other transactional objects, and related distributed applications ensures that database transactions are performed concurrently without violating the data integrity of the respective databases. Thus concurrency control is an essential element for correctness in any system where two database transactions or more, executed with time overlap, ean access the same data, eg. virtually in any general-purpose database system, To ensure correctness, a DBMS usually guarantees that only serialisable transaction schedules are generated, unless serialisability is intentionally relaxed to increase performance, but only in cases where application correctness is not harmed. For maintaining correctness in cases of failed (aborted) transactions schedules also need to have the recoverability property. «A DBMS also guarantees that no effect of committed transactions is lost, and no effect. of aborted transactions remains in the related database. ei Scanned with CamScanner72 Database Transaction and the ACID Rules The concept of a database transaction (or atomic transaction) has evolved in order to enable both a well understood database system behaviour in a faulty environment where crashes can happen any time, and recovery from a crash to a well understood database state. A database transaction is a unit of work, typically encapsulating a number of operations over database, an abstraction supported in database and also other systems. Each transaction has well defined boundaries in terms of which programme/code executions are included in that transaction. Every database transaction obeys the following rules 1. Atomicity Either the effects of all or none of its operations remain (all or nothing, semantics) when a transaction is completed (committed or aborted respectively). In other words, to the outside world a committed transaction appears (by its effects on the database) to be indivisible, a atomic, and an aborted transaction does not leave effects on the database at all, as if never existed. Self Study Guide for BCA Entrances 2, Consistency Every transaction must leave the database in a consistent (correct) state. i.e. maintain the predetermined integrity rules of the database (constraints upon and among the database's objects). A transaction must transform a database from one consistent state to another consistent state (it is the responsibility of the transaction’s programmer to make sure that the transaction itself is correct, i.., performs correctly what it intends to perform while maintaining the integrity rules). Thus since a database can be normally changed only by transactions, all the database’s states are consistent. An aborted transaction obes not change the state. 3 Isolation Transactions cannot interfere with each other. Moreover, usually the effects of an incompelete transaction are not visible to another transaction. Providing isolation is the main goal of eoncurreney control. 4. Durability Effects of successful (committed) transactions must persist through. Correctness Serialisability For correctness, common major goal of most concurrency control mechanisms is generating schedules with the seialisabilty property. Without serialisabity undesirable phenomena may occur 9, money may dsappear fram accounts, or be generated from nowhere. Seralisabity of a schedule means ‘equivalence to some seria schedule with the sime transactions Seralisablity is considered the highest evel of solation among database trarsacton sand the major correctness enteron for concurent transaction. In some meet availabilty requirements n highly dstrbuted systems, ss compromsed, relaxed forms of seriasablty are allowed for better performance or to {only if application’ correctness snot violated bythe relaxation, Almost al implemented, concurrency coteol mechanisms achive serilisabilty by providing Conflict sealisabiliy, Recorverability Concurrency control typically aso ensures the recoverability property of Schedules for maintaining correctness in cases of aborted transactions. Recoverability means that no committed transaction ina schedule has read data wiltn by an aborted transaction, Such data eisappear from the database and are parts of an incorrect database state. Reading such data violates the consistency rule of ACID. Unlike seraisabilty, recoverability cannot be compromise, related at any cate, since any relaxation results in quick database integrity violation upon aborts. The major methodsw listed above provde: sesiasablity mechanisms. None of them nis general form automatically provides recoverability, nd special considerations and mechanism enhancements, ate needed to support recovery commonly utilised special eas of recoverability in Sticty, which allows efficient database recovery fom faire Distributed Recoverability Unie seri ity, dtd cowry nd dst ices can be acid effet in 3 achive eect in a saighfoard way. iar tthe sisted Dishes nen ane ten they eo ed lly an employ acto setey for eae peace na Aas ben menone abv dst SSP. nuig dtrutd tices (ecverity an ted stb comme ardring eratabi autnatay emp te eed vin te. an eho when pled aly mech ca a en ne utilized for many years; as a matter of fact locality is defined by the Doundary of a 2 PC participant. ae Recovery All systems are prone to failures, and handling recovery from failure is a must. The properties of the generaied schedules, which are dictated by the concurrency control mechanism, may have an impact on the effectiveness and efficiency of recovery. e.g., the strictness property (mentioned in the secti recoverability above) is often desirable for an efficient recovery. Replication For high availability databas. objects are often replicated. Update of replicas oe same database object need to be kept synchronised. This may affect the way concurrency control is done, Scanned with CamScannerObjective Questions 1 describe what is database fields. (a) Structures () Field markers (©) Field definition (a) Field names 2 When data changes in multiple lists and all lists are not updated, this causes (a) data redundaney _(b) information overload (©) duplicate data (@) data inconsisteney 3. Which of them may contain null values? (a) Super Key (b) Alternate Key (©) Candidate Key (a) Foreign Key 4, Conceptual schema means (a) where data is stored or (b) where DBA are sot (©) None of the above (@) Both ‘a’ and ‘b’ 5. Who is the main uses of metadata? (a) Operating System (b) Application Software (©) DBMS. (@) Application Programmer 6. Chip is the common nickname for a(n) (a) transistor (b) resistor (©) integrated circuit (d) semiconductor 7. A column which is uniquely identifies the rows of @ table, is called a (a) candidate key (b) primary key (©) Both ‘a’ and °b" (4) foreign key 8, What does tuple means in a table? (a) Column () Row (©) Attribute (a) Record 9. The security issues of the database are set up by the (a) application programmer (b) online user (©) native user (a) database administrator 10. Which language is used set permission to access to a table? (a) DML () DeL (© DDL (2) All of these 11, In DDBMS environment we distribute (a) data (b) processing logic () control (@) Allof these 12. One of the following is not the valid type of attribute in ER-model. (a) Weak (b) Composite (©) Single valued (a) None of these nally 13, Degree and cardinality of a relation means (a) Number of attribute and number of tuple respectively (b) Heading and body of a relation respectively (@) Number of tuple and number of attribute respectively (a) None ofthe above 14. Which of the following are role of database administrative? (@) a,b,d (b) bred © abe (@) All of these 15, In DBMS, concurrent execution of transaction is controlled by (a) querry scheduler (b) transaction manager (©) query manager (a) query processor 16. Conversion of data one form of data to other is called (a) transactions (b) mapping (©) sharing, (@) procedure 17. Locking Algorithm in Transaction Ensure (b) deadlock (@) All of these 18, ‘The goal of normalisation is to (a) minimise the no of relationship (b) minimise the no of entities (a) consistency (©) concurrency (©) minimise the no of tables (a) minimise the no of redundancy 19, A group of associated field is called (a) tables () row (e) attribute (@) record 20, Change in DB strueture causes change in (a) size (b) permission (©) metadata (@) DBMS 21, Agrants command is used in (a) DML. () DCL (@ DDL (@) All of these 22. A primary key consists of more than one attribute (a) compund key (b) candidate key (©) composite primary key (d) super key 23, Which of them is not traditional relational operator? (a) Projection (b) Restriction (©) Join (@) Division 24. A weak entity type (a) cannot exist without the presence of it’s owner entity type (b) does not havea key attribute (©) Both‘a’ and’b: (@) Neither‘a' and'b’ Scanned with CamScannercoo States that the dati occurate and reliable, (a) Data redundancy (©) Data reliability ity (a) Data conninteney 26. Which language in used to define the Integrity constraints? (a) DCL (b) DML. (©) DDL. (a) Non of the 21, The maximum efficiency in DDBMS environment tn achieved through (a) normalisation (b) allocation (©) fragmentation (a) replication 28. The relationship between data in defined in the ses (a) physical level (©) logical level (a) complex 29. DBMS that is based on relational mode! is called aw (b) view level wel (a) RDBMS (b) OODBMS, () DBMS (a) ORDBMS 30. The maximum reliability in DDBMS enviroment is achieved through (a) normalisation (e) fragmentation 31, DML deals with (a) data security, creating table of databs (b) data insertion, updation and deletion (©) metadata (a) structure of table, relation between table 32. Which of the following langunge is used to defined the Schema of database? (b) allocation (a) replica Self Study Guide for BCA Entrances (0) Error of d (a) Connintaney Hoflwure that munayes dintributed database and provide vases to unrn Ms called DDBMB, (a) eeliubility (h) availability (e) trannpurency (d) None of thene in a nyntem which In uned to ntore, retrieve and manipulate data, (a) DBMS (b) DBA (e) Query Procemor —— (d) DBMS. 36, Which torm identifies a specific computer on the web and main page of entire site? ) URL (i) Wobsite nddrews (©) Hyperlink (a) Dom ‘One of the following, key in choven as primary key. (u) Candidate (by Alternate (©) Foreign (a) Super key 38, Dogeve of coupling means (a) dependence of 0 (b) interaction between two elements (c) how closely two element are connected (a) All of th 39. Which one of them is not valid relational operator? (a) Rename (b) Summarize (c) Drop (a) Add Objective of distributed database management system is 35. jn name w. ment on another “(a) DDL. (b) DNL (a) transparency (b) allocation (c) DCL. (d) None of these (c) fragmentation (d) None of these Answers 1 3. dd) 4. (d) 5. (e) 6. (d) 1h & (b) 9. (d) 10. (b) u. fay 13. (a) 14. (a) 15. (b) 16. (by 17. (a) 18 (a) 19. (d) 2 (© 2. ©) B. (d) 2. (o) B. (d) B. (e) a. Wd) BB. (c) 2B. (w) 0. (d) 31. (b) 3. (a) B. () 3%. () 36. (a) tb) 3B. (c) 39. (e) 40. (d) ai, Scanned with CamScanner
You might also like
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
From Everand
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
Mark Manson
4/5 (6129)
Principles: Life and Work
From Everand
Principles: Life and Work
Ray Dalio
4/5 (627)
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
From Everand
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
Brene Brown
4/5 (1148)
Never Split the Difference: Negotiating As If Your Life Depended On It
From Everand
Never Split the Difference: Negotiating As If Your Life Depended On It
Chris Voss
4.5/5 (933)
The Glass Castle: A Memoir
From Everand
The Glass Castle: A Memoir
Jeannette Walls
4/5 (8215)
Grit: The Power of Passion and Perseverance
From Everand
Grit: The Power of Passion and Perseverance
Angela Duckworth
4/5 (631)
Sing, Unburied, Sing: A Novel
From Everand
Sing, Unburied, Sing: A Novel
Jesmyn Ward
4/5 (1253)
The Perks of Being a Wallflower
From Everand
The Perks of Being a Wallflower
Stephen Chbosky
4/5 (8365)
Shoe Dog: A Memoir by the Creator of Nike
From Everand
Shoe Dog: A Memoir by the Creator of Nike
Phil Knight
4.5/5 (860)
Her Body and Other Parties: Stories
From Everand
Her Body and Other Parties: Stories
Carmen Maria Machado
4/5 (877)
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
From Everand
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
Ben Horowitz
4.5/5 (361)
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
From Everand
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
Margot Lee Shetterly
4/5 (954)
Steve Jobs
From Everand
Steve Jobs
Walter Isaacson
4/5 (2923)
The Emperor of All Maladies: A Biography of Cancer
From Everand
The Emperor of All Maladies: A Biography of Cancer
Siddhartha Mukherjee
4.5/5 (277)
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
From Everand
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
Ashlee Vance
4.5/5 (484)
A Man Called Ove: A Novel
From Everand
A Man Called Ove: A Novel
Fredrik Backman
4.5/5 (4972)
Angela's Ashes: A Memoir
From Everand
Angela's Ashes: A Memoir
Frank McCourt
4.5/5 (444)
Brooklyn: A Novel
From Everand
Brooklyn: A Novel
Colm Toibin
3.5/5 (2061)
The Art of Racing in the Rain: A Novel
From Everand
The Art of Racing in the Rain: A Novel
Garth Stein
4/5 (4281)
The Yellow House: A Memoir (2019 National Book Award Winner)
From Everand
The Yellow House: A Memoir (2019 National Book Award Winner)
Sarah M. Broom
4/5 (100)
The Little Book of Hygge: Danish Secrets to Happy Living
From Everand
The Little Book of Hygge: Danish Secrets to Happy Living
Meik Wiking
3.5/5 (447)
Yes Please
From Everand
Yes Please
Amy Poehler
4/5 (1987)
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
From Everand
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
Gilbert King
4.5/5 (278)
The World Is Flat 3.0: A Brief History of the Twenty-first Century
From Everand
The World Is Flat 3.0: A Brief History of the Twenty-first Century
Thomas L. Friedman
3.5/5 (2283)
Bad Feminist: Essays
From Everand
Bad Feminist: Essays
Roxane Gay
4/5 (1068)
The Outsider: A Novel
From Everand
The Outsider: A Novel
Stephen King
4/5 (1993)
The Woman in Cabin 10
From Everand
The Woman in Cabin 10
Ruth Ware
3.5/5 (2641)
A Tree Grows in Brooklyn
From Everand
A Tree Grows in Brooklyn
Betty Smith
4.5/5 (1936)
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
From Everand
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
Viet Thanh Nguyen
4.5/5 (125)
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
From Everand
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
Dave Eggers
3.5/5 (692)
Team of Rivals: The Political Genius of Abraham Lincoln
From Everand
Team of Rivals: The Political Genius of Abraham Lincoln
Doris Kearns Goodwin
4.5/5 (1912)
Wolf Hall: A Novel
From Everand
Wolf Hall: A Novel
Hilary Mantel
4/5 (4074)
On Fire: The (Burning) Case for a Green New Deal
From Everand
On Fire: The (Burning) Case for a Green New Deal
Naomi Klein
4/5 (75)
Fear: Trump in the White House
From Everand
Fear: Trump in the White House
Bob Woodward
3.5/5 (830)
Rise of ISIS: A Threat We Can't Ignore
From Everand
Rise of ISIS: A Threat We Can't Ignore
Jay Sekulow
3.5/5 (143)
Manhattan Beach: A Novel
From Everand
Manhattan Beach: A Novel
Jennifer Egan
3.5/5 (901)
John Adams
From Everand
John Adams
David McCullough
4.5/5 (2544)
The Light Between Oceans: A Novel
From Everand
The Light Between Oceans: A Novel
M L Stedman
4.5/5 (790)
The Unwinding: An Inner History of the New America
From Everand
The Unwinding: An Inner History of the New America
George Packer
4/5 (45)
Little Women
From Everand
Little Women
Louisa May Alcott
4/5 (105)
The Constant Gardener: A Novel
From Everand
The Constant Gardener: A Novel
John le Carré
3.5/5 (109)
Related titles
Click to expand Related Titles
Carousel Previous
Carousel Next
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
From Everand
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
Principles: Life and Work
From Everand
Principles: Life and Work
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
From Everand
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
Never Split the Difference: Negotiating As If Your Life Depended On It
From Everand
Never Split the Difference: Negotiating As If Your Life Depended On It
The Glass Castle: A Memoir
From Everand
The Glass Castle: A Memoir
Grit: The Power of Passion and Perseverance
From Everand
Grit: The Power of Passion and Perseverance
Sing, Unburied, Sing: A Novel
From Everand
Sing, Unburied, Sing: A Novel
The Perks of Being a Wallflower
From Everand
The Perks of Being a Wallflower
Shoe Dog: A Memoir by the Creator of Nike
From Everand
Shoe Dog: A Memoir by the Creator of Nike
Her Body and Other Parties: Stories
From Everand
Her Body and Other Parties: Stories
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
From Everand
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
From Everand
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
Steve Jobs
From Everand
Steve Jobs
The Emperor of All Maladies: A Biography of Cancer
From Everand
The Emperor of All Maladies: A Biography of Cancer
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
From Everand
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
A Man Called Ove: A Novel
From Everand
A Man Called Ove: A Novel
Angela's Ashes: A Memoir
From Everand
Angela's Ashes: A Memoir
Brooklyn: A Novel
From Everand
Brooklyn: A Novel
The Art of Racing in the Rain: A Novel
From Everand
The Art of Racing in the Rain: A Novel
The Yellow House: A Memoir (2019 National Book Award Winner)
From Everand
The Yellow House: A Memoir (2019 National Book Award Winner)
The Little Book of Hygge: Danish Secrets to Happy Living
From Everand
The Little Book of Hygge: Danish Secrets to Happy Living
Yes Please
From Everand
Yes Please
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
From Everand
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
The World Is Flat 3.0: A Brief History of the Twenty-first Century
From Everand
The World Is Flat 3.0: A Brief History of the Twenty-first Century
Bad Feminist: Essays
From Everand
Bad Feminist: Essays
The Outsider: A Novel
From Everand
The Outsider: A Novel
The Woman in Cabin 10
From Everand
The Woman in Cabin 10
A Tree Grows in Brooklyn
From Everand
A Tree Grows in Brooklyn
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
From Everand
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
From Everand
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
Team of Rivals: The Political Genius of Abraham Lincoln
From Everand
Team of Rivals: The Political Genius of Abraham Lincoln
Wolf Hall: A Novel
From Everand
Wolf Hall: A Novel
On Fire: The (Burning) Case for a Green New Deal
From Everand
On Fire: The (Burning) Case for a Green New Deal
Fear: Trump in the White House
From Everand
Fear: Trump in the White House
Rise of ISIS: A Threat We Can't Ignore
From Everand
Rise of ISIS: A Threat We Can't Ignore
Manhattan Beach: A Novel
From Everand
Manhattan Beach: A Novel
John Adams
From Everand
John Adams
The Light Between Oceans: A Novel
From Everand
The Light Between Oceans: A Novel
The Unwinding: An Inner History of the New America
From Everand
The Unwinding: An Inner History of the New America
Little Women
From Everand
Little Women
The Constant Gardener: A Novel
From Everand
The Constant Gardener: A Novel