What is a database for class 10?
Teachers and Examiners (CBSESkillEduction) collaborated to create the Database Management System Class 10 Notes. All the important Information are taken from the NCERT Textbook Information Technology (402). Show
Contents show 1 Database Management System Class 10 Notes 1.1 What is Database? 1.2 What is a Database Management System? 1.3 What is Database Server? 1.4 Advantages of Database 1.4.1 Reduces Data Redundancy 1.4.2 Sharing of Data 1.4.3 Data Integrity 1.4.4 Data Security 1.4.5 Privacy 1.4.6 Backup and Recovery 1.4.7 Data Consistency 1.5 Features of Database 1.6 Primary Key, Composite Primary Key and Foreign Key in a Database 1.7 What is RDBMS? 1.7.1 Database Objects 1.7.1.1 Tables 1.7.1.2 Columns or Fields or Attributes 1.7.1.3 Rows or Records or Tuples 1.8 How to create a database using Open Office 1.9 How to create a table in Database 1.9.1 Create Table in Design View 1.9.2 Use Wizard to Create Table 1.10 Data Types 1.10.1 Numeric Types 1.10.2 Alphanumeric Types 1.10.3 Binary Types 1.10.4 Date Time 1.10.5 Other Data Types 1.11 Session 3 : Perform Operations on Table 1.11.1 Insert Data in the Table 1.11.2 Editing Records in the Table 1.11.3 Deleting Record From the Table 1.12 Field Properties 1.13 Sorting Data 1.14 Referential Integrity 1.15 Session 4 : Retrieve Data using Query 1.15.1 DDL Statements: 1.15.2 DML statements: 1.16 Database Query – 1.16.1 Select Statement 1.16.2 Query related to Simple Select Statement – 1.16.3 Query related to Select Statement with Mathematical function – 1.16.4 Query related to Select Statement with Where clause – 1.16.5 Query related to Select Statement with Order by – 1.16.6 UPDATE statement 1.16.7 Create Table 1.16.8 Insert Table 1.17 Session 5 : Create Forms and Reports using Wizard 1.18 Forms 1.18.1 Reports Database Management System Class 10 NotesWhat is Database?A database is an organized collection of data. You can visualize it as a container of information. A database is a structured grouping of data that has been arranged and is often kept electronically in a computer system. A database management system used to manage a database (DBMS). What is a Database Management System?Data is stored, retrieved, and analyzed using software called database management systems (DBMS). Users can create, read, update, and remove data in databases using a Database Management System, which acts as an interface between them and the databases. For example – Oracle, IBM DB2, Microsoft SQL Server, Microsoft Access, PostgreSQL, MySQL, FoxPro, and SQLite. Data can be organized into two types:
What is Database Server?Database servers are specialised machines that exclusively operate the DBMS and associated applications. They contain the actual databases. Database servers are known as Back-ends, while Frontends are programmes with a command line or graphical user interface that are used to access databases that are available on them. A client-server model is the name given to this kind of data access. Advantages of DatabaseReduces Data RedundancyMultiple files are contained in database management systems and must be stored in various places inside a single system or even across multiple systems. This resulted in data redundancy as there were occasionally multiple copies of the same file. (Note – Data redundancy happens when the same piece of information appears more than once, but data inconsistency happens when the same information appears in various formats across various tables.) Sharing of DataA database allows its users to exchange data among themselves. The data can only be shared with users who have received the appropriate degrees of authorization because there are different levels of access to the data. Data IntegrityData accuracy and consistency in the database are terms used to describe data integrity. A DBMS contains many databases, therefore data integrity is important. Data that is accessible to many users is present in each of these databases. In order to ensure that the data is accurate and consistent throughout all databases and for all users. Data SecurityA database’s concept of data security is important. The database should only be accessible to authorised users, whose identities must be verified using a username and password. PrivacyThe privacy rule in a database states that only the authorized users can access a database according to its privacy constraints. To secure data levels are set in the database and a user can only view the data which is allowed to be seen. For example – In social networking sites, access constraints are different for different accounts a user may want to access. Backup and RecoveryAccording to its privacy limitations, a database’s privacy rule states that only authorised users are permitted access. A user can only view the data that is permitted to be seen, and levels are configured in the database to secure data. For instance, on social networking sites, different accounts that a user may want to access have varying access restrictions. Data ConsistencyData consistency states that different versions of the same data shouldn’t match. All data must be identical for every user viewing the database and must be shown consistently throughout. Additionally, there are no data inconsistencies because all users immediately see the effects of any database changes. Database Management System Class 10 Notes Features of DatabaseThere are some key features of a database:
Primary Key, Composite Primary Key and Foreign Key in a DatabaseIn the RDBMS data can be integrated using keys. These are Primary Key, Composite Primary Key, and Foreign Key, Key are used to make the relationship between the tables.
What is RDBMS?A database management system that is based on the relational model is called an RDBMS (Relation Database Management System). Tables are used to organise data in relational databases. A relational database management system (RDBMS) is used to store, manage, query, and retrieve data. Database ObjectsTablesData is arranged into rows and columns in a table, which is a type of data structure. It can be applied to both the storage and presentation of structured data. Columns or Fields or AttributesData is arranged vertically from top to bottom in columns. Each row of the table has one column, which is a collection of data values of a specific basic type. The structure by which the rows are put together is provided by the columns. Rows or Records or TuplesA row, also known as a Record or Tuple, in a table represents a single data item. A database table can be represented graphically as being made up of rows and columns, or fields. Every row in a table has the same structure and represents a group of connected data. Database Management System Class 10 Notes How to create a database using Open OfficeStep 1 : Click on Start > Programs > OpenOffice > OpenOffice Base Step 2 : Click on Create a new database Step 3 : In the Database Wizard, Click on Finish Step 4 : Specify a the Name of database and click on Save How to create a table in DatabaseThe database’s tables are used to store data. In the database, In OpenOffice Base the tables can be created in two different ways.
Create Table in Design ViewStep 1 : Click on Create Table in Design View Use Wizard to Create TableStep 1 : Click on Table > Use Wizard to Create table Step 2 : Click the Select Fields > Choose Category > Select the table > Click on Next Button Step 3 : Select data types from the given field Step 4 : Set the Primary Key Step 5 : Rename the table and Click on Finish Database Management System Class 10 Notes Data TypesThe type of data (value) that will be stored in the database is defined by its datatype. Important to know the different types of data helps to ensure that each property’s value is as expected and that data is collected in the correct format. Data types in OpenOffice base are broadly classified into five categories listed below.
Numeric TypesData that is presented as numbers rather than in any language or descriptive form is referred to as numerical datatype. Numerical data, also known as quantitative data, is gathered in number form and differs from all other types of number data because it can be calculated mathematically and statistically. Alphanumeric TypesData that has both letters and numbers is referred to as alphanumeric type. Binary TypesFor storing data in binary formats, binary data types are utilised. In a database, binary data types can be used to store things like music and image files. The binary data type can generally be used to store files in any format. Date TimeWhen specifying date and time values for a column used in a database table, date time data types are used. Information like dates of birth, admissions, product sales, and other dates can be stored in databases using date and time data types. Other Data TypesDatabase Management System Class 10 Notes Session 3 : Perform Operations on TableIn Base, data is kept in tables that may be added to, changed, or deleted by using the proper options. Insert Data in the TableStep 1 : Select the table > Double click on it Editing Records in the TableStep 1 : Select the table > Double click on it. Deleting Record From the TableStep 1 : Select the table > Double click on it. Field PropertiesTo modify the field’s attributes It is necessary to modify the table structure in design view. The following actions will be taken to set the field’s properties: Select the table > Right click > Select the option Edit > the table Design View window will open Following are some properties of data of the numeric type: 1. AutoValue – if set to yes then field will get the auto numeric values. Following are some properties of data of the character type: 1. Entry Required – if set to yes then it will be must to insert the value in the field which means that field cannot be left blank. 3. Default Value – A default value can be set for a field if user don’t provide any value while entering the values in the table. Sorting DataSorting means to arrange the data in either ascending order of descending order. Sorting is the process of putting data into a meaningful order so you can evaluate it more efficiently. Referential IntegrityThe relationship between tables is referred to as referential integrity. Referential integrity is used to maintain accuracy and consistency of data in a relationship. In Base, data can be linked between two or more tables with the help of primary key and foreign key constraints. Referential integrity helps to avoid: 1. Adding records to a related table if there is no associated record available in the primary key table. Creating and Editing Relationships between Tables An association or link between two or more tables is referred to as a relationship. You don’t have to enter the same data again in different tables when you relate two tables. Relationships between tables helps to
Type of Relationships in Database There are three types of relationships which can be created in tables: 1. ONE to ONE ONE to ONE In this relationship, both the tables must have primary key columns. ONE to MANY OR MANY to ONE 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. Remove the Relationships With the use of the Delete option, the relationships that have been applied to the tables can also be deleted. Session 4 : Retrieve Data using QueryIn order to describe the data structure and to modify the data in the database, queries are used as instructions. A query enables the joining and filtering of data from various tables. Database Languages having two type:
DDL Statements:
DML statements:
Database Query –Query is a computer languages. In order to describe the data structure and to modify the data in the database, queries are used as instructions. Query can extract particular data from a database. We can filter and join data from various tables with the help of a query. By using the criteria you supply query will filter the data. Select StatementA select query is a language in a database that displays data in Datasheet view. Data from tables is displayed by a query rather than being stored by it. A query may display data from one or more tables, from other queries, or from both of these sources simultaneously. The SELECT statement has many optional clauses:
Syntax of Select Statement is –
Query related to Simple Select Statement –Table Name – product Product_NoProduct_NamePriceQuantity25Soap408031Powder803045Shampoo2502552Soap Box120100Database Management System Class 10 NotesQuestion – Write a Query to display all record from the table;
Output – Product_NoProduct_NamePriceQuantity25Soap408031Powder803045Shampoo2502552Soap Box120100Database Management System Class 10 NotesQuestion – Write a Query to display product name from the table;
Output – Product_NameSoapPowderShampooSoap BoxDatabase Management System Class 10 NotesQuestion – Write a Query to display Product_Name and Price from the table;
Output – Product_NamePriceSoap40Powder80Shampoo300Soap Box120Database Management System Class 10 NotesQuery related to Select Statement with Mathematical function –Table Name – product Product_NoProduct_NamePriceQuantity25Soap408031Powder803045Shampoo2502552Soap Box120100Database Management System Class 10 NotesQuestion – Write a Query to find the total no of quantity available in table;
Output – 235 Question – Display the total amount of each item. The amount must be calculated as the price multiplied by quantity for each item.
Output – Product_NoProduct_NamePrice*Quantity25Soap320031Powder240045Shampoo625052Soap Box12000Database Management System Class 10 NotesQuestion – Write a query to find the average price of the total product;
Output – 58.75 Query related to Select Statement with Where clause –Table Name – product Product_NoProduct_NamePriceQuantity25Soap408031Powder803045Shampoo2502552Soap Box120100Question – Write a Query to display the product whose price is less than 90
Output – Product_NoProduct_NamPriceQuantity25Soap408031Powder8030Database Management System Class 10 NotesQuestion – Write a Query to find the total amount of the Shampoo product;
Output – 6250 Or
Output – Product_NoProduct_NamPrice*Quantity45Shampoo6250Question – Write a Query to display the data whose quantity is equal to 80.
Output – Product_NoProduct_NamPriceQuantity25Soap4080Database Management System Class 10 NotesQuestion – Write a Query to display a list of Products whose Price between 40 to 120.
Output – Product_NoProduct_NamPriceQuantity25Soap408031Powder803052Soap Box120100Query related to Select Statement with Order by –Table Name – product Product_NoProduct_NamePriceQuantity25Soap408031Powder803045Shampoo2502552Soap Box120100Question – Write a Query to display the list of Product_Name in alphabetical order.
Or
Output – Product_NoProduct_NamPriceQuantity31Powder803045Shampoo2502525Soap408052Soap Box120100Database Management System Class 10 NotesQuestion – Write a Query to display the list of Price in ascending order.
Or
Output – Product_NoProduct_NamPriceQuantity25Soap408031Powder803052Soap Box12010045Shampoo25025Question – Write a Query to display the list of Price in descending order.
Output – Product_NoProduct_NamPriceQuantity45Shampoo2502552Soap Box12010031Powder803025Soap4080UPDATE statementTo edit or update already-existing records in a table, use the UPDATE statement. Using the WHERE clause, you can either define a specific subset of entries to edit or use it to update everything at once. Syntax of Update Statement –
Table Name – product Product_NoProduct_NamePriceQuantity25Soap408031Powder803045Shampoo2502552Soap Box120100Database Management System Class 10 NotesQuestion – Write a Query to update the price of Shampoo in the product table.
Output – Product_NoProduct_NamePriceQuantity25Soap408031Powder803045Shampoo3002552Soap Box120100Question – Write a Query to update the Quantity of Powder in the product table.
Output – Product_NoProduct_NamePriceQuantity25Soap408031Powder805045Shampoo2502552Soap Box120100Database Management System Class 10 NotesCreate TableTo create a new table in the database you can use Create Table Command. Syntax of Create Table –
Question – Write a Query to create the following table in the database; Table Name – product FieldDataTypeProduct_NoIntegerProduct_NameVarchar(20)PriceIntegerQuantityIntegerDatabase Management System Class 10 Notes
Output – Product_NoProduct_NamePriceQuantityDatabase Management System Class 10 NotesInsert TableInsert statement is primarily used to add a single or more rows to the target table. Syntax of Insert Table –
Or
Table Name – product Product_NoProduct_NamePriceQuantity25Soap408031Powder803045Shampoo2502552Soap Box120100Question – Write a Query to add a new row with the following details (72, “Hair Conditioner‟, 350, 60)
Or
Output – Product_NoProduct_NamePriceQuantity25Soap408031Powder803045Shampoo3002552Soap Box12010072Hair Conditioner35060Database Management System Class 10 NotesSession 5 : Create Forms and Reports using WizardFormsThe Form allows you greater control over your outcomes. The form allows you to customize various parts of the form’s design and then generates a form based on your instructions. Steps To Create Form Using Wizard Step 1 : Click Use Wizard to Create Form Step 2 : Select the selective Fields using Arrow button Step 3 : Click Next Step 4 : Add Subform if you need to insert Step 5 : Click Next Step 6 : Arrange selected field in a form Step 7 : Click Next Step 8 : Click Finish ReportsA report helps in the presentation of data in a summarized format. It is utilized to create a clear format for the entire work product. In the database, you can build reports. What is database Short answer?A database is information that is set up for easy access, management and updating. Computer databases typically store aggregations of data records or files that contain information, such as sales transactions, customer data, financials and product information.
What is DBMS it class 10?A database management system (DBMS) is a computer program designed to manage a large amount of structured data, and run operations on the desired data requested by the users.
|