Database X Full 1
Database X Full 1
DBMS Software
Application Programs
Components of Database
The major components of database are as follows:
1. Data:
It is raw numbers, characters or facts represented by value. The data acts as a bridge
between the hardware and the software.
2. Software:
It is a set of programs that lies between the stored data and the users of database. It is
used to control and manage the overall computerized database. It uses different types
of software such as MySQL, Oracle etc.
3. Hardware:
It is the physical aspect of computer, which consists of the secondary storage devices
such as magnetic disks, optical discs etc., on which data is stored.
4. Users:
It is the person, who needs information from the database to carry out its primary business
responsibilities.
The various types of users which can access the database system are as follows:
iii.) End-user
A person, who interacts with the database system to perform different operations on the
database like inserting, deleting etc., through menus or forms.
Advantages of DataBases
1. Reduce data redundancy Redundancy means ‘duplication of data’.
2. Enforcing data integrity It means that the data contained in the database is
accurate and consistent.
3. Data sharing The data stored in the database can be shared among multiple
users or application programs.
4. Data security The DBMS ensures that the access of database is done only
through an authorized user.
5. Backup and recovery The DBMS provides backup and recovery sub-system that is
responsible to recover data from hardware and software failure
Disadvantages of a Database/DBMS
1. Complexity A database system creates additional complexity and requirements.
2. Database failures If database is corrupted due to power failure or it is corrupted
on the storage media, then our valuable data may be lost or the system will stop
working.
Relational Database: When the data is stored in multiple tables that are linked via common
fields, then such a database is called Relational Database. Eg. MS Access,
BASE,Oracle,MySQL etc.
Open Office BASE
1. Base is a popular RDBMS system that manages data in terms of special tables called
relations.
2. Base is also known as OpenOffice.org BASE or simply OOo BASE.
3. The database file of BASE is stored with extension .odb.
4. Base offers following features to manage the data:
Tables, Queries, Forms, Reports.
Fields/Attributes
Record/Row/Tuples
It represents single of data item in a table. Record of a table is also known as row, entity or tuple.
Queries
It allows you to extract information from the database based on the conditions that you define in query.
Forms
In a database, a form is a window or a screen that contains numerous fields or spaces to enter data.
Reports
When you want to print those records which are fetched from your database, design a report.
Key Field
The key is defined as the column or the set of columns of the database table which is used to identify
each record uniquely in a relation, e.g. if a table has id, name and address as the column names then
each one is known as the key for that table. Types of Key Fields:
1. Primary Key
A field or a set of fields that uniquely identify each record in a table is known as a primary key.
Properties:
Primary key must contain unique values. A primary key column cannot have NULL values.
2. Candidate Key
The set of all attributes which can uniquely identify each tuple of a relation are known as candidate
keys. Each table may have one or more candidate keys and one of them will become the primary key
3. Alternate Key
From the set of candidate keys after selecting one of the key as a primary key, all other remaining keys
are known as alternate keys.
Foreign key
A field of a table (relation) that references the primary key of another table is referred to as foreign key and it
is use to link two tables.
Foreign key
RDBMS
Relational database is a collective set of multiple data sets organized by tables, records
and columns. Relational database establish a well-defined relationship between
database tables. A Relational database use Structured Query Language (SQL).
Stores up to
iii. Long Varchar maximum length
(same as varchar)
i. Date
iii.Timestamp
To start Base database
i.) Click on start button → All Programs → OpenOffice → OpenOffice Base → Database wizard
window will open → Click on Create a new database → It will open a Base window.
ii.) Click twice on open Office icon → select openoffice base from the window → Database wizard
window will open → Click on Create a new database → It will open a Base window.
To create table in table wizard, we’ll use SQL and DDL commands
SQL-Structured Query Language
DDL-Data Definition Language
2. To Delete a record:
i.) Open the table in Datasheet view.
ii.) Select the record by clicking on it or by clicking gray button, present at extreme left
of the record.
iii.) Click Edit → Delete command and record will be deleted. To delete multiple
records, select the records needs to be deleted by holding shift key.
Table: Student10
3. To Update a record:
Syntax:
Update table <tablename>
set<columnnname1>[columnname2,columnname3….]=<newvalue>[newvalue2,newvalu
e3...]
Where <condition>;
Example:
Update table “student10”
Set class = x
Where name=adtitya;
4. To retrieve a record from database:
i. Syntax:
Select * from <tablename>
Example:
Select * from “student10”
Note: Here * represents all columns are selected. We can specify column
name as well which we want to retrieve.
ii. Select command have two clauses with it which are completely optional.
a. Where clause: use to specify a condition to retrieve data from database.
b. Order by clause: use to arrange the records in ascending or descending
order.
Example: Select “name” from “student10” where “class” = ‘x’
Forms
Forms are the objects that are used to get data from user in interactive manner.
Forms provides user friendly interface to enter data and the entered data is stored in the tables of the
database.
Use Wizard to Create Forms
1. Open the database → Select Forms button from the left pane → Click Use wizard to create
Forms.
2. Query Wizard window will open
3. Select the concerned table and Fields to be included in the Form. Click Next.
4. Now it will ask for adding subforms, since we creating simple forms so, will directly select next
button.
5. Choose the arrangement or layout for the form.
6. Next, select if you want to use form for data entry or display purposes.
7. In the next step, select the appearance/look by adopting different styles like color, border
etc.-->click next.
8. Specify name for the form and Click finish.
Reports
A report helps to display the data in a summarized manner. It is used to generate the overall work
outcome in a clear format. It is a very useful tool for decision-making and analysis.