How to Create Student Database Management System using SQLite in python - Full Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi I'm welcome to student database management system the system is created using SQL light in Python so I'm gonna show you guys how it works okay we can always add new data say one odd pseudonym later there and enter a name let's say the name is inside it's the worst date of birth of West 2001 age maybe about 17 or maybe 18 and address of ginseng West I say he lives from now close mobile number of Bin's the worst they're all just need to do if you guys look here you'll notice strings converse is not there with an always click on pod and if you wanna check that out that's Kinsley waste today you can also search as we can see as you can see let's click on any of these and the details will be displayed there the other thing is if you play here weakness as Jim do you want to search for someone we can search for Sally display and just click on search there we go or we have we happen to have three records of Sally so that means we can delete if you want to so that's one gun we have another record of Sally supposing we want to change its very record of Sally you need to update that don't lay that let's change our record and let's say the name was supposed to be seen okay I'm Steve Arthur I need eight updates this happens to be a little bit similar age and I'm Steve needs to be male different address Johnny way so you can see what would happen now when we saved that okay let's see what's gonna happen here to Sully so add the new details oh okay update the new details okay that's Steve NOC Arthur right and let's do our view here you can see the other Sally's don't really have one solid year now and the other thing that we can do is we can always exit if you want so what I'm going to do now is take you guys into Python IDE development environment and we'll put one of these very advanced tutorial together so let's do that now guys and welcome to a student database management system this is going to be the front end so I'm just going to enter front end there call the tutorial is gonna be in two parts okay let's start by importing the following so from tkinter we import as import or I am also going to import the ticking time message dialog box now without message box okay and for each time we'll make up the database name of our Conover database you see as you notice I've just invented it out I'm going to make a holder database student database if you notice the ash key that means is commented out now the next thing I like to do is let's create a class and this class is going to be known as a student and type column there now let's define as follows so I'm gonna say self routes okay now the next thing I'll do is self comma root or sub dodge root as common here that with dot and dash b equals root now self dot root let me exit give me title and the title is going to be student database management system and you're a teen I'd like to add to you to be the German tree for my database for the German tree in this case is going to be less is going to be approximately 1,350 by 700 plus zero plus a zero the speedy coordinate hey now let's specify a back caller config oh I'll just say BG equals maybe candidate blue or the color back from coop right close that okay before I continue let me just close this whole interface so I will now save it and see how it looks like let's go to file save ours will go for students I have a folder for its students database system there we go as you can see there's nothing inside our system so let's just call it student database okay underscore front-end so I'm gonna save that now save there we go okay now let's try it out oh this an error look let's try it out and see how it looks like now that is saved there we go okay the next thing I would like to do is to define the following variables so the force parables that I intend to the fine is going to be St the our student tidy and the straighter b string ID string variable entire parentheses there I'm just gonna copy that across and use it to change orders okay I have eight in total this the next one is going to be first name surname also okay those are my variables in place the next you now like to do now is I'm going to now treat my friends and the first one is going to be the mainframe so this their frame is going to be using widgets frame and widget friend is going to be brush them to write inside self dot root comma I'm going to just chain a color that will make the color candidate blue as well both at the main frame itself let's put the main frame in on it.great that's great okay the next thing we want to do now is to I'm gonna define the title frame the title frame is going to be inside the main frame I'm gonna copy this and change this around and then give this a name is going to be known as tie to frame this would be no one has time to frame a swirl now that's for the title frame I would add a border this coming in yet are the borders with lesson BD and we made that too and I would get it parted excellent x-axis let's make that 54 and get it started again and why answers make that about it then you're a teen I intend to do is our change color changes we're about color to go SWAT right now one more thing relief it that would be rigid so I'm gonna get it packed because I don't intend to add any other things illicit and that would be at the top equals correct that is that sorted okay the next noun to do is inside is very frame I'm going to now add a label so it's going to be self-doubt LDL title it was level and this level is going to be inside txt frame and I will also add of fondants so that the size of the front and so on let's get this label spread you up so I'm gonna say dots breed I would run it and see how it looks like from now they would go right the next thing I want to do now is I'm gonna add add more bring walks then we get this one change bound rights my speeder up alright those are the are the frames that have added but let's run it and see then Alan seems to like IT sound like a title here and I try to here so let's close that now one other thing is let's just increase this font size so that you guys can see we're making about 12 for now alright - lets come right down here so we're I have the font and a force press up okay let's first of all let's change that su Lee them okay we change the frame to the labeled frame and I'll repeat the same thing for this one here so that man live out there I will also need to add funds to be so calm right here let's just call my girl for please depths there isn't mushroom so let's come right down here I'm here and the median will add my information so I can just see the text update is going to be let's say student student information [Applause] [Music] that's odd pirate responded right let's see how that that very water looks like they'll go to check seems to be too big dough let's reduce that to maybe about 20 so I'm gonna repeat it subtly the same thing for this here one day perhaps enter and just copy everything that I have [Music] so this can be student details let's see there we go so that's much better now alright close that the next thing I like to do now is to define my widgets a little copy DS n top level and tax lien and true widgets called labels okay okay to create my level widget since I've already created the label here I'm just gonna pop you dad's pissed it right underneath here and just change the fonts to drilling and in here this one is where one is going to be known as student ID this will be student ID as well so what we need need to do is to define the role equals in this case through all the strain of is 0 comma under column it's going to be 0 password I want it to be strictly west W right okay let's see what do we need to change we need to change all of this that should be student ID and this color okay I will leave it to us that little column what about padding let's get it planted us for a copy of this and maybe pista here and or would I be less say about two and this which was wrong you give us one to two now the other team is the frame so I want you to be inside data frame left copy that and just paste it right here okay I may have get it right so let's try it out and see right there guys this is how it looks now okay that's odd it takes widgets or as it's known and intra widgets copied ads it's that there this with a crunchy exchange just to make it look different tht you can always call your switch light and that is entry and this is going to be column this is a text box so when Gary the fall of these that becomes its variable and this text variable is going to be student ID remember the parable that I declared up here now so the other team is I'll get rid of all of this and let's add the width that is going to be maybe about 30 maybe jg9 and get rid of this route we don't in this part of the properties right okay let's save and run they would go that is my taste that is funny let's add a color that's fine I can now copy this across and repeat it for the others restrain the names around so this is going to be for Sony first name and surname [Music] and just change this rule this is rule number one 1 and 1 this will be fascinating I dismiss or name this changes [Music] and if this is one despit to think that should do it let's wrap see how it feels like there we go so what I'm going to do is just speed up up all of the design of the interface here here come back to you as Shockley okay I finish up with the test ant Antrim widget so let's run it and you guys see how it all moves like there we go now let's add a list box on Astro bar that come right down here then copy this first take it down now before my Lisp laughs this would be for me but Henry judge yet and this is for the list dogs right there okay describe our Faust and then call that stroll stroll back he goes scuba spoke a that what's true about it we jet it's always be the Asus always of the case right and it's going to be right inside right inside is very frame get a frame right now Stroh by itself now this position eight us it's gonna be in griddle dots I'm gonna make that zero yeah zero let's make it zero this puppy that they and this has been busy row and column is gonna be one this is strictly and I started right now the next thing is I'm going to create a list Travis man list box it was this box and this box is inside this as well okay is very listbox and say the width is about 41 and heights maybe about 16 then font let's copy this font as pasted it okay let's reduce that to about 12 font then I like it to be on the y-axis command equals schreiber Truvada set paste don't sex right and destroy barlas position it here are say the student list certainly is that great that would be I'm gonna copy all of these mr. Cheney and that's will be let's make that zero and get a pallet as well delete this say pad the detects access as that now this crowbar this should be pure kiss they'll still be America row by selfless daily from V not [Music] compete oh that will be command equals in the student list the student list is mine it's my list box Stanley's dot y axis V day and that's you hopefully to keep that alright so let's try it out creddies error field should be go scuba run and let's go alright finally let's add our buttons so right underneath here I'm gonna add the following bottle and missus self dot BT Thames are Delta equals button and this very button is going to be inside both in framed dad's name of the framework comma and the text are nate is going to be at me all right comma the fonts I'll make the point about winning as well pitch that today and what else what about fight copies this was meant to be height and I think I'm gonna need it with her slow so high top make them r1 and the wait maybe ten then a B D equals four days that's in eighth grade so I said that grade equals zero I'm very dubious okay let me run that and see how did but things look like then I'll take it from there there we go look at the buffing so I'll do these just copy that bottom of course and change the name around all right this would be there we'll go guys I think that's one more dead so I'm gonna change moving around and get back to you chuckling okay there we go guys those are the names so that's running till you see I Peaks like there we go so there's nothing happening now I'm going to close this and the next thing we want to do is to create the the back end and this is meant to be the name of the back end so might as well just copy the very name and abled is now get rid of that and let's do to fire let's make sure this is saved now let's open up a new file and this is verify that I've just opened I'm gonna save it ours so that will be saved as student okay student database and I'll call it underscore back-end let's meet the end 30 days right so I'm gonna save that now there we go all right that's my back-end so the first thing I'd like to do is to import sqlite3 and maybe let's enter comments here has called it call this back-end now I'm going to define the following function student data and data enter : and populace to end it with here they will do right now the first function is for me to connect to my SQL Lite 3 that's connect where do you want to connect to I wanna connect to students that's gonna be the name of my system dot DB right that's my database day just giving it a name is not on life it's not on the file yet this is the file because you can see a half front end and back end ok now the next thing I like to do is a saccharine thought execute and what do I want I like it to create as follows using the SQL command create a table if there is nothing there if nothing exists - ability if nothing exists create a table called student right and this table we also have an ID number that is going to be an integer as the primary key let's put a key here let's extend this now you guys can see what I'm about to do so the first one is going to be the force column is going to be student ID comma followed by or this student ID is going to be the data type will be 'text followed by s name and the data type for this first name is going to be text as well enter another comma then the next one I'm gonna call that name data type will be 'text now let's do for date of death the movie they put a backslash there so I can continue then the next one let me go for age paste then what about gender of the students next address on this very student there's the data time and finally the mobile number of my students and their clothes that's and close that so that's those are the columns I expect to be on the table the table student now the next thing is our like it's to connect the development and we then close it connect dots close that is my very first function now to make life easy this very first function I like to create another function that will display the data that I've just created and that encoded add student record and in there I want as follows the parentheses I want all of this information everything in here piss them dead and get rid of just their vwd type small digital I have to go here right and one way yeah okay what is do we need to do now gonna ask SQL to connect sir yes copy that is that in you SQL connected is very database okay and what else do we want you to do I need a constant current equals connect that console there and I want you to know is a cute okay career at an institution of the following which means add the following now what I want you to do is to insect inset into the student database for everybody unless say if there is no value that one would come my primary key and the rest question map that we will then follow for whatever data we have so that's one two three four five six seven eight then use that coma and I need the name of my database okay so let's get all of this and copy it all and just paste it here they would and let's close it now the next thing we want to do is let's ask you to carry out this operation and close their copy-paste they that is that taking care of now one more thing let's view this very guitar we can view it so the field is already time gonna copy all of this let's change this pass us a view view data and just copy this as sitting there and change area furniture changes so for the execution that would be select from okay let's say select from students okay select all from student and get rid of every single content to me right select from students so that we can view it now [Music] let it get in a row course Dogfish hold there we go and I'm gonna close it for some only displaying something I'm not finna convince anything then I can see would return all the time reduce right that is that taking care of one other thing I like to take care of now let me take care of mine delete delete delete record so I'm gonna copy all of this game and just change it to land based on us for the delete record I want claw so I want this to delete so changes to delete right so it's gonna be delete from student delete from student we so just say yeah ID equals say question mark day and make sure you enter it , and let's specify the ID and this ROM spelling of selects that's is that taking care of then what about G we needed to actually carry out the operations of P DS that's where the comments come in and pasted right there and we also close it there okay two other more functions in the back end area the sash function and the update function right here okay have a good look at those two functions okay but is back and nothing will happen if I do not call all of this function and the front end okay so I'm going to minimize this let's move it aside so that you guys can see what I'm what I'm calling right okay the first function that I'm gonna call let's let's end our function here paste and let's just change this to function [Music] right there and therefore that we gonna call maybe we should hold it we can just call the exit function let's call the exit function with us we'll call that B my exit I exit the cell equals tick in turn the message not message box dot that will be asked yes or no and what we will say is the name of my system will be student database so let me enter that in the copy of that first comma and my message to the end user is confirmed if you want to exit or not there we go now close that there is an if statement to validate the selection made if I exit greater than 0 then root dot destroy that means exit and return there we go that is my LG taking care now you see this very exit I'm gonna call exits holding my button here so the school right down and look for button X that is the Y here hang up to the corner there and enter command equals I exit so that is taking care of okay that's fine I'd like to try it out now but if I try it out there will be an error okay one of the errors is you can see the name of my back-end is called STD database on the score back-end which I don't have here don't have on this ball and right here let's make sure the spelling is correct right that is correct and my exit function okay all right if we run it now let's see if that's gonna work they click on exit no we do not want to exit yes we do want to exit so exit is out of the way now we haven't done anything here yet let me take care of another very easy one this other one is going to be equation clay data okay function clay data I want to play us for yourself dot txt that will be student student ID dot I'll be delete from what am i deleting that stain zero and collect everything I'm gonna repeat the same thing for the order seven columns [Music] right so let's change the name around this is test number first name sorry this is solving all right that is the class taking care of okay let's copy this function and add it to the Puffin player itself okay all of these names that have cold are the names of all of these widgets okay have a good look at them and yes yeah they're boots as well right now okay let's add declare today yeah right here and try a comma command it was split just like we did for the exit so there's s Remington see there we go add whatever they tell you want in yeah you can play there so the player walks fine now let's move back in there now let's take care of some very important data the very first one that I'll take care of now we be the director and sorry the odd so come right down here Haitian I'm gonna call that our data the function our data so let's say if Liam so lean actually comes the data that we have select ID dot get so parentheses equals zero if whatever current is not equal zero then one day student database the student database is this now cold this is the name now so I'm gonna copy all of this student database on the spawn back-end copy dad's seems to be too long about Sarat equals student ID the names and so on so I'm gonna copy this so if that's convenient just copy all of those copy so the student ID dots get so let's just add dots get our parentheses across for the others as well right speed up that right and the last one maybe we should just break it that's here okay so we have all of that in place but what we want to do now is the student list we wanted to add it onto the student list this is the student list so for the student is less Claire whatever we have understood analyst fest so come right down here press ENTER I will say whatever we have on the student list does get rid of that get rid of it and the same student list we want you to insert as follows first entered then insert right add a column to follow in information summon copy all of this and paste it right here so we have to prove us that bracket okay that is the art but I will make sure we call here we were supposed to call this very database or this very function and that we dot ad student record and the student record and I'm calling this is a try here visible one I've just called it right here okay all right now that that's is taking care let's have a go parts taking care of display function display display data a case of the display data is just gonna be the student list okay first of all delete whatever you have in there and then display whatever new record that will have okay now is use a formula for row game students on the score back-end dot view data despair copied and pasted here apprentices okay so we now wonder student lists to inset whatever we have on the rope and said as follows and just put a rule there comma this other space now you can enter courage with times choices years there as the display so these two function are just great a I'm going to now call them on the button so copy nuts spur right now let's go to pod that's the part call that and the other one is display I think it's called displayed a tiny sale I just say command it was displayed data I'm pissed at their ahsoka right is called display data yep is called disputed okay I've colonists you now the other one that I would like to call me B let's call the lead so say delete delete data [Music] so now you can see it the case of dad's gonna copy this and they're copying that commander test and then we want to call the database itself that is the database itself no copy all of that paste it here and it's gonna be delete so good to have my the CSD the SD it is a is actually a [Music] global variable okay maybe I should [Music] function students should record and that is inside so I'm just gonna call it D it that Israel Korea Muslim sash sash what no one's belly a missing yet such student equals is on the list box [Music] okay dots the same current selection as for my current SD was students list and this student wisdom will have to call it a swab inside the widget itself we will search [Music] all right so let me copy all of this then we take care of that little taste-test underneath you okay but we then need to say to insects as follows coming here the force insertion will be that will be for my they're the same set and comma SD that is they will go so I'm going to repeat the same to diverse maybe that's just built this year and just copy the resin fresh alright 3.4 student then this will be for first name [Music] surname [Music] date of birth right so I'm gonna speed that up okay that's all done we just need to change the number that's two or three okay that's all done now let's completely delete the case of the delete have called the database okay now and actually need to clear as well let's just call functional Claire and I also need to call function display as well so that is the needs taking care of I'm now gonna call no need to call fusion display data now we need to now call this Reformation on the button school right now delete by here so delete is taking elf without need the search and update so I'm gonna have to speed those two Bob okay I'm right here guys do that lines of code for this search okay and the Boosh bragged it's positive you guys can see it's there let's repeat the same generic and here right updates the elbow have a good look at this lines of codes and one other thing you can see this student record have actually called that as well I've called that inside the list box so let's come right down good very slowly so that you guys can see what I'm about to show you okay here these are the frames and here are the labels and the texts and from which it is called okay now take it out I'm right here that is where I have called the student record okay when I click on View all of the information on the student record will be displayed on each of the and true widget and right down here inside buttons yes we have called the sash that's right there and the same thing was repeated for the update okay let's try it on this system now so I'm going to take it up gradually so that you guys see all of the clothes but for those of you are members of my channel just let me know if you need coats only if you are members of the channel so for you to be a member you need to do is to pay for prom night e4 pawn Knight and IP now you'll be an executive member there we go so will now run this program this is the front end okay now the front game but just before I run it let me show you the back end again minimize that and this here is the back end this is the back end you're going to need both files okay take it down and down they break this apart so that you can see the race of the coats at the back end I have to save whatever I've done I save it but let's make sure this is saved a swirl before I run it file save run there we go guys so the student details name of student let's call the student Johnny Johnny legas [Music] little bit of journalist let's say 1801 thousand oldest Johnny Johnny's above 18 point to 19 bill address of Johnny I'm gonna say one Johnny okay Adjani information there they will go display Johnny information alright let's add more Beatles so I'm just gonna speed that up whatever Indian let's see that is beauty Anjali is Julie Judy date of birth of Julie twelve one maybe four oldest Julia body Tina Swamp fever and Julie leaves in 16 let's say [Music] there were no last Julie's number but display Julie's information okay I'm going to display Julie's information again unless see if we can delete the second one the leads right yes we plan and look at this can we modify that's an upper case and updates modification that's the update display all of the information the update is there well that's beautiful is working alright let's add more details yeah so let's add the information okay let's add this information of a CO and a you may not believe it actually this is information that we have the Vatican City in this area in a way in Nigeria Vatican City as varies impression I hear that that's where they train all the priests so in Asia so let's say hello to my people out there okay guys so what I'm going to do now is just to show you how this won't look at the search engine let's play it and let's search for other other in a way this let's see and we search for yes we can I will have a lot of information about this pretty girl from Asia Nigeria over in Edo State so guys with that I'm gonna call at the end of this tutorial suppose you guys enjoy it for you to be a member this channel all you need to do is to pay for upon 99p and you'll be a member of this channel you can always put in a request for the lines of codes so we dynamically the end of this tutorial bye for now and you all have a nice day bye
Info
Channel: DJ Oamen
Views: 155,038
Rating: 4.8987799 out of 5
Keywords: How to Create Student Database Management System using SqLite in python, Create Student Database Management System using SqLite in python, Student Database Management System using SqLite in python, Database Management System using SqLite in python, using SqLite in python, SqLite Tutorial in python
Id: dlRXp4YSuG4
Channel Id: undefined
Length: 63min 29sec (3809 seconds)
Published: Sat Jan 05 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.