UNIT - 3 Revision Notes
UNIT - 3 Revision Notes
UNIT - 3 Revision Notes
The software that is used to create, update and retrieve data is known as database management
system (DBMS).
Some of the common examples of DBMS are MS Access, Open Office or LibreOffice Base,
Oracle, Ingress, MySQL.
DBMS - Database Management System
RDBMS - Relational Database Management System. In RDBMS data organized into tables.
Flat File: Data stored in a single table. Usually suitable for less amount of data.
Relational: Data stored in multiple tables and the tables are linked using a common field.
Relational is suitable for medium to large amount of data.
Database server:
Database servers are dedicated computers that hold the actual database and run only the
DBMS and related software. Typically databases available on the database servers are accessed
through command line or graphic user interface tools referred to as Frontend; database servers
are referred to as Back-ends. Such type of data access is referred to as a Client-server model.
Advantages of Database:
Organized Storage
Sharing of Data
Reduces Data Redundancy
Data Consistency
Data Analysis
Data security
Data Integrity
Backup and Recovery
Data Model is the structure of database and it describes the manner in which data will be stored
and retrieved.
In Hierarchical Data Model, the data is organized into a tree like structure. The data is stored in
the form of linked records.
In Network Data model, multiple records are linked to same master file.
The Relational data model is based on the principle of setting relationships between two or
more tables of the same database.
Let us get familiar with some of the common terms used in RDBMS.
A table is a collection of logically related records. It is organized as a set of columns, and can
have any number of rows.
A field is the smallest entity in the database. These are individual record characteristics and are
presented as columns within a table.
Data values are the raw data represented in numeric, character or alphanumeric form.
The data values for all the fields related to a person or object is called a record. It is presented as
rows within a table.
Foreign Key – If a field or a combination of fields of one table can be used to uniquely identify
records of another table, then that particular field is known as the foreign key. This foreign key
helps to build a relation between two tables.
All the field values that are eligible to be the primary key are the candidate keys for that table.
Out of the candidate keys, one or two are made as primary keys. The others are the alternate
keys.
Objects of an RDBMS:
An object in a database is a structure or a feature that is used to store, represent or retrieve data.
The various objects in a database are tables, forms, reports and queries.
A table is the basic unit of any DBMS. The data is first stored in tables in row and column
format. A column represents a field or an attribute while a row represents a record.
A form is a feature of a database using which we can enter data in a table in an easy and user
friendly manner.
7. How many types of relationships can be created in Base? Explain each of them.
There are three types of relationship in LibreOffice Base.
ONE to ONE: In this relationship, both the tables must have primary key columns. Example: In the
given tables EMP and DEPT, EMP_ID in EMP table and DEPT_ID in DEPT table are the primary keys.
ONE to MANY: In this relationship, one of the table must have primary key column. It signifies that
one column of primary key table is associated with all the columns of associated table.
MANY to MANY: In this relationship, no table has the primary key column. It signifies that all the
columns of primary key table are associated with all the columns of associated table.
19. A table named School (containing data of students of the whole school) is created, where each
record consists of several fields including AdmissionNo (Admission Number), RollNo (Roll
Number), Name. Which field out of these three should be set as the primary key and why?
AdmissionNo should be set as primary key because admission numbers are unique for each and every
students of the school, which is not possible in the case with RollNo and Name.
20. Why Memo data type is preferred over Text data type for a field?
When the length of the field is more than 255 characters. Text data type is not capable to store the
project description because its length cannot be more than 255 characters so, Memo data type is
preferred over Text data type.
23. Write one example of data field for which you would set the Required property to Yes.
In a table, when we declare a field as a primary key, then the field’s Required property must
be set to yes because in a primary key field, we need to enter data always.