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

Base notes class 10

follow me on insta MEET edits

Uploaded by

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

Base notes class 10

follow me on insta MEET edits

Uploaded by

aaryanshukla989
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Open Office Base

Data : Data refers to the collection of raw facts or figures, numbers and quantities.
Information : It is processed data which helps in decision making.
Database : Database is a organised collection of interrelated data stored together to
serve multiple applications
Database Server : A dedicated computer that serve as an interface between the
database and the user or application program.
Basic Concept of a database:
1. A database can have one or more tables
2. Each table in a database contains information about one type of item
3. Every table has a key field that uniquely identifies records of that table
4. It allows storing or manipulation data
5. It allows retrieving desired results from a database by querying it

RDBMS  Relational DataBase Management System


GUI  Graphical User Interface

Examples of DBMS / RDBMS :


Oracle, IBM Db2, MySQL, Ms SQL Server, MS Access, SQLite, Open Office Base

Features (Advantages) of Relational DataBase Management System :


1. Database reduces the data redundancy
2. Databases ensures data integrity and data consistency
3. Database facilitates sharing of data
4. Database provides data security
6. Automatically take care of backup and recovery.

Data Redundancy : Duplication of data is known as data redundancy


Sharing Data : Multiple users can operate the database at the same time allows
Data integrity : It means data is accurate and consistent in the database.
Data Consistency : It ensures data is not redundant/duplicate to all the users viewing database
Data Security : Only authorized users are allowed to access the database using a username
and password also known as data privacy.

Application areas of DBMS / RDBMS :


1. Banking System
2. Telecom
3. Railway & Airline Reservation
4. E-Commerce
5. Educational Sector
6. Social Media Platforms
7. Library Management
Types of Database : DataBase ar1e organized into two types:

1. Flat File Database :


Data is stored in a single table.
Usually suitable for less amount of data.
Example : MS-Excel , Open Office Calc

2. Relational Database : also known as DBMS or RDBMS


Data is stored in multiple tables and the tables are linked using a common field.
Relational database is suitable for medium to large amount of data
Example : MS-Access, Open Office Base

DataBase Objects 
1. Table : A table is a set of data elements organised using columns and rows.
2. Query : A query is defined as a request made to a database for retrieving required
information from the table.
3. Form : A form is a window or screen that contains field spaces to enter data, edit
and display it from a table or query.
4. Report : A report is a formal and formatted representation of data obtained as a
result of database queries.

Relational Data Model  In this model data is organized into tables.

Table Name : Product

Attributes also called as Fields

Item Code Item Name Qty on Hand Price


I001 UPS 50 2500
Tuples
I002 CD Drive 100 1000 Relation also
also called as
I003 CD Drive 70 800 called as
Records Table
I004 CD Writer 100 1700
I005 Laser Printer 50 7500

Domains 2500, 1000,


CD Drive, UPS,
called as 800, 1700,
CD Writer, Laser
Printer Pool of Unique 7500
Values
 Primary Keys : Field which uniquely identify the tuples, NO duplicates and NO nulls
Example : In the above table Item Code is a Primary key
 Candidate Key : Attributes that are capable of becoming a primary key are termed as
candidate key
 Alternate Key : Candidate Attribute that is not a Primary Key.
( Alternate key = Candidate key – Primary key )
Table Name : Houses

Candidate Keys Alternate Key

Primary Key House Code House Name Points


H1 Air 120
H2 Water 135
H3 Space 120
H4 Earth 129

 Composite Primary Key : A unique combination of more than one fields which together
function as Primary Key is known as Composite Primary Key.

Table Name : Order Details

Composite Primary Key

Supplier Code Product Code Qty Sold Bonus


S01 P1 20 400
S02 P2 15 350
S01 P2 12 290
S03 P1 19 390

 Degree : Total number of attributes or columns in a relation


 Cardinality : Total number of tuples or rows in a relation
 Foreign Key : A non-key attribute whose value is derived from primary key of some other
table is known as foreign key.
Table Name : Events
Foreign Key

Event Name House Code Position


Dance H3 First
Dance H2 Second
Music H4 First
Music H3 Second

 House code values in table events are derived from the table houses
 We cannot enter a house code value in table events which is not present in the table
houses.
 Example : Entering a house code H6 in table Events will generate error message
because this value is not present in table Houses

What is the degree and cardinality of the tables :-


1. Product 2. Houses 3. Order Details 4. Events
Steps for creating a Database:
1. Click on Open Office Base
2. Select Database  Database Wizard
3. Select option “create a new database” and click Next button
4. Select options “Yes, register the database for me” and “Open the database for
editing” and click Finish button
5. Give a name to database and click on Save button

Important Point : The file extension for Open Office Base is .odb (open database)
Data Types in Open Office Base
Field Properties :
1. Entry Required : If set to yes then the field cannot be left blank
2. Auto Value : If set to yes then field will get auto numeric value
3. Length : sets the no of characters / places to be stored in a field
Numeric  default length is varies according to the field type
Text Varchar  default length is 50 characters
Boolean  default length is 1 character
4. Default Value : Value automatically printed in field if user does not provide any value
5. Format : Helps to set the format of data entered in the field

Creating Tables :
There are two options to create tables in Open office base
1. Create table in design view
2. Use wizard to create table

Steps for setting the Primary Key :


1. Select the field
2. Right click on the grey area of that field
3. Select Primary Key option

Answer the following questions based on Hospital table given below :


HOSPITAL
No Name Department Gender
1 Sandeep Surgery M
2 Ravina Orthopedic F
3 Tarun Surgery M
4 Zubin ENT M
5 Ketaki ENT F

1. What is the degree and cardinality of the hospital table?


2. Write the Attribute names.
3. Write the third tuple values.
4. Write the domain of columns Department and Gender.
5. Identify the Primary Key
6. How many Primary keys a table can have?
7. What is the relation name?
Inserting or Editing records of a table :
1. Double click on table name
2. Table will open in Table Data View
3. Now insert a new record by clicking on Star on grey area OR edit any present record

Deleting Records from a table :


1. Double click on table name
2. Table will open in Table Data View
3. Select the record and click on Edit Menu  Delete Record option
OR
Select the record and right click on grey area and select option Delete Rows

Sorting Data of a table :


Sorting is arranging data in ascending order or descending order.
• Sort Ascending – Arrange data in alphabetical order (A to Z / Small to Large)

• Sort Descending – Arrange data in reverse order (Z to A / Large to Small)

Steps for sorting data:


1. Place cell pointer in the field (column) to be sorted
2. Click Sort Ascending or Sort Descending icon

Types of Relationships :
There are three types of relationships between tables.
 One – to – One Relationship  One record of a table is related to one record only
of another table. It is denoted as 1:1
Example -- A person can have only one driving license

1 1
Person Has Driving License

 One – to – Many Relationship  One record of a table has many matching


records in another table. It is denoted as 1:M
Example -- A teacher can teach many students

1 M
Teacher Teaches Students
 Many – to – Many Relationship  Multiple records of a table has many matching
records in another table. It is denoted as M:M
Example -- One Teacher can teach many Subjects and One Subject can be taught
by many Teachers.

M M
Teacher Teaches Subjects

Steps to create / delete relationships among tables :


1. Click on Tools menu  Relationships option
2. Select the desired tables from Add tables pop up
3. Drag desired matching field from one table to another table. The link is established
and shown in a form of a line/thread between tables
4. Right click on the thread and select delete if you want to delete the relationship

You might also like