Question: Create an application and database with MySQL and python. You can choose to store and present anything you'd like. It can be a music storage
Create an application and database with MySQL and python. You can choose to store and present anything you'd like. It can be a music storage application, a gym application, or even a baking application. The content is completely up to you!This doesn't have to be an elaborate application as there is no extra credit given for doing more than required. Here are the requirements:
Inside of your sql folder you will have files. They should be named:
ddlsql which will contain your database and table relations. All tables should have proper attributes, domains, foreign key relations, and should be in rd normal form. You should create at least three tables. Keep all key assignments primary and foreign keys inside of the table, don't use alter statements after you create your tables.
userssql this file will contain your admin, read, and write only users. These users will be used in your application and will be used to create the proper connections from your application. The users and passwords can be anything you desire as they will be hard coded into your application layer. Don't modify the root user.
permissions.sql this file will contain your admin, read, and write only roles. The database privileges should be granted to the roles and the roles granted to the users. You will also need to grant execution privileges to your roles for specific procedures. Make sure that each role can only access the procedure based on the functionality of the procedure.
functionprocedures.sql this file will contain your procedures and functions. There must be at least one read procedure and one modification procedure. Functions are not required for the final but should be created here.
dmlsql this file will have your insert statement to add data to your database.
I understand that with different database setups the order that these files will need to be run can change. Ideally, I will run the files in this order:
users.sql
ddlsql
functionprocedures.sql
permissions.sql
dmlsql
Inside of your application folder you will have as many files as needed but should clearly have three main layers. This is the presentation layer, business logic layer, and the data access layer.The only file that is mandatory is the main file. This should be the entry point into your application.
Presentation layer that is run by calling the main file. This layer can be a GUI or a CLI but should only show the functionality that is working. Do not include options that are not working!! At minimum you will need one option that reads information from the database and another option that modifies information from the database. Modification calls to the database should return the updated information. There should be no database administration user access or passwords stored in the presentation layer.
Business Logic Layer, this layer should control your business logic and be the bridge between your Presentation layer and the Data access layer. There should be no user or database information stored in the business logic layer.
Data Access Layer, this layer should bridge functionality between the business logic layer and the database. Database user and password information should be stored here based on your readmodify user. There should not be a root user in the DAL at this point. The function in the DAL should be called by the correct user of the database based on the functionality.
Overview: Your database and application runs on the first go The database, tables, users, roles, procedures, etc. are all created. There are no errors thrown based on your presentation layer requests. Error handling on a macro level doesn't need to be in place but if your application asks for a number then it should handle if something other than a number is entered.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
