HOMEWORK NO:1

CAP301: Database Management System

SUBMITTED TO: RITU RAI

SUBMITTED BY:SURENDRA MCA 3nd SEM ROLL NO- D3804A15 REGD NO- 10806601

Part A Q 1:->Discuss the problems that are caused by data redundancies? Can data redundancies be completely eliminated when the database approach is used? Why or why not? ANSWER: The same piece of information may be stored in two or more files. For example – the particular of an individual who may be a customer or an employee may be stored in two or more files. Some of these information may be changing., such as the address, the pay drawn, etc. it is therefore quite possible that while the address in the master file for one application has been updated the address in the master file for one application has been updated the address in the master file for another application may have not been. It may not also be easy for the computer based system to even find out as to in how many files the repeating items such as the address if occurring.

The solution there for is to avoid this data redundancy and the keeping of multiple copies of the same information and replace it by a system where the address is stored at just one place physically, and is accessible to all applications from this itself. Reduction of Redundancies: centralized control of data by the DBA avoids unnecessary duplication of data and effectively reduce the total amount of data in a large mass of data. Another advantage of avoiding duplication is the elimination of the inconsistencies that tend to be present in redundant data files. Any redundancies that exist in the DBMS are controlled and system ensures that these multiple copies are consistent. Q 2 :-> why is data important to an enterprise? How does an enterprise that has better control of its data have competitive edge over other organizations? What are the various areas and benefits where the DBMS can be use? ANSWER: The same piece of information may be stored in two or more files. For example – the particular of an individual who may be a customer or an employee may be stored in two or more files. Some of these information may be changing., such as the address, the pay drawn, etc. it is therefore quite possible that while the address in the master file for one application has been updated the address in the master file for one application has been updated the address in the master file for another application may have not been. It may not also be easy for the computer based system to even find out as to in how many files the repeating items such as the address if occurring. The solution there for is to avoid this data redundancy and the keeping of multiple copies of the same information and replace it by a system where the address is stored at just one place physically, and is accessible to all applications from this itself. Reduction of Redundancies: centralized control of data by the DBA avoids unnecessary duplication of data and effectively reduce the total amount of data in a large mass of data. Another advantage of avoiding

duplication is the elimination of the inconsistencies that tend to be present in redundant data files. Any redundancies that exist in the DBMS are controlled and system ensures that these multiple copies are consistent.

There are several reasons for spending money, time, and effort on data protection. The primary one is minimizing financial loss, followed by compliance with regulatory requirements, maintaining high levels of productivity, and meeting customer expectations. As computers have become more and more integral to business operations, data requirements from regulators such as the U.S. Securities and Exchange Commission (SEC), as well as from customers, have been imposed on businesses. The single most important reason to implement data protection strategies is fear of financial loss. Data is recognized as an important corporate asset that needs to be safeguarded. Loss of information can lead to direct financial losses, such as lost sales, fines, or monetary judgments. It can also cause indirect losses from the effects of a drop in investor confidence or customers fleeing to competitors. Another important business driver for data protection is the recent spate of regulations. Governments throughout the world have begun imposing new regulations on electronic communications and stored data. Businesses face dire consequences for noncompliance. Some countries hold company executives criminally liable for failure to comply with laws regarding electronic communications and documents.

A third driver, which does not get the attention of the press but is important to organizations nonetheless, is productivity. Loss of important data lowers overall productivity, as employees have to deal with time-consuming customer issues without the aid of computer databases. Data loss also results in application failures and similar system problems, making it difficult for people to do their jobs. A poor data protection strategy may leave people waiting for long periods of time for systems to be restored after a failure. During that time, employees may be idle or able to work only in a reduced capacity, further diminishing productivity. Times have changed drastically. Today, gaining a competitive edge is extremely difficult. Companies must build new systems, implement new strategies, or identify new markets in order to compete or survive. Historically, what has been ignored is proper data management that supports your ability to make reasonable, results-oriented decisions. Companies misunderstand how effective data management yields a competitive advantage. Although many organizations know data is an important corporate asset, data is quite different from other corporate assets. Unlike tangible corporate assets that have a structured value and depreciation schedule, it is difficult for many companies to place a definitive value on data. As a result, the perceived lack of tangible value makes justifying data management efforts tricky. Forward-thinking companies understand one key idea: the cost of ineffective data management is much higher than the cost of successfully managing data. Put simply, organizations depend

on data. Regardless of industry, revenue size, or competitive environment, every company relies on its data to produce information that guides effective decisions. The quality of the results from any analysis is only as good as the quality of the inputs (the data) that feed that analysis. Data management establishes and deploys the roles, responsibilities, policies, and procedures pertaining to the acquisition, maintenance, dissemination, and disposition of data. To succeed, a data-management program requires a partnership between the business and technology groups. The business areas are responsible for establishing the business rules that govern the data and are ultimately responsible for verifying the data quality. The information technology (IT) group is responsible for establishing and managing the overall environment—architecture, technical facilities, systems, and databases that gather and house data throughout the enterprise. Given the broad focus of data management, an effective program relies on a combination of people, processes, and technology. We’ll explore the major issues in building better data and how to utilize these three elements to achieve more effective data management policies. More specifically, this article defines an organization’s data management maturity based on the processes practiced and the value an organization places on data management. Most organizations approach data management in the same way they have for decades. Data, as an entity, is a backoffice problem that is the domain of the IT staff. Business users have a limited role in traditional data-management routines, although their job function may be the most affected by inconsistent, inaccurate, or unreliable data With the growth of the database, these system are used in various application of real world such as Banking System and ATM’s machines, Stock trading system, Flight reservation system, Computerized library system, Super market product inventory system, Credit card\credit limit check system.

Benefits of DBMS (Database Management Systems) are followings: A true DBMS offers several advantages over file processing. The principal advantages of a DBMS are the followings: • Flexibility: Because programs and data are independent, programs do not have to be modified when types of unrelated data are added to or deleted from the database, or when

physical storage changes. • Fast response to information requests: Because data are integrated into a single database, complex requests can be handled much more rapidly then if the data were located in separate, non-integrated files. In many businesses, faster response means better customer service. • Multiple access: Database software allows data to be accessed in a variety of ways (such as through various key fields) and often, by using several programming languages (both 3GL and nonprocedural 4GL programs). • Lower user training costs: Users often find it easier to learn such systems and training costs may be reduced. Also, the total time taken to process requests may be shorter, which would increase user productivity. • Less storage: Theoretically, all occurrences of data items need be stored only once, thereby eliminating the storage of redundant data. System developers and database designers often use data normalization to minimize data redundancy.

Q3:-> list four responsibilities of a database management system. For each responsibility, explain the problems that would arise if the responsibility were not discharged? ANSWER: A database management system includes the following responsibilities: Support the Oracle Applications E-Business Suites environment. Responsible for system administration activities such as creating user accounts, concurrent executables/ programs, creating functions/menus and responsibilities. Responsible for cloning and patching the E-Business environment utilizing tools such as rapid clone, adadmin , adctrl and adpatch. Additional responsibilities are to provide remote production database management and administration services for the ORACLE relational database management system in support of distributed business applications. This includes performing oracle installations, database upgrades/migrations, management of space, backup, recovery and performance tuning. If these responsibilities were not met by a given DBM the following problems can occur, respectively 1. No DBMS can do without this, if there is no file manager interaction then nothing stored in the files can be retrieved. 2. Consistency constraints may not be satisfied, account balances could go below the minimum allowed, employees could earn too much overtime (e.g., hours > 80 hours) or, airline pilots may fly more hours than allowed by the law. 3. Unauthorized users may access the database, or users authorized to access part of the database may be able to access parts of the database for which they lack authority. For

example, a high school student could get access to national defense secret codes, or employees could find out what their supervisors earn. 4. Data could be lost permanently, rather than at least being available in a consistent state that existed prior to a failure. 5. Consistency constraints may be violated despite proper integrity enforcement in each transaction. For example, incorrect bank balances might be reflected due to simultaneous withdrawals and deposits, an so on.

Part B Q1:-> Consider the application program for the support of an automatic teller machine? How does such a program communicate with the user and the database? ANSWER: The program and the DBMS communicate in terms of six types of information:

Action Objects data names. Selection criteria. Userschema definition and user program buffer location. Response on detection of error or exception condition. Access authorization
Every ATM is connected directly to the bank that it comes from. This link allows the ATM to authenticate your ATM card, check on your balances, and withdraw cash from your account. Even if you come from a bank other than the one that owns the ATM, the bank's central database knows how to communicate with those other systems and get the necessary information. Since this database is shared among all computers in the bank, it's updated

instantly with all information about your account, so the cash you deposit at one ATM can be withdrawn from another one.

Q2:-Discuss the characteristics of relations that make them different from ordinary tables and files? Answer: Ordinary tables and files are static while a relational database has data that is dependent on the data that is entered in tuples that are related to that attributes. In the ordinary tables and files, there are no constraints related to the related data and a user could input whatever they wanted.

Q3:-> :-> Discuss various integrity constraints and explain how they are beneficial in managing the accurate database? Answer: Integrity constraints provide a way of ensuring that changes made to the database by authorized users do not result in a loss of data consistency.

Constraint types There are five integrity constraints in Oracle. Not Null A column in a table can be specified not null. It's not possible to insert a null in such a column. The default is null. So, in the following create table statement, a null can be inserted into the column named c. create table ri_not_null ( a number not null, b number c number ); null,

insert into ri_not_null values ( 1, null, null); insert into ri_not_null values ( 2, insert into ri_not_null values (null, 3, 5, 4); 6);

The first to records can be inserted, the third cannot, throwing a ORA-01400: cannot insert NULL into ("RENE"."RI_NOT_NULL"."A"). The not null/null constraint can be altered with alter table ri_not_null modify a null; After this modification, the column a can contain null values. Unique Key The unique constraint doesn't allow duplicate values in a column. If the unique constraint encompasses two or more columns, no two equal combinations are allowed. create table ri_unique ( a number unique, b number ); However, if a column is not explicitely defined as not null, nulls can be inserted multiple times: insert into ri_unique values (4, 5); insert into ri_unique values (2, 1);

insert into ri_unique values (9, 8); insert into ri_unique values (6, 9); insert into ri_unique values (null,9); insert into ri_unique values (null,9); Now: trying to insert the number 2 again into a: insert into ri_unique values (2,7); This statement issues a ORA-00001: unique constraint (RENE.SYS_C001463 violated). Every constraint, by the way, has a name. In this case, the name is: RENE.SYS_C001463. In order to remove that constraint, an alter table ... drop constraint ... is needed: alter table ri_unique drop constraint sys_c001463; Of course, it is also possible to add a unique constraint on an existing table: alter table ri_unique add constraint uq_ri_b unique (b); A unique constraint can be extended over multiple columns: create table ri_3 ( a number, b number, c number, unique (a,b) ); It is possible to name the constraint. The following example creates a unique constraint on the columns a and b and names the constraint uq_ri_3. create table ri_3 ( a number, b number, c number, constraint uq_ri_3 unique (a,b) ); Primary Key

On a technical level, a primary key combines a unique and a not null constraint. Additionally, a table can have at most one primary key. After creating a primary key, it can be referenced by a foreign key. create table ri_primary_key ( a number primary key, b number ); Primary keys can explicitely be named. The following create table statement creates a table with a primary key whose name is pk_name. create table ri_primary_key_1 ( a number, b number, c number, constraint pk_name primary key (a, b) ); Foreign Key A foreign key constraint (also called referential integrity constraint) on a column ensures that the value in that column is found in the primary key of another table. If a table has a foreign key that references a table, that referenced table can be dropped with a drop table .. cascade constraints. It is not possible to establish a foreign key on a global temporary table. If tried, Oracle issues a ORA-14455: attempt to create referential integrity constraint on temporary table. Check A check constraint allows to state a minimum requirement for the value in a column. If more complicated requirements are desired, an insert trigger must be used. The following table allows only numbers that are between 0 and 100 in the column a; create table ri_check_1 ( a number check (a between 0 and 100), b number ); Check constraints can be added after a table had been created: alter table ri_check_1

add constraint ch_b check (b > 50); It is also possible to state a check constraint that check the value of more than one column. The following example makes sure that the value of begin_ is smaller than the value of end_. create table ri_check_2 ( begin_ number, end_ number,

value_ number, check (begin_ < end_) );