Flutter relational database project - flutter

Can I implement a student portal a mobile based application,using sqflite flutter in which teachers can access student table records and similarly the admin can access every table,it means a kind of relational database between every entity?

Sqflite is a database stored on the users individual phone if you want to do something like a student portal you need a real time database which will ensure that others users will be in sync, you can do this by creating a backend application using node.js,java or python and connect it with a relational database such as postgress, mysql and then connect it to your flutter application via http request, another alternatives is to use firebase

Related

Multi Firestore database

I am creating a mobile app , and this mobile app works currently with one google fire store database.
I want to see this app to more than one customer and I don't want to make a collection for each customer.
Instead I want to open a new database.
I know that I need to import the JSON file for each database.
My Question:
Can I tell the app to use database one then if you login with another
account use database 2?
There is only a single Firestore database instance per Firebase project. There is (currently) no way to add additional Firestore database instances to a project.
So that means you'd have to have a separate project for each user. That part is technically feasible for databases, as you can dynamically create a FirebaseApp instance with the configuration data for the signed in user. The problem is that you need to first sign in the user (which requires that you already have a FirebaseApp instance for the project that this user is registered on.
I'd highly recommend reconsidering why you want to create a separate Firestore instance for each user, as creating user-specific sub-collections is by far the simplest way to implement a multi-user application on Firestore.

How to integrate the offline mode in my flutter application? I'm using MySQL server

How to sync data between MySQL server and Sqflite in flutter? I just want to integrate the offline mode in my flutter app...
Is there any library for this?
Unfortunately, there is no library for this. But, it should be pretty straight forward to implement. Just follow these 3 points:
1) Create a function for initial upload of data on SQFLite on from MySQL database when for eg: when a user enables offline mode, or logins for the first time, etc. whatever is relevant to your use case.
2) Then you have to have another function which when the user is online, checks if SQFLite data is in sync with MySQL, if not it updates SQFLite database (This step is unnecessary if the MySql database for the user can only be modified by the user, in which case just the 3rd point is sufficient)
3) Another function is required where when the user changes MySQL data(read, updated, deletes), SQFLite data is updated by recent MySQL data.
If you know basic querying of MySQL and SQFlite (which is quite similar) and are familiar with deserializing data, this should be easy to implement.

Number of users can be created in PostgreSQL

I'm working on a web project with Django, and using postgresql for storing informations. I'd like to know what is the maximum number of users can we create in postgresql ?
There's a difference between Django application users and Postgresql database users. If you intend to create users in your django application, and you are using Postgresql as your django backend database, then for each user you will create will be represented as a row in a postgresql table - therefore, practically speaking, you can create as many users as you'd like and there's no limit. I believe the most commonly used authentication models are defined in django.contrib.auth - there you can find django models for users and groups. In postgresql itself you'd normally have very few database users defined - in all likelihood just one - the user you connect with from Django.

Can I still update or create items in a table that has Azure mobile services EntityData with entity framework or SQL?

I have an azure mobile services and all the tables inherit from EntityData (to enable offline sync), which means they have system columns created automatically such as:
CreatedAt UpdatedAt Deleted
If I try to update or insert to this tables, can I still do it with just entity framework or plain SQL, or do I now have to do it all through the mobile service.
I'm somehow confused with the whole purpose of the EntityData and what it means. Cause I want an application that would be able to use offline sync, but still access data from a webpage.
The Azure Mobile Services SDK makes it very easy to perform CRUD operations on your tables but that doesn't mean you can't still access the tables using entity framework or just plain SQL.
Remember the Azure Mobile Services SDK supports both offline and online operations, but if you need to use the same Azure mobile services database with another client application, then you would have to get the SQL database connection string and connection information from the Azure Mobile services dashboard. With both information, your client app can use Entity framework or plain SQL queries to interact with the tables.

Azure Mobile Services - Connect to Existing Database

I'd like to create a Azure Mobile Service (.NET) that reads / writes from an existing database that is being used by an MVC 5 app. I've been trying, without luck, for the better part of a day to make this happen through the few examples that exist on the internet.
I've just now come across this SO post where Carlos Figueira says that a mobile service creates a new schema with the same name as the service name and all access is done via that schema and the user that has permission to that schema. If this is the case, how will I be able to have my mobile service connect to an existing table, if it always creates new tables in the new schema?
Also, I'm getting the impression that mobile services using .NET is much happier if I don't attempt to connect to an existing DB. Is this the case?
Azure Mobile Services will only work with tables in the new schema (with the service name). In order to work with an existing database, you need to transfer the tables to this schema, and then you will need to rename all your PK columns to "id" (lowercase). Once you have done that, the tables still don't show up in the Data tab in the management interface, but you can 'add' them and then it will connect and you can work with your existing data.
See this link for full walkthrough: http://www.strathweb.com/2012/12/using-existing-database-with-azure-mobile-services/