0% found this document useful (0 votes)
10 views

Database

Data base management

Uploaded by

qkinxa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
10 views

Database

Data base management

Uploaded by

qkinxa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 10
CHAPTER 1 .<) DATA BASE Q. Define data and Information Ans. Data: Data is collection of raw facts and fi meaningful information. Data is a valuable as: perform an effective and successful operat: data useful reports and graphs can be generated, Example: s. Data can be processed to produce < of data. Data enables managers to f management. On the basis of processed Students fill in admission form when they get admission in any college. Admission form contains raw facts about the student. The raw facts are student name, father name, and contact no and address ete. The ose of collecting data is to maintain the records of the students during their study period in the college. Information The processed and manipulated data is called information e.g the percentage of student's results. It is meaningful form of data and used for making decision. Data Data Processing Information Q. What are the operations performed on dat: Ans. Following three operations can be performed on data. Data Capturing: The process of recording of data is called Data Capturing. Data may be captured . *Y using different methods. Data may be recorded on source documents. Data can also be Given directly to the computer through input devices. For BS Py om mo Fae 8 ry Data Manipulating: sata The following operations may be performed on captured cata. Classifying: _ The process of organizing data into classes is called classifying. Calculations: The process of arithmetic operation on data is called calculation. Sorting: The process of arranging of data in logical sequence (numerically & logically ig ascending/descending) Summarizing: The process of reducing large amount of data in more concise and usable form is called summarizing, Managing Output Results: Storing: The process in which we store useful data/information for future use is called Storing. Secondary storage device as hard disk, CDs ete are used for this purpose, Retrieval: The process of fetching or accessing of stored data is called retrieval. Data can be retrieved whenever it required. Communication: The transfer of data from one location t called Communication, Reproduction: The process of copying or duplicating is called Teproduction. Data can be teproduced if different users need data at different locations, Q. Define Field, Record and File In detall, Ans. Field: A combination of one or more characters is called field, Column name is called field in database. Roll #, Name, Class and City are fields in the table given below. Record: Employ Name Employee Number Grade ‘© another location for further processing is Designation Date of joining Qualifications #15 2 Data Base ch A collection of related fields trea aed Record in database. Det record in the table given below. File: A collection of related records treated as 2 jnown as data set. If we save this data this file. Student data: 103 HAROON 104 TAHIR 105 MAMOON 106 FARID Q. Discuss file types from usage point of view. Ans. Files can be categorized on different three types: 1. Master file 2. Transaction file 3. Backup file Master File: Master files are used to store the info Period of time. For example the address file for File. These files are updated regularly. Transaction file: Transaction files are used 10 temporary files and used to update master files. Backup File: Backup files are used to Permanent files and data can lostdamaged/infected. mation that remains constant for a long all students enrolled in college in Master store data before processing. These files are save an exact copy of important data. These are be recovered from these files if original file is — 312 For BS Programs Qa. Discuss file types from functional point of view. Ans, The ies are ives proper names from functional point of view. It consist of file name and file extension and both are separated by a dot sign. Extension indicates the type of file. Types of these files are given as under: 1, Program files 2. Data files Program files: A type of file that contains the software instructions is called Program file. The Program files have an extension .com and .exe. Data files: A file that contains data is called data filed. Data files are created by the software being used. For example: File type File extension PDunites [a aa Images files pg, gif, tif Video files .avi, mpg Q. Describe the file types from storage point of view. OR How we organize data on storage media? Ans, A file is a collection of tecords. Files are stored on secondary storage devices, _ From storage point of view files are divided into following types. > — Sequential files > — Direct or random files > Indexed sequential files SEQUENTIAL FILES: In sequential files, records are stored in se. ascending or descending order, Retrieving recor process. The main disadvantage of se we have to start from beginning. DIRECT OR RANDOM FILES: In direct file organization, Data base Image processor Video Software quence. Records are normally stored in d from sequential file is also sequential quential file is slow Processing. To read any record records are not stored one after another. They are stored in particular locations. Each location has a unique address, A record is directly accessed by using address of that location. The Computer can read a specific record from a file without reading any other record, It is also called random access file. r cppitt #15. 2 Data Base exED SEQUENTIAL FILEs: In indexed sequential file an in, 3 of key value of record: IND! responding dish ‘or each record in file. 1s found from index by using key field. The S added or deleted every time. The record in index i € or randomly. a. What is database and what are its major components? Ans. Database: 0 . qo retrieve a re index file is updated wt sequential file can be accessed in sequene A Database is a collection of | ally related data. Telephone directory, dictionary and address book are examples of database. Normally databases are different innature and used for specific purpose. These may be organized in various ways to meet various processing and retrieval requirements of the organization or users, For example a school or college has separate files for its student's attendance information, fee record and result information 1, Data 2. Hardware 3. Software 4. Personnel’s Q. What are Database Objectives? Ans. There are at least three main objectives for using the database in an organization. 1. Data Integration 2. Data Integrity 3. Data Interdependence Data Integration: Data is stored in different files. It is difficult to store and retrieve data from different files, In a database, information is coordinated from different files and operated on a single file. Physically data may be located on different devices. Data may be Scattered around on different locations, connected through data communication links. Logically data is centralized. Data Integrity: The reliability and accuracy of data is called data integrity. If a data item is stored in more than one file, then all files must be updated if that item is changed. In a database, only one copy of data is kept, therefore the data is more reliable. In database integrity rules are applied to keep data reliable and accurate. Data is checked against these rules before storage. 0 314 For BS Program, ‘ Data Interdependence: Database provides data independence. Da are independent of each other. The user can changing application program. Application program data storage structure. Q. What is Database Mana: Ans. Database Management System (DBMS): . The database management system is a collection of programs, which are used for er the traditional file storing and manipulating database. It is an improvement over © provide an easy and efficient way of storing management system. Its main purpose is to ; . data and retrieving information. Normally the DBMS is used for large or medium sizeq organizations that use different types of files. Objectives of Database Management System: , The database management system Is a collection of programs, which are used for storing and manipulating database. It is an improvement over the traditional file management system. Its main purpose is to provide an easy and efficient way of storing data and retrieving information. Normally the DBMS is used for large or medium sized organizations that use different types of files. Following are the major objectives of databas Shareability: Different people and different processes can us at one place. Users can be at different linked locations. Availability: Both the data and the DBMS, which delivers the data, the users. Evolvability: The ability of the DBMS t of user is called Evolvability. Database integrity: Data is shared among multiple users. There must be some way of data security. There must be some rules for the accuracy and reliability of data. Qa. What are the advantages of DBMS? Ans. The database management system has several advantages over the traditional file system. Database systems have following advantages: Data independence Support complex data relationships Sophisticated data security feature Database backup/recovery Advanced capabilities ta and application program that use data change data storage structure Withoy, can be changed without changing gement system? What are its Objectives? ¢ management system .¢ data at same time. Data is stored must be easily accessible to 0 change data and database structure according to needs VVVVV y at independence: tS Database provides data Independe independent of cach other, The wt a sing application program, Applic, ang cams yorage structure, penton Program can gupport Complex Data Relationship: Fairly complex data structures ¢ i “Son 5 can be desig whi jogically view Or access the data. This com = ined which designer (0 put data whenever needed. Picxity greatly enhan utilities: The DBMS utilities are the rams database by manipulating the data, eee fe oe ae backup and recovery procedures of databases, Sen Pama we Query Language: A query language can be used to inte Query Language) is used for creating table Structure, entering data into retricving/updating the selected records, based upon the particular criteria. The q the form of a sentence or English like command ic., SELECT, DELETE. Report Generation: A report generator is a program that is used to Produce an on-screen or printed document from the database. The report format can be specified in advance ie., row heading, column heading, page headers etc. Even the non-experts can create very useful and attractive reports by using this facility. Access Security: The protection of data from unauthorized persons is called data security. In DBMS, Data Administrator creates user accounts for authorized users. The rights of each user account are specified. Each user is given an ID and password. Authorized users can access data according to the rights defined. The access rights of application programs can be defined, Backup and Recovery: | Storing a copy of data is called backup. Accessing data from backup is called Tecovery. DBMS provide sophisticated backup/recovery mechanism. Backup/ recovery is very important features of DBMS. Most of the DBMS automatically creates backup after Tegular intervals, They also recover data automatically when required. Q. How the tables/relations are formed up in DBMS? Ans. Table or Relation saformation about an entity. An entity is A table or relation is used to store information about wf anything about which information is stored in the database. The entity must have a Unique identifier. The identifier is composed of one or more attributes. Each attribute Must have one and only one value Tact with DBMS. Normally, SQLS: red uery is in — 316 For BS Program, Forming a relation: The relations are used to store information about an entity. They are formed according to the attributes of the entity about which the information is to be stored Suppose that “Student Information System” has the following entites: Student Teacher Course list Scholarship Time table The “Student” entity can be defined in the form of database modeling as follows: Student (STUD_NO, STUD_NAME, STUD_GENDER, STUD_DOB, STUD_ADDR, STUD_TEL_NO) The name STUDENT indicates the name of entity. The fields in parenthesis indicate the attributes of this entity. The above definition of entity can be used to construct a relation easily. All attributes in the parenthesis are converted into columns of relation as follows. COLUMNS VvvvVYv Stud_no | Stud_name | Stud_dob I Stud_addr | Stud_tel_no ] Rows | ->——__} Attributes in the above figure are called columns of table. All occurrences of records are knows as rows. The rows are also known as tuples. The following table or relation can be constructed as part of a database by using STUDENT entity. Qa Write the properties of relation. | STUD_NO | STUD_NAME| STUD_DOB | STUD_ADDR | STUD_TEL_NO Adeel 15-04-1980 | Lahore __| 123456 Shakeel 26-05-1994 | Faisalabad 456789 Ans. A relation or a table is the basis of relational DBMS, by definition must have Idrees 11-09-1982 Layyah 789123 certain inherent characteristics that form the basis for its underlying strength and flexibility. These characteristics are: 1. No duplicate rows exist 2. The order of rows is insignificant 3. The order of columns is insignificant 4, Columns/attributes are all elemental or atomic ee Rom Ene a————___ No puplicate Rows Exist: SY. to 'Y to put two rows (records) for the same entity (eg finition of ion that ther % what a relation re si by definitio! ‘© must be a Unique key for each row in a sclalonhatie as it says ‘able. The Order of Rows is Insignificant: There is no orderin, i - syentation of the ei OF Sequencing of the rows in the tables. The relational imple S support all required access mechanism ie, it is not necessary to sequence the rows according to the key field, : The Order of Columns is Insignificant: Again, the order of the columns/attributes in defining a relation/table has no significance. The later insertions of the columns are made at end of the existing columns by the system itself. System acquires the data (of columns) by their names. Columns/Attributes are all Elemental Atomic: All the intersections of rows and columns must have a (single) value. The nulls are inserted by the system at the time of later intersection of a columns, which should immediately be replaced by zeros/spaces or valid values for that particular column. J Datta Ware he aig: A dota wore housing K% a Lechrniajue fe Collecting and managing dota ftom Nakious Aourcer “to Provide meeninsytul lausiness insight Data Visualization: Data visualiaation | We hical H Ligation % Kraprical Aehentatio et an porrnation end docka. Gy tig Niel ich elements dike charts, Ginphs Bod, SH date visualization trols phovide an apy tp see ond endersta a. tanol tends, patlerrs in data.

You might also like