m-Power Logo

Create a database CRUD application

Full Transcript of Video

Today I’ll show you how to create a CRUD application over any relational database in just 5 minutes. With a CRUD application, we’ll be able to create, read, update, and delete data from our database using any web browser.

We’ll be using our low-code development platform, m-Power, as it simplifies the process. Now, in this demo we’re creating a CRUD app over an iSeries database, but with m-Power, the process is the same for any database. We could just as easily create the same application over MySQL, SQL Server, Postgres, Oracle, and any other relational database.

On the home screen, I’ll click the “Create Apps” button, as I want to create a new web application.

Now, I need to choose which type of application I’m creating, so I’ll choose the maintainer option as they can create, read, update, and delete data in my database.

Once I click “Create new maintainer”, I can name my application and select a template.

m-Power templates are like pre-built application constructs. They include the architecture, features, and layout of the application. We just need to add data and customize the application--and we’re all done.

For this application, I want the data list with web form template, so I’ll click “Create Application” to proceed. Here’s a list of my database tables. For this demo, I’m interested in a app over my customer data.

Once I select the table, I can either select individual database fields for my application, or just select all fields up here.

Now, I want to adjust one of the field names here, so I’ll click ‘edit field settings’ and change the description to make it more clear.

Also, I’d like to arrange these fields differently than they’re arranged here. So, I’ll quickly just rearrange the fields how I want them.

Once I’m done, I need to tell m-Power how to sort my data. I’ll sort this application by the customer number.

Once I click this button, m-Power creates a data model using the specifications that I’ve just outlined.

In this screen, I get a preview of the application we’re about to complete. I can choose to add custom logic using the external objects button, link to other applications using the smartlinks button, or adjust template properties here.

For this application, I don’t need to do any of that, so I’ll click the build and customize button. Once I click Build, m-Power puts everything together for me. The nice thing about this build process is that you can build an application in just a few steps without coding…but it can also be customized however you want after it’s built–even down to the code level. So it defaults to simple but doesn’t limit your customization. So, let’s check it out.

As you can see, the data is organized in a familiar table format. Here at the top, I can sort and filter my data, or even add new customers. These options on the left let me view, copy, delete, or update the data.

Now, when I update this record, I don’t really love the form layout here. The form itself is too long. I could shorten some of these inputs and make everything fit a lot better.

So, I’ll just open up m-Painter (which is m-Power’s visual editor) and head over to the form layout editor. Here I can remove rows and organize my form however I want.

Once I’m done, I’ll just save my changes and reload my form. As you can see, it looks a lot better now.

Okay, now let’s make sure this does everything it’s supposed to do–which means it should be able to create, read, update, and delete data. Let’s start with creating a new record in our database.

I’m taken to a blank form here, where I can just add a new custom in here. I’ll just put in a bunch of fake information here to test things out. Once I add this record, let’s check to make sure it appears in our list. There it is, so that means it worked!

Alright, so we can create records, and we can obviously read the data, so we just need to make sure this CRUD app can update and delete data. Let me open up that record I just created to update it. Let’s just make a quick change… and click submit…there, you’ll see that it’s been updated in the database.

And finally, let’s test the delete option. If I choose the delete option, and confirm that I want to delete it…the record is now gone. So, that’s it! This application can create, read, update, and delete data in my database.

Okay, this is all working as it should. I just want to do one more thing. I’d like to add security, since I don’t want just anyone having access to edit my database. Once I enable security, I’ll just create a user and a password in here. Now, only users that are in here will be able to access this application. If I try the application again, you’ll see that now I have to sign in, so it’s working correctly!

Now, there’s a lot more I could do to this web application. I could add edit-checking to ensure that employees aren’t entering faulty data. I could set up a workflow that automatically sends an email every time a new record is created. I could even create reports and dashboards over this data and put everything into a secure portal.

For sake of time however, we won’t do any of that right now. But, if you’d like to see more of what m-Power can accomplish, check out our website at mrc-productivity.com. Thanks for watching.

Learn how m-Power can help you

Sign up for a free trial

More Videos

Sort videos by category using the options below