Δημοκράτης έγραψε: 26 Απρ 2022, 20:38
μα δεν έχει σχήμα η mongo, αν τα βάλεις σε RDBMS θες σχήμα
εχει document schema, δεν εχει tables
Hi xxxx I the formative there is a requirement to provide a dump of table structure if a database has been used. However mongoDB has no tables as such. What do you suggest I should provide?
Hi xxxx
I will advise you to include the schema
You would need it for an SQL database, but a NoSQL database, like Mongo, uses documents so there are no tables, however, you can export the schema that will show the structure.
Spoiler
MongoDB is schema-less structure but we can enforce the collection by defining the document schema.
Below is the syntax of the MongoDB schema.
1) To show the schema of index collection –
db.name_of_collection.getIndices ()
2) To show the schema of collections –
var schematodo = db.name_of_collection.findOne()
for (var key (Used to show key fields) in schematodo (Used to display schema field of collections)) { print (key, typeof key) ; }
3) Schema structure of document –
{
Properties: {
Field_name: {bsonType (type of document) : string}
Field_name: {bsonType (type of document) : string}
}
}
Parameter Description:
1) Name of collection – This is defined as the name of collection from which we have checked the schema structure of collection and indexes. We can check the schema structure of any collection in MongoDB.
2) getIndices – This is the method in MongoDB used to display schema structure of all indexes from specified schema which was we have used in our command.
3) findOne – This method is used to find single documents from collections. Using this method we also find all collection fields in MongoDB.
Δημοκράτης έγραψε: 26 Απρ 2022, 20:38
μα δεν έχει σχήμα η mongo, αν τα βάλεις σε RDBMS θες σχήμα
εχει document schema, δεν εχει tables
Hi xxxx I the formative there is a requirement to provide a dump of table structure if a database has been used. However mongoDB has no tables as such. What do you suggest I should provide?
Hi xxxx
I will advise you to include the schema
You would need it for an SQL database, but a NoSQL database, like Mongo, uses documents so there are no tables, however, you can export the schema that will show the structure.
Spoiler
MongoDB is schema-less structure but we can enforce the collection by defining the document schema.
Below is the syntax of the MongoDB schema.
1) To show the schema of index collection –
db.name_of_collection.getIndices ()
2) To show the schema of collections –
var schematodo = db.name_of_collection.findOne()
for (var key (Used to show key fields) in schematodo (Used to display schema field of collections)) { print (key, typeof key) ; }
3) Schema structure of document –
{
Properties: {
Field_name: {bsonType (type of document) : string}
Field_name: {bsonType (type of document) : string}
}
}
Parameter Description:
1) Name of collection – This is defined as the name of collection from which we have checked the schema structure of collection and indexes. We can check the schema structure of any collection in MongoDB.
2) getIndices – This is the method in MongoDB used to display schema structure of all indexes from specified schema which was we have used in our command.
3) findOne – This method is used to find single documents from collections. Using this method we also find all collection fields in MongoDB.
Την δομή του json σε ζητάει. Η fondone δεν θα επιστρέψει αναγκαστικά ένα documwnt με την πλήρη δομή αλλά απλώς ενα document. Αλλά όλα σου τα documwbts είναι με την ίδια δομή στην collection έχει καλώς ενα findone αρκεί. Αλλιώς πρέπει να βρεις καποιο document που να είναι πλήρες
talaipwros έγραψε: 26 Απρ 2022, 20:33
οποτε ουσιαστικα αν περασω τα στοιχεια ( ειναι περιπου 70 χιλιαδες γραμμες ) σε MongoDB, για να εχει νοημα η φαση πρεπει να κανω τα searches με
τα $search κλπ της mongo αντι να χρησιμοποιω τα pd.DataFrame.groupby Κλπκλπ του παντας.
το μισο module ( και το συνολο του βασικου συγγραματος ) ειναι pandas/numpy
αρα το πουλο, θα πρεπει να εξηγησω γιατι δεν θα βαλω mongoDB.
απο την αλλη λεει Αν κανετε database, δωστε μας το schema . Αρα το θελει;
Η mongodb δεν έχει σχήμα. Απλά πετάς εγγραφές σε JSON και βγάζει άκρη μόνη της, αφού τους κοτσάρει ένα μοναδικό object id.
Είναι απολύτως εφικτό η μία εγγραφή να είναι
{name:"Joe", age:15} και η αμέσως επόμενη να είναι
{name:ISODate("2015-01-01"), age:"to papari mou"}
Βασικά αν σας λένε να χρησιμοποιήσετε MongoDB είναι λίγο μαλάκες.
talaipwros έγραψε: 26 Απρ 2022, 20:43
var schematodo = db.name_of_collection.findOne()
for (var key (Used to show key fields) in schematodo (Used to display schema field of collections)) { print (key, typeof key) ; }
talaipwros έγραψε: 26 Απρ 2022, 20:43
var schematodo = db.name_of_collection.findOne()
for (var key (Used to show key fields) in schematodo (Used to display schema field of collections)) { print (key, typeof key) ; }
τραγικοί, παράτα τους
αυτο δεν ειναι απο το uni, ειναι απο αλλη πηγη.
Δεν απαιτουν MongoDB, σου δινουν την δυνατοτητα να την επιλεξεις, και να εξηγησεις γιατι την επελεξες ή γιατι οχι.
Με βλεπω τελικα να μην την βαζω αλλα να κανω μια αναλυση του γιατι δεν τη βαζω και να σωνω το output σε JSON files.
talaipwros έγραψε: 26 Απρ 2022, 20:33
οποτε ουσιαστικα αν περασω τα στοιχεια ( ειναι περιπου 70 χιλιαδες γραμμες ) σε MongoDB, για να εχει νοημα η φαση πρεπει να κανω τα searches με
τα $search κλπ της mongo αντι να χρησιμοποιω τα pd.DataFrame.groupby Κλπκλπ του παντας.
το μισο module ( και το συνολο του βασικου συγγραματος ) ειναι pandas/numpy
αρα το πουλο, θα πρεπει να εξηγησω γιατι δεν θα βαλω mongoDB.
απο την αλλη λεει Αν κανετε database, δωστε μας το schema . Αρα το θελει;
σκατα
Από αυτά που γράφεις, φαίνεται να έχεις ένα εξαιρετικά μικρό csv. Δεν ξέρω τι μπορεί να διαχειριστεί το pandas, αλλά το να χρησιμοποιήσεις τον καρκίνο της Mongo για κάτι τέτοιο είναι παντελώς overkill.
Ενπηρειά και σθένος σου πήρε 6 σελίδες να κάνεις άρνηση απαιτούμενος. Είμαι νεαρή γυναίκα, είμαι νεαρή γυναίκα, είμαι νεαρή γυναίκα, είμαι νεαρή γυναίκα. Ακόμα και οι Ζαίοι δεν χρειάζονται τα δύο χρώματα σαν κυρίες.
Ενπηρειά και σθένος σου πήρε 6 σελίδες να κάνεις άρνηση απαιτούμενος. Είμαι νεαρή γυναίκα, είμαι νεαρή γυναίκα, είμαι νεαρή γυναίκα, είμαι νεαρή γυναίκα. Ακόμα και οι Ζαίοι δεν χρειάζονται τα δύο χρώματα σαν κυρίες.
μια και εσεις ασχολειστε με κομπιουτεριστικα δε μου λετε γιατι κολλαει το πισι καμια φορα και η οθονη γινεται ασπρη για 1-3 δευτερολεπτα και δεν ανταποκρινεται το συστημα;
Συνηθως αυτο γινεται οταν βλεπω τσοντες σε 4κ αναλυση να ξεχωριζουν και οι μουνοτριχες να πουμε και οσο κολλαει και η οθονη ειναι ασπρη σαν το γαλα, τα "αχ ναι αχ ναι φακ μι χαρντερ" της γκομενας ακουγονται κανονικα πραγμα πολυ ξενερωτο επειδη πρεπει εγω να τη παιζω για μια ασπρη οθονη λες και ειναι κουκλοθεατρο ή ο καραγκιοζης και δε λεει. Αν ξερετε κανενα δωρεαν αντιβαιρους να το διορθωσω ή ντραιβερ απντειτ πειτε μου και θα σας ειμαι αιωνια υποχρεος
Pirate95 έγραψε: 25 Ιουν 2022, 22:58
μια και εσεις ασχολειστε με κομπιουτεριστικα δε μου λετε γιατι κολλαει το πισι καμια φορα και η οθονη γινεται ασπρη για 1-3 δευτερολεπτα και δεν ανταποκρινεται το συστημα;
Συνηθως αυτο γινεται οταν βλεπω τσοντες σε 4κ αναλυση να ξεχωριζουν και οι μουνοτριχες να πουμε και οσο κολλαει και η οθονη ειναι ασπρη σαν το γαλα, τα "αχ ναι αχ ναι φακ μι χαρντερ" της γκομενας ακουγονται κανονικα πραγμα πολυ ξενερωτο επειδη πρεπει εγω να τη παιζω για μια ασπρη οθονη λες και ειναι κουκλοθεατρο ή ο καραγκιοζης και δε λεει. Αν ξερετε κανενα δωρεαν αντιβαιρους να το διορθωσω ή ντραιβερ απντειτ πειτε μου και θα σας ειμαι αιωνια υποχρεος