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

Create and Edit Tables Using Wizard and SQL 11

Uploaded by

Kanha jain
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

Create and Edit Tables Using Wizard and SQL 11

Uploaded by

Kanha jain
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Create and edit tables

using wizard and SQL


Introduction to an RDBMS
A relational database management system (RDBMS) is a collection of
programs and capabilities that enable IT teams and others to create,
update, administer and otherwise interact with a relational database.
RDBM store data in the form of tables, with most commercial relational
database management systems using Structured Query
Language (SQL) to access the database. However, since SQL was
invented after the initial development of the relational model, it is not
necessary for RDBMS use.

The RDBMS is the most popular database system among organizations


across the world. It provides a dependable method of storing and
retrieving large amounts of data while offering a combination of system
performance and ease of implementation.

RDBMS stands for Relational Database Management Systems. It is


basically a program that allows us to create, delete, and update a
relational database. A Relational Database is a database system that
stores and retrieves data in a tabular format organized in the form of
rows and columns. It is a smaller subset of DBMS which was designed
by E.F Codd in the 1970s. The major DBMSs like SQL, My-SQL, and
ORACLE are all based on the principles of relational DBMS.
Objects of database
The main database objects in MS access are as follows:

 Table
 Query
 Forms
 Reports

The table in the database is used to store and organized data in the
database. The query in the database is used to recover data from the
database.

Tables
In tables, data is organized in rows and columns. Rows are arranged
horizontally and columns are arranged vertically. Rows are also known
as records in a database. Information related to every object is stored in
the row. Rows are subdivided into the field.

Queries
A query in the database retrieves the information from the database
means it selects the required result from the database. The information
is retrieved according to the user requirement means according to the
given criteria. It is the best way to choose, filter, and sort the record.

SQL is the most commonly used language for queries. In the database,
the user can also change the data by the query. It is also used for the
calculation of the different fields.
In a query, data is viewed and analyzed in multiple ways. It is actually
the result of stored requests and questions. They are designed in the
Design view of MS Access.

RegNo Name Class

25 Sonia MSc

55 Sidra BSc

54 Muneeb FSc

Forms
The forms are reports are important features of a database system.
Almost all database systems provide these facilities A graphical interface
used to interact with a database is called a form. Forms are used to
enter data into the database. A form typically consists of textboxes,
labels, buttons, and other graphical objects. These objects enable the
user to interact with the database in an easy and user-friendly way.
The user can also retrieve, change, delete, and update data by using
forms. Application programmers create the user interface by designing
forms in different ways to meet the specific needs of their project or
company.

Advantages of forms

Some important advantages of forms are as follows:

 Forms are easy to use


 Forms use a graphical interface that is attractive
 The user can interact with the database without technical
knowledge

Disadvantages of forms

 Important disadvantages of forms are as follows.


 The data in the form cannot be formatted.
 The forms are only used on a computer screen.

Reports
Reports are one of the most important features of database applications
as they provide a way to retrieve and present data in a formatted
manner. Reports can be generated in various ways depending on the
needs of the user and may contain different types of information such as
graphs, charts, and tables.

Reports are often used to make critical decisions by businesses and


organizations. Reports can be printed and sent to different people as
needed.
Advantages of report

Some important advantages of the report are as follows:

 Reports provide quick results from the database.


 Reports help in making important decisions.
 Reports can display processed data using graphs and charts etc.
 Reports can be printed or e-mailed easily.

Disadvantages of report

Some important disadvantages of the report are as follows:

 The data in the report cannot be modified.


 The user cannot add new data using the report.
 The data in the report cannot be deleted.

Field
A field is the smallest unit of data in a database. It represents a single
attribute or property of an entity.

Each field in a database table is designed to store a specific type of


information. For instance, in a table storing information about
employees, fields might include "Employee ID," "FirstName,"
"LastName," "Department," and "Salary."

Fields have a data type associated with them, such as text, number,
date, or other specific types depending on the nature of the data they
are meant to store.
Record
A record, also known as a row or tuple, is a complete set of related fields
that represents a single entry or instance of data in a database.

In the employee table example, a record would consist of all the


information associated with a specific employee. Each field in the record
would hold a specific piece of information about that employee, such as
their ID, name, department, and salary.

Records are horizontally organized in database tables. Each row in the


table represents a unique record, and the columns represent different
fields.

Steps to create a table using table wizard,


Data types in Base
1. Open Base: Launch LibreOffice and select Base from the main
window.

2. Create a Database: If you haven't already, create a new database


by clicking Create a New Database. Choose a location and
filename, then click Create.

3. Open Table Wizard: In the Database window, click Tables in the left
pane. Then, click the Use Wizard to Create Table button on the
toolbar.
4. Select Table Category: Choose a category that best fits your data,
such as "Business" or "Personal". Click Next.

5. Select Sample Table: Select a sample table template that closely


resembles your desired data structure. Click Next.

6. Add or Remove Fields: Review the pre-selected fields in the right


pane. Use the > and < buttons to add or remove fields based on
your needs. Click Next.

7. Set Primary Key: Choose a field that uniquely identifies each


record in your table. This will be the primary key. Click Next.
8. Specify Relationships (Optional): If you want to link this table to
other tables in your database, you can define relationships here.
Otherwise, click Next.

9. Table Name and Summary: Enter a descriptive name for your table
and an optional summary. Click Finish.

10. Review and Edit Table: Base will create the table based on
your choices. You can now review the table structure in Design
View and make any necessary changes.
Option to set the primary key
1. Understand the Purpose: A primary key is a unique identifier for
each record in a database table.
It ensures that each row in the table is distinct.

2. Choose a Suitable Column: Identify a column or a combination of


columns that uniquely identifies each record.
Commonly, a single column with unique values is chosen.

3. Specify the Primary Key Constraint: Use the SQL command or the
database management system's interface to declare the primary
key constraint on the chosen column(s).
Ensure Uniqueness: Verify that the chosen column(s) do not
contain duplicate values.
If duplicates exist, resolve them before setting the primary key.

4. Consider Auto-Incrementing (Optional): If applicable, consider


setting the primary key column to auto-increment, so each new
record gets a unique value automatically.

5. Verify Constraints: Confirm that the primary key constraint is


successfully applied without violating any existing data rules.

6. Document: Make a note of the chosen primary key column(s) for


reference and documentation purposes.
7. Test: Execute test scenarios to ensure the primary key works as
expected and enforces uniqueness.

8. Consider Foreign Keys (Optional): If the table is related to other


tables, consider setting up foreign key constraints to establish
relationships.

9. Review and Adjust as Needed: Periodically review the primary key


choice to ensure it still meets the evolving needs of the database.

DDL Commands in SQL


DDL is an abbreviation of Data Definition Language.

The DDL Commands in Structured Query Language are used to create


and modify the schema of the database and its objects. The syntax of
DDL commands is predefined for describing the data. The commands of
Data Definition Language deal with how the data should exist in the
database.

Following are the five DDL commands in SQL:

1. CREATE Command
2. DROP Command
3. ALTER Command
4. TRUNCATE Command

You might also like