Can anyone help in storing the attachments in external folder instead of storing it in mysql db itself?

|
drfibonacci 2020-08-15 16:36:34
Maybe the future lies in solutions like CockroachDB or HarperDB which is a part of the ‘newsql’ revolution
Master Yoda 2020-08-15 16:37:20
drfibonacci 2020-08-15 16:32:44
As for me – I will prefer RDBMS for structured data anyday

That quite right. I guess Financial Institutions and Banks too rely on RDBMS. NoSQL is quite new and will take some time

Professor_Mi 2020-08-15 17:08:34
Thanks a lot @Grumpygarf @MasterZiv
Professor_Mi 2020-08-15 17:19:11
mysql_en-5170.jpg

Professor_Mi 2020-08-15 17:19:55
I tried your query @Grumpygarf but it seems not working
drfibonacci 2020-08-15 17:24:52
Professor_Mi 2020-08-15 17:19:55
I tried your query @Grumpygarf but it seems not working

Which database are you using?

drfibonacci 2020-08-15 17:25:45
Also, please provide me a sample data – it works on the data I used
Professor_Mi 2020-08-15 17:28:06
ok sure
drfibonacci 2020-08-15 17:28:42
What is resume.’1′ ?
Professor_Mi 2020-08-15 17:31:06
1 is what is replaced with PERSON_ID
MasterZiv 2020-08-15 17:50:53
Master Yoda 2020-08-15 16:22:09
Admin do you have MongoDB group too?

NO!

MasterZiv 2020-08-15 17:51:08
drfibonacci 2020-08-15 16:22:40
Mongo is a lot more flexible – but the more I learn about RDBMS, the more I get impressed

WHAT?

piterden 2020-08-15 18:58:39
drfibonacci 2020-08-15 16:22:40
Mongo is a lot more flexible – but the more I learn about RDBMS, the more I get impressed

What query language used in mongo?

drfibonacci 2020-08-15 19:32:31
piterden 2020-08-15 18:58:39
What query language used in mongo?

MQL – Mongo query language which is a lot like JavaScript

drfibonacci 2020-08-15 19:33:54
db.collection.findOne({name:/efremov/ig},{name: 1, id:1, username:1});
drfibonacci 2020-08-15 19:34:53
drfibonacci 2020-08-15 19:33:54
db.collection.findOne({name:/efremov/ig},{name: 1, id:1, username:1});

Uses regex expression to find names containing that phrase and returns(projects) data for only those fields whose values are set to 1 in the second parameter object

drfibonacci 2020-08-15 19:38:15
drfibonacci 2020-08-15 19:33:54
db.collection.findOne({name:/efremov/ig},{name: 1, id:1, username:1});

Data received:
{name: “Denis Efremov”,
id:93407355,
username: “@piterden”}

MasterZiv 2020-08-15 20:46:32
drfibonacci 2020-08-15 19:32:31
MQL – Mongo query language which is a lot like JavaScript

Do you know why you called this “more flexible”?
Actually, this is NOT flexibility.

drfibonacci 2020-08-15 20:48:25
In terms of schema design – it is
But the same feature could possibly be incorporated as a json column where additional data goes in, but maybe a whole column isn’t necessary in those cases
drfibonacci 2020-08-15 20:48:28
For example
drfibonacci 2020-08-15 20:48:59
Say I have two objects

{a: 2, b:3}, {a:2, b:3, c:3}

drfibonacci 2020-08-15 20:49:16
To insert it into a relational model, I would need three columns
drfibonacci 2020-08-15 20:49:42
But in a document DB, I could insert it as is, and even apply index on ‘c’
MasterZiv 2020-08-15 20:51:56
drfibonacci 2020-08-15 20:48:25
In terms of schema design – it is
But the same feature could possibly be incorporated as a json column where additional data goes in, but maybe a whole column isn’t necessary in those cases

Mongo is schemaless so there is no schema design flexibility at all, because there is no schema.

drfibonacci 2020-08-15 20:52:03
Then comes nested data

{balance: 5600
currency: “roubles”
latestTransactions:[“Denis”,”Ilia”],
Address:{flatNo: 89, Street: “Some Street in Krakow”}}

drfibonacci 2020-08-15 20:53:17
MasterZiv 2020-08-15 20:51:56
Mongo is schemaless so there is no schema design flexibility at all, because there is no schema.

True, some people read that as flexibility
Although schemas can be explicitly enforced on a collection if necessary

MasterZiv 2020-08-15 20:53:18
drfibonacci 2020-08-15 20:48:25
In terms of schema design – it is
But the same feature could possibly be incorporated as a json column where additional data goes in, but maybe a whole column isn’t necessary in those cases

I meant the query, not the schema, it is quite clear all pros and cons about absence of the schema

drfibonacci 2020-08-15 20:55:15
MasterZiv 2020-08-15 20:53:18
I meant the query, not the schema, it is quite clear all pros and cons about absence of the schema

Its like comparing Java to Javascript – Java being more stringent in case of syntax allows more predictability in its behaviour, but some people prefer Javascript as it allows more versatality

drfibonacci 2020-08-15 20:57:10
Thinking in terms of big data, I don’t think documentDB is a good choice – RDBMS would be the choice of database entirely
alexsandro_matias 2020-08-16 00:35:12
Someone did the execute the benchmark TPC on the MySQL ?
MasterZiv 2020-08-16 05:16:21
alexsandro_matias 2020-08-16 00:35:12
Someone did the execute the benchmark TPC on the MySQL ?

Ask , don’t publish meta questions

iosuser1 2020-08-17 08:55:06
Can anyone help in storing the attachments in external folder instead of storing it in mysql db itself?
iosuser1 2020-08-17 08:56:17
iosuser1 2020-08-17 08:55:06
Can anyone help in storing the attachments in external folder instead of storing it in mysql db itself?

Where i. Need to change the code?

drfibonacci 2020-08-17 08:58:13
iosuser1 2020-08-17 08:55:06
Can anyone help in storing the attachments in external folder instead of storing it in mysql db itself?

In Oracle, there’s something known as BFILE

drfibonacci 2020-08-17 08:58:22
Which stores the address of the file in disk
drfibonacci 2020-08-17 08:58:49
Not sure if anything like that is there in Mysql or Mariadb

But what’s the problem with Blob?

MasterZiv 2020-08-17 08:59:38
iosuser1 2020-08-17 08:55:06
Can anyone help in storing the attachments in external folder instead of storing it in mysql db itself?

What kind of help do you need?

iosuser1 2020-08-17 09:00:03
I use mysql db
MasterZiv 2020-08-17 09:00:56
iosuser1 2020-08-17 09:00:03
I use mysql db

That is what we all suspect as you write to mySQL group…

iosuser1 2020-08-17 09:02:05
Right now i have an php and mysql based application
Where i have store customer documents in the application
But right now they are stored directly in DB
I am expecting the volume of attachments may scale very very high
So im asking your assistance that is there any way to store attachments in file folder instead of getting stored in db
iosuser1 2020-08-17 09:03:26
One simple scenario
My db without attachments will be in 300-800 mb
But with attachments it might go tbs
So if I want to replicate my db for any testing
Im afraid it will take lots of time
MasterZiv 2020-08-17 09:03:49
iosuser1 2020-08-17 09:02:05
Right now i have an php and mysql based application
Where i have store customer documents in the application
But right now they are stored directly in DB
I am expecting the volume of attachments may scale very very high
So im asking your assistance that is there any way to store attachments in file folder instead of getting stored in db

Yes, it is possible.
But this is not related to DB programming, and offtopic.

Master Yoda 2020-08-17 09:04:07
iosuser1 2020-08-17 09:02:05
Right now i have an php and mysql based application
Where i have store customer documents in the application
But right now they are stored directly in DB
I am expecting the volume of attachments may scale very very high
So im asking your assistance that is there any way to store attachments in file folder instead of getting stored in db

Maybe you can store attachment on disk and their path or link in db

iosuser1 2020-08-17 09:04:42
Can we do this in db itself or alter the programming codes?
iosuser1 2020-08-17 09:04:55
Master Yoda 2020-08-17 09:04:07
Maybe you can store attachment on disk and their path or link in db

Can we do this in db itself or alter the programming codes?

drfibonacci 2020-08-17 09:04:57
iosuser1 2020-08-17 09:04:42
Can we do this in db itself or alter the programming codes?

Yes use proprietary Oracle

MasterZiv 2020-08-17 09:05:06
iosuser1 2020-08-17 09:04:42
Can we do this in db itself or alter the programming codes?

What in the DB itself?

MasterZiv 2020-08-17 09:05:41
drfibonacci 2020-08-17 09:04:57
Yes use proprietary Oracle

Your answer is not related to the quotation.

iosuser1 2020-08-17 09:06:18
MasterZiv 2020-08-17 09:05:06
What in the DB itself?

I mean to change the configurations of current blob storage mode to external file folder

MasterZiv 2020-08-17 09:06:37
iosuser1 2020-08-17 09:04:55
Can we do this in db itself or alter the programming codes?

Apparently, if you like to store the files outside the DB, this cannot but done inside the DB

|