Skip to content
  • YouTube
  • FaceBook
  • Twitter
  • Instagram

Data Analytics Ireland

Data Analytics and Video Tutorials

  • Home
  • Contact
  • About Us
    • Latest
    • Write for us
    • Learn more information about our website
  • Useful Links
  • Glossary
  • All Categories
  • Faq
  • Livestream
  • Toggle search form
  • How to create a combobox in tkinter Python
  • How to Group By in a Select Statement SQL
  • YouTube channel lists – Python Lists Python Lists
  • TypeError: ‘list’ object is not an iterator Python
  • What is data profiling and its benefits? data profiling
  • How to import data into excel Python Tutorial
  • How To Create An Empty Dictionary In Python python dictionaries
  • How To Validate Cell Values In Excel Python

create read update delete using Tkinter

Posted on January 17, 2021April 9, 2021 By admin No Comments on create read update delete using Tkinter

Estimated reading time: 3 minutes

CRUD ( create, read, update, delete) is a programming language acronym notably for how to manage updates to a database.

It is commonly used when talking about storing data on a database and follows the following rules:

  • The ability to create or add new records.
  • Be able to read and or retrieve the records.
  • If an update is needed, then allow those updates to be posted to the database successfully.
  • To ensure records are maintained correctly and deleted where a delete request is requested.

Generally speaking, with crud operations, it is related to persistent storage principles, more information can be found here basic functions of persistent storage (datacadamia.com)

Given these points when using graphical user interfaces, and trying to introduce crud functionality to your database applications, together with the design of the application, should yield:

  • Good database design.
  • Reducing complexity.
  • Eliminate duplication.
  • Have consistency.

We have spoken about the use of CRUD, but what are its benefits?

Security roles can be enabled

In addition, CRUD brings they bring structure to what actually can happen on a server, in essence, the ability to apply updates is managed tightly.

Helps put structure around what an application can do

Equally important, in building an application for use by users, knowing what they will do can prompt the designers to ask questions about what the user will actually do.

For example probably when Twitter was been designed, the things that probably where thought of :

Create a tweet – Functionality for the user to create and post a tweet, that gets saved to the database.

Read a tweet – Load all tweets from the database to the users interface.

Update – Allow a user to update their account profile or tweet timeline.

Delete – A user can delete their own tweets, their profile and or account.

Data flows between servers can be managed easier

Similarly, with the modern use of technology and processes moving online, data flows around between lots of people and organizations.

With this in mind, the need to send and receive data has to be managed more efficiently and securely.

As a result, data coming into the server can be controlled as to where it is received and updated. This can be accomplished by the security roles discussed above.

Using classes with CRUD

The use of Python classes is commonly seen in many applications, for this reason we have used them again below.

Uniquely classes will only help to enhance your computer programme and organization of code, as a result of removing duplication and simplifying the code.

Classes are a very useful way to manage the structure of your code, thus keeping everything centralized.

Sooner or later if this was not implemented the project would become too difficult to manage, and maintenance and updates would become difficult to manage.

In the below video we take you through the steps involved in applying this methodology, using an SQLite database.

We use Python Classes to manage the different requests by the user, the details can be found here

  • Main Tkinter window creation
  • Exporting data to Excel
  • Updating the records
  • Filter the records based on user choice
  • Deletion of a record.

When applying these updates, we have written the code that will apply the following SQL updates:

  • Select
  • Update
  • Insert
  • Delete

As can be seen these four SQL commands are the commonly used across any application to perform these requests in a CRUD application.

It is also important that your data types are synced between your Tkinter application and your SQL logic.

On our YouTube channel you can subscribe to find out more information about SQLite, SQL, Tkinter and many more tips and tricks!

class, CRUD, Python, SQLite Tags:classes, CRUD application, persistent storage, SQLite database

Post navigation

Previous Post: How do I fix TypeError: unhashable type: ‘list’ Error?
Next Post: String Manipulation in Python

Related Posts

  • How To Compare CSV Files for Differences CSV
  • how do I merge two dictionaries in Python? Python
  • Tkinter python tutorial Python
  • How to use parameters in Python Python
  • Python tutorial: Create an input box in Tkinter Python
  • TypeError: ‘NoneType’ object is not iterable class

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Select your language!

  • हिंदी
  • Español
  • Português
  • Français
  • Italiano
  • Python tutorial: Create an input box in Tkinter Python
  • How to Compare Column Headers in CSV to a List in Python CSV
  • TypeError: ‘str’ object is not callable Python Functions
  • how to add sine and cosine in python code numpy
  • How to group your data in Tableau data visualisation
  • TypeError object of type ‘int’ has no len() Python
  • How to save data frame changes to a file Python Dataframe
  • How to data cleanse a database table Python Data Cleansing

Copyright © 2023 Data Analytics Ireland.

Powered by PressBook Premium theme

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Cookie settingsACCEPT
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT